Skip to content

: rtnl_link support

Patrick McHardy netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2: iplink: use netlink for link configurationinclude/linux/if_link.h ip/Makefile ip/ip.c +3 more+382 -30 replies
2/2: VLAN supportinclude/linux/if_link.h include/linux/if_vlan.h ip/Makefile +1 more+281 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [IPROUTE 00/02]: rtnl_link support

Hi Stephen,

these patches add support for the rtnl_link stuff and VLAN configuration to iproute. Since the old link configuration was entirely ioctl based and mixing the two would be really ugly, this patch keeps the old ioctl stuff guarded by an ifdef (defaults to enabled) and probes for support for using RTM_NEWLINK. Tested to work properly on both old and patched kernel.

I've added a new -d[etail] flag to ip, the driver specific things are only printed when it is specified. I did this mainly because I'm not sure how careful we want to be not to confuse people using sed/awk/... on iproute output. I would prefer to have the information always shown, but I'll leave that decision up to you.

Changes since the last post:

- Only call link argument parsing function if arguments are present
- Support xstats dumping
- Add sanitized if_vlan.h file for VLAN flag definition
- Support setting/changing VLAN flags

Please apply, thanks.

 include/linux/if_link.h |   47 +++++++
 include/linux/if_vlan.h |   61 +++++++++
 ip/Makefile             |    4 
 ip/ip.c                 |    5 
 ip/ip_common.h          |   15 ++
 ip/ipaddress.c          |   39 ++++++
 ip/iplink.c             |  311 +++++++++++++++++++++++++++++++++++++++++++++++-
 ip/iplink_vlan.c        |  184 ++++++++++++++++++++++++++++
 8 files changed, 663 insertions(+), 3 deletions(-)

Patrick McHardy (2):
[IPROUTE]: iplink: use netlink for link configuration [IPROUTE]: VLAN support