Skip to content

Forbid "type" for peer, update ifname and make it array in ll_cache

Serhey Popovych netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vxcan,veth: Forbid "type" for peer deviceip/iplink_vxcan.c ip/link_veth.c+6 -02 replies
1/3vxcan,veth: Forbid "type" for peer deviceip/iplink_vxcan.c ip/link_veth.c+6 -01 reply
2/3utils: ll_map: Update name and type for existing entrylib/ll_map.c+18 -152 replies
3/3utils: ll_map: Make network device name fixed size array of charlib/ll_map.c+12 -82 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH iproute2 0/3] Forbid "type" for peer, update ifname and make it array in ll_cache

In this series I present following improvements and fixes:

1) Forbid "type" parameter when parsing command line for peer in iplink_vxcan.c and link_veth.c using iplink_parse(): we already known it.

2) In ll_remember_index() update ifname, not only rehash it. It might be changed for same ifindex since last run (i.e. in cache "eth0" during the dump "ppp0").

3) Make ifname fixed size array of chars in @struct ll_cache:
names are never exceed IFNAMSIZ (16 bytes). Replace strcmp()/strcpy() with memcmp()/memcpy() to possibly benefit from compiler call inlining.

See individual patch description message for details.

Thanks,
Serhii

Serhey Popovych (3):
vxcan,veth: Forbid "type" for peer device
utils: ll_map: Update name and type for existing entry
utils: ll_map: Make network device name fixed size array of char

 ip/iplink_vxcan.c |    3 +++
 ip/link_veth.c    |    3 +++
 lib/ll_map.c      |   47 +++++++++++++++++++++++++++--------------------
 3 files changed, 33 insertions(+), 20 deletions(-)
Signature · 1 line
1.7.10.4