Skip to content

: Netlink link creation API + driver conversions

Patrick McHardy netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18: Mark struct net_device * argument to netdev_priv constinclude/linux/netdevice.h+1 -10 replies
2/18: Split up rtnl_setlinknet/core/rtnetlink.c+57 -480 replies
3/18: Link creation APIinclude/linux/if_link.h include/linux/netdevice.h include/net/rtnetlink.h +1 more+409 -70 replies
4/18: Use dev->statsdrivers/net/dummy.c+3 -130 replies
5/18: Keep dummy devices on listdrivers/net/dummy.c+29 -180 replies
6/18: Use rtnl_link APIdrivers/net/dummy.c+62 -200 replies
7/18: Keep ifb devices on listdrivers/net/ifb.c+21 -150 replies
8/18: Use rtnl_link APIdrivers/net/ifb.c+60 -200 replies
9/18: Convert name-based configuration functions to struct netdevice *net/8021q/vlan.c net/8021q/vlan.h net/8021q/vlan_dev.c+109 -1990 replies
10/18: Move some device intialization code to dev->init callbacknet/8021q/vlan.c+46 -460 replies
11/18: Move vlan_group allocation to seperate functionnet/8021q/vlan.c+41 -370 replies
12/18: Split up device checksnet/8021q/vlan.c+32 -240 replies
13/18: Move device registation to seperate functionnet/8021q/vlan.c+47 -360 replies
14/18: Return proper error codes in register_vlan_devicenet/8021q/vlan.c+14 -180 replies
15/18: Use 32 bit value for skb->priority mappinginclude/linux/if_vlan.h net/8021q/vlanproc.c+4 -40 replies
16/18: Keep track of number of QoS mappingsinclude/linux/if_vlan.h net/8021q/vlan_dev.c+24 -60 replies
17/18: Introduce symbolic constants for flag valuesinclude/linux/if_vlan.h net/8021q/vlan.c net/8021q/vlan_dev.c+12 -70 replies
18/18: Use rtnl_link APIinclude/linux/if_link.h net/8021q/Makefile net/8021q/vlan.c +2 more+300 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [NET 00/18]: Netlink link creation API + driver conversions

Hi Dave,

these are the updated rtnl_link API patches and dummy, ifb and VLAN conversions. The documentation is not quite done yet, I'll finish it when I find some spare time.

Changes since the last post:

- fix attribute parsing after module load
- fix module aliases
- refuse all unsupported options on device creation
- turn xstats_size into a function to calculate the size since it turned out not to be flexible enough for my multiqueue simulator device
- use const and __read_mostly where possible
- rename IFLA_INFO_NAME to IFLA_INFO_KIND

VLAN:
- remove broken VLAN_MASK patch
- support REORDER_HDR flag
- support setting initial MTU

The patches are against net-2.6, but AFAICS the only thing in net-2.6.23 conflicting with them is the previous series.

Please apply/replace, thanks :)

 drivers/net/dummy.c       |  145 ++++++++----
 drivers/net/ifb.c         |  116 +++++++---
 include/linux/if_link.h   |   47 ++++
 include/linux/if_vlan.h   |   11 
 include/linux/netdevice.h |    5 
 include/net/rtnetlink.h   |   58 +++++
 net/8021q/Makefile        |    2 
 net/8021q/vlan.c          |  525 +++++++++++++++++++++++-----------------------
 net/8021q/vlan.h          |   23 +-
 net/8021q/vlan_dev.c      |  182 +++++----------
 net/8021q/vlan_netlink.c  |  236 ++++++++++++++++++++
 net/8021q/vlanproc.c      |    4 
 net/core/rtnetlink.c      |  447 ++++++++++++++++++++++++++++++++++-----
 13 files changed, 1271 insertions(+), 530 deletions(-)

Patrick McHardy (18):
[NET]: Mark struct net_device * argument to netdev_priv const [RTNETLINK]: Split up rtnl_setlink
[RTNETLINK]: Link creation API
[DUMMY]: Use dev->stats
[DUMMY]: Keep dummy devices on list
[DUMMY]: Use rtnl_link API
[IFB]: Keep ifb devices on list
[IFB]: Use rtnl_link API
[VLAN]: Convert name-based configuration functions to struct netdevice * [VLAN]: Move some device intialization code to dev->init callback [VLAN]: Move vlan_group allocation to seperate function [VLAN]: Split up device checks
[VLAN]: Move device registation to seperate function [VLAN]: Return proper error codes in register_vlan_device [VLAN]: Use 32 bit value for skb->priority mapping
[VLAN]: Keep track of number of QoS mappings
[VLAN]: Introduce symbolic constants for flag values [VLAN]: Use rtnl_link API