]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip: link: netkit: Support scrub options
authorJordan Rife <jordan@jrife.io>
Wed, 26 Feb 2025 17:06:13 +0000 (09:06 -0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 26 Feb 2025 17:18:25 +0000 (17:18 +0000)
commit3eddcf2dfc0533ff26eb9947ea9cf0ed12e08348
treedaf849108c6a96bc040ff25f7c25ed04de3c31be
parentaca230f0f567e407372f2a5f724f9cd6ec373dec
ip: link: netkit: Support scrub options

Add "scrub" option to configure IFLA_NETKIT_SCRUB and
IFLA_NETKIT_PEER_SCRUB when setting up a link. Add "scrub" and
"peer scrub" to device details as well when printing.

$ sudo ./ip/ip link add jordan type netkit scrub default peer scrub none
$ ./ip/ip -details link show jordan
43: jordan@nk0: <BROADCAST,MULTICAST,NOARP,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535
    netkit mode l3 type primary policy forward peer policy forward scrub default peer scrub none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 524280 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536

v2->v3: Updated man page.
v1->v2: Added some spaces around "scrub SCRUB" in the help message.

Link: https://lore.kernel.org/netdev/20241004101335.117711-1-daniel@iogearbox.net/
Signed-off-by: Jordan Rife <jordan@jrife.io>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/iplink_netkit.c
man/man8/ip-link.8.in