]> git.ipfire.org Git - thirdparty/iproute2.git/log
thirdparty/iproute2.git
3 years agobridge: link: add command to set port in locked mode
Hans Schultz [Mon, 28 Feb 2022 13:36:47 +0000 (14:36 +0100)] 
bridge: link: add command to set port in locked mode

Add support for setting a bridge port in locked mode to use with 802.1X,
so that only authorized clients are allowed access through the port.

Syntax: bridge link set dev DEV locked {on, off}

Signed-off-by: Hans Schultz <schultz.hans+netdev@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Fri, 4 Mar 2022 16:10:50 +0000 (09:10 -0700)] 
Update kernel headers

Update kernel headers to commit:
    1039135aedfc ("net: ethernet: sun: Remove redundant code")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoconfigure: Allow command line override of toolchain
David Ahern [Mon, 7 Feb 2022 00:02:44 +0000 (17:02 -0700)] 
configure: Allow command line override of toolchain

Easy way to build for both gcc and clang.

Signed-off-by: David Ahern <dsahern@kernel.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agomptcp: add port support for setting flags
Geliang Tang [Wed, 23 Feb 2022 06:50:39 +0000 (14:50 +0800)] 
mptcp: add port support for setting flags

This patch updated the port keyword check for the setting flags, allow
to use the port keyword with the non-signal flags. Don't allow to use
the port keyword with the id number.

With this patch, we can use setting flags in two forms, using the address
and port number directly or the id number of the address:

 ip mptcp endpoint change id 1 fullmesh
 ip mptcp endpoint change 10.0.2.1 fullmesh
 ip mptcp endpoint change 10.0.2.1 port 10100 fullmesh

Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agomptcp: add fullmesh support for setting flags
Geliang Tang [Wed, 23 Feb 2022 06:50:38 +0000 (14:50 +0800)] 
mptcp: add fullmesh support for setting flags

A pair of new flags, fullmesh and nofullmesh, had been added in the
setting flags of MPTCP PM netlink in kernel space recently by the commit
73c762c1f07d ("mptcp: set fullmesh flag in pm_netlink").

This patch added the corresponding logic to pass these two flags to the
netlink in user space.

These new flags can be used like this:

 ip mptcp endpoint change id 1 fullmesh
 ip mptcp endpoint change id 1 nofullmesh
 ip mptcp endpoint change id 1 backup fullmesh
 ip mptcp endpoint change id 1 nobackup nofullmesh

Here's an example of setting fullmesh flags:

 > sudo ip mptcp endpoint add 10.0.2.1 subflow
 > sudo ip mptcp endpoint show
 10.0.2.1 id 1 subflow
 > sudo ip mptcp endpoint change id 1 fullmesh
 > sudo ip mptcp endpoint show
 10.0.2.1 id 1 subflow fullmesh
 > sudo ip mptcp endpoint change id 1 nofullmesh
 > sudo ip mptcp endpoint show
 10.0.2.1 id 1 subflow

It can be seen that 'ip mptcp endpoint show' already supports showing
the fullmesh flag.

Acked-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agomptcp: add fullmesh check for adding address
Geliang Tang [Wed, 23 Feb 2022 06:50:37 +0000 (14:50 +0800)] 
mptcp: add fullmesh check for adding address

The fullmesh flag mustn't be used with the signal flag when adding an
address. Commands like this should be treated as invalid commands:

 ip mptcp endpoint add 10.0.2.1 signal fullmesh

This patch added the necessary flags check for this case.

Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agobond: add ns_ip6_target option
Hangbin Liu [Mon, 21 Feb 2022 05:54:58 +0000 (13:54 +0800)] 
bond: add ns_ip6_target option

Similar with arp_ip_target, this option add bond IPv6 NS/NA monitor
support. When IPv6 target was set, the ARP target will be disabled.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'main' into next
David Ahern [Mon, 28 Feb 2022 01:25:02 +0000 (18:25 -0700)] 
Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: Remove strtouint8_t in favor of get_u8
David Ahern [Thu, 17 Feb 2022 02:08:10 +0000 (19:08 -0700)] 
devlink: Remove strtouint8_t in favor of get_u8

strtouint8_t duplicates get_u8; remove it.

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: Remove strtouint16_t in favor of get_u16
David Ahern [Thu, 17 Feb 2022 02:06:16 +0000 (19:06 -0700)] 
devlink: Remove strtouint16_t in favor of get_u16

strtouint16_t duplicates get_u16; remove it.

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: Remove strtouint32_t in favor of get_u32
David Ahern [Thu, 17 Feb 2022 02:04:39 +0000 (19:04 -0700)] 
devlink: Remove strtouint32_t in favor of get_u32

strtouint32_t duplicates get_u32; remove it.

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: Remove strtouint64_t in favor of get_u64
David Ahern [Thu, 17 Feb 2022 01:59:43 +0000 (18:59 -0700)] 
devlink: Remove strtouint64_t in favor of get_u64

strtouint64_t duplicates get_u64; remove it.

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Mon, 21 Feb 2022 16:26:21 +0000 (09:26 -0700)] 
Update kernel headers

Update kernel headers to commit:
    7b779cc8846a ("Merge branch 'octeontx2-ptp-updates'")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agof_flower: fix indentation for enc_key_id and u32
Wojciech Drewek [Thu, 10 Feb 2022 12:57:15 +0000 (13:57 +0100)] 
f_flower: fix indentation for enc_key_id and u32

Commit b2450e46b7b2 ("flower: fix clang warnings") caused enc_key_id
and u32 to be printed without indentation. Fix this by printing two
spaces before calling print_uint_name_value.

Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agobridge: Remove vlan listing from `bridge link`
Benjamin Poirier [Mon, 14 Feb 2022 01:44:46 +0000 (10:44 +0900)] 
bridge: Remove vlan listing from `bridge link`

vlan listing from `bridge link -d` was broken by commit f32e4977dcb0 ("bridge:
add json support for link command"). print_vlan_info() expects to be passed a
IFLA_AF_SPEC attribute (as is done in print_vlan()) but that commit changed
the call in link.c to pass a IFLA_BRIDGE_VLAN_INFO attribute instead. As a
result, a struct bridge_vlan_info is mistakenly parsed as a struct rtattr and
print_vlan_info() usually exits early in this callpath.

The output style of print_vlan_info() (one line per vlan) is different from
the output style of `bridge link` (multiple attributes per line). The json
output is also unsuitable for `bridge link`. Since vlan listing is available
from `bridge vlan`, remove it from `bridge link` instead of trying to change
print_vlan_info().

Note that previously, bridge master devices would be included in the output
when specifying '-d' (and only in that case) but they are no longer
included because there is no detailed information to show for master
devices if we are not printing a vlan listing:
$ bridge link
4: vxlan0: <BROADCAST,MULTICAST> mtu 1500 master br0 state disabled priority 32 cost 100
$ bridge -d link
3: br0: <BROADCAST,MULTICAST> mtu 1500 master br0
4: vxlan0: <BROADCAST,MULTICAST> mtu 1500 master br0 state disabled priority 32 cost 100
    hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on mcast_to_unicast off neigh_suppress off vlan_tunnel on isolated off
$ ./bridge/bridge -d link
4: vxlan0: <BROADCAST,MULTICAST> mtu 1500 master br0 state disabled priority 32 cost 100
    hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on mcast_to_unicast off neigh_suppress off vlan_tunnel on isolated off

Fixes: f32e4977dcb0 ("bridge: add json support for link command")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agobridge: Fix error string typo
Benjamin Poirier [Mon, 14 Feb 2022 01:44:45 +0000 (10:44 +0900)] 
bridge: Fix error string typo

Fixes: fab9a18a2e52 ("bridge: request vlans along with link information")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agolnstat: fix strdup leak in -w argument parsing
Maxim Petrov [Tue, 15 Feb 2022 20:53:47 +0000 (23:53 +0300)] 
lnstat: fix strdup leak in -w argument parsing

'tmp' string is used for safe tokenizing, but it is not required after
getting all the widths in -w option. As 'tmp' string is obtained by strdup
call, the caller has to deallocate it to avoid memory leak.

Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoiplink_can: print_usage: typo fix, add missing spaces
Vincent Mailhol [Sat, 12 Feb 2022 13:27:27 +0000 (22:27 +0900)] 
iplink_can: print_usage: typo fix, add missing spaces

The can help menu misses three spaces for the TDCV, TDCO and TDCF
parameters, making the closing curly bracket unaligned.

For reference, before this patch:

| $ ip link help can
| Usage: ip link set DEVICE type can
|  [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
|  [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
|     phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
|
|  [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
|  [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
|     dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
|  [ tdcv TDCV tdco TDCO tdcf TDCF ]
|
|  [ loopback { on | off } ]
|  [ listen-only { on | off } ]
|  [ triple-sampling { on | off } ]
|  [ one-shot { on | off } ]
|  [ berr-reporting { on | off } ]
|  [ fd { on | off } ]
|  [ fd-non-iso { on | off } ]
|  [ presume-ack { on | off } ]
|  [ cc-len8-dlc { on | off } ]
|  [ tdc-mode { auto | manual | off } ]
|
|  [ restart-ms TIME-MS ]
|  [ restart ]
|
|  [ termination { 0..65535 } ]
|
|  Where: BITRATE := { NUMBER in bps }
|    SAMPLE-POINT := { 0.000..0.999 }
|    TQ := { NUMBER in ns }
|    PROP-SEG := { NUMBER in tq }
|    PHASE-SEG1 := { NUMBER in tq }
|    PHASE-SEG2 := { NUMBER in tq }
|    SJW := { NUMBER in tq }
|    TDCV := { NUMBER in tc}
|    TDCO := { NUMBER in tc}
|    TDCF := { NUMBER in tc}
|    RESTART-MS := { 0 | NUMBER in ms }

... and after this patch:

| $ ip link help can
| Usage: ip link set DEVICE type can
|  [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
|  [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
|     phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
|
|  [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
|  [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
|     dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
|  [ tdcv TDCV tdco TDCO tdcf TDCF ]
|
|  [ loopback { on | off } ]
|  [ listen-only { on | off } ]
|  [ triple-sampling { on | off } ]
|  [ one-shot { on | off } ]
|  [ berr-reporting { on | off } ]
|  [ fd { on | off } ]
|  [ fd-non-iso { on | off } ]
|  [ presume-ack { on | off } ]
|  [ cc-len8-dlc { on | off } ]
|  [ tdc-mode { auto | manual | off } ]
|
|  [ restart-ms TIME-MS ]
|  [ restart ]
|
|  [ termination { 0..65535 } ]
|
|  Where: BITRATE := { NUMBER in bps }
|    SAMPLE-POINT := { 0.000..0.999 }
|    TQ := { NUMBER in ns }
|    PROP-SEG := { NUMBER in tq }
|    PHASE-SEG1 := { NUMBER in tq }
|    PHASE-SEG2 := { NUMBER in tq }
|    SJW := { NUMBER in tq }
|    TDCV := { NUMBER in tc }
|    TDCO := { NUMBER in tc }
|    TDCF := { NUMBER in tc }
|    RESTART-MS := { 0 | NUMBER in ms }

Fixes: 0c263d7c36ff ("iplink_can: add new CAN FD bittiming parameters:
Transmitter Delay Compensat ion (TDC)")
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodcb: Fix error reporting when accessing "dcb app"
Petr Machata [Wed, 9 Feb 2022 14:41:40 +0000 (15:41 +0100)] 
dcb: Fix error reporting when accessing "dcb app"

Currently dcb decodes the response from "dcb app add" and "del" by
interpreting the returned attribute as u8. But the value stored there is
actually a negative errno value.

Additionally, "dcb app" currently shows two sets of messages, one in
dcb_set_attribute_attr_cb() where the issue is detected, and another as a
result of error return from that function.

The current state is as follows:

# dcb app add dev swp36 dscp-prio 20:2
Error when attempting to set attribute: Unknown error 239
Attribute write: No such file or directory

Fix the "unknown error" issue by correctly decoding the attribute as i8 and
negating it. Furthermore, set errno to that value, and let the top-level
"attribute write" error message show the correct message.

Initialize errno to 0 before the dcb_talk() dispatch, and make the error
print conditional on errno != 0. This way the few error messages that are
worth describing in the place where they are detected will not cause the
second error message to be printed.

The fixed reporting looks like this:

# dcb app add dev swp36 dscp-prio 20:2
Attribute write: File exists

Reported-by: Maksym Yaremchuk <maksymy@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc: fix duplicate fall-through
Stephen Hemminger [Mon, 14 Feb 2022 21:07:49 +0000 (13:07 -0800)] 
tc: fix duplicate fall-through

Cleanup from last patch

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agolibnetlink: fix socket leak in rtnl_open_byproto()
Maxim Petrov [Tue, 8 Feb 2022 17:20:45 +0000 (20:20 +0300)] 
libnetlink: fix socket leak in rtnl_open_byproto()

rtnl_open_byproto() does not close the opened socket in case of
errors, and the socket is returned to the caller in the `fd` field of
the struct. However, none of the callers care about the socket, so
close it in the function immediately to avoid any potential resource
leaks.

Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc_util: Fix parsing action control with space and slash
Roi Dayan [Thu, 3 Feb 2022 12:20:46 +0000 (14:20 +0200)] 
tc_util: Fix parsing action control with space and slash

For action police there is an conform-exceed action control
which can be for example "jump 2 / pipe".
The current parsing loop is doing one more iteration than necessary
and results in ok var being 3.

Example filter:

tc filter add dev enp8s0f0_0 ingress protocol ip prio 2 flower \
    verbose action police rate 100mbit burst 12m \
    conform-exceed jump 1 / pipe mirred egress redirect dev enp8s0f0_1 action drop

Before this change the command will fail.
Trying to add another "pipe" before mirred as a workaround for the stopping the loop
in ok var 3 resulting in result2 not being saved and wrong filter.

... conform-exceed jump 1 / pipe pipe mirred ...

Example dump of the action part:
... action order 1:  police 0x1 rate 100Mbit burst 12Mb mtu 2Kb action jump 1 overhead 0b  ...

Fix the behavior by removing redundant case 2 handling, either argc is over or breaking.

Example dump of the action part with the fix:
... action order 1:  police 0x1 rate 100Mbit burst 12Mb mtu 2Kb action jump 1/pipe overhead 0b ...

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotunnel: Fix missing space after local/remote print
Gal Pressman [Wed, 9 Feb 2022 06:54:15 +0000 (08:54 +0200)] 
tunnel: Fix missing space after local/remote print

The cited commit removed the space after the local/remote tunnel print
and resulted in "broken" output:

gre remote 1.1.1.2local 1.1.1.1ttl inherit erspan_ver 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fixes: 5632cf69ad59 ("tunnel: fix clang warning")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'ioam-insert-freq' into next
David Ahern [Thu, 10 Feb 2022 17:54:51 +0000 (09:54 -0800)] 
Merge branch 'ioam-insert-freq' into next

Justin Iurman  says:

====================

The insertion frequency is represented as "k/n", meaning IOAM will be
added to "k" packets over "n" packets, with 0 < k <= n <= 1000000.
Therefore, it provides the following range of insertion frequencies:
[0.0001% ... 100%].

Default frequency is "1/1" (i.e., applied to all packets) for backward
compatibility.

Previous command:
ip -6 ro ad fc00::1/128 encap ioam6 mode ...

New command:
ip -6 ro ad fc00::1/128 encap ioam6 [ freq k/n ] mode ...

====================

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate documentation
Justin Iurman [Sat, 5 Feb 2022 15:52:08 +0000 (16:52 +0100)] 
Update documentation

Update the ip-route documentation to include the IOAM insertion
frequency.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoAdd support for the IOAM insertion frequency
Justin Iurman [Sat, 5 Feb 2022 15:52:07 +0000 (16:52 +0100)] 
Add support for the IOAM insertion frequency

This patch adds support for the IOAM insertion frequency by introducing
a new parameter "freq". The expected value is "k/n", see the patchset
description for more details.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Thu, 10 Feb 2022 17:51:07 +0000 (09:51 -0800)] 
Update kernel headers

Update kernel headers to commit:
    d8c2858181cc ("net/switchdev: use struct_size over open coded arithmetic")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiplink: add ip-link documentation
Eric Dumazet [Wed, 2 Feb 2022 18:24:11 +0000 (10:24 -0800)] 
iplink: add ip-link documentation

Add documentation for gro_max_size.

Also make clear gso_max_size/gso_max_segs can be set after device creation.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Coco Li <lixiaoyan@google.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiplink: add gro_max_size attribute handling
Coco Li [Thu, 3 Feb 2022 04:45:58 +0000 (20:45 -0800)] 
iplink: add gro_max_size attribute handling

Add the ability to display or change the gro_max_size attribute.

ip link set dev eth1 gro_max_size 60000
ip -d link show eth1
5: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9198 qdisc mq master eth0 state UP mode DEFAULT group default qlen 1000
    link/ether bc:ae:c5:39:69:66 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 46 maxmtu 9600
    <...> gro_max_size 60000

Signed-off-by: Coco Li <lixiaoyan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6`
Wen Liang [Wed, 26 Jan 2022 19:44:48 +0000 (14:44 -0500)] 
tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6`

Currently the key struct of u32 filter does not support json. This
commit adds json support for showing key.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc: u32: add support for json output
Wen Liang [Wed, 26 Jan 2022 19:44:47 +0000 (14:44 -0500)] 
tc: u32: add support for json output

Currently u32 filter output does not support json. This commit uses
proper json functions to add support for it.

`sprint_u32_handle` adds an extra space after the raw check, remove the
extra space.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiprule: Allow option dsfield in 'ip rule show'
Guillaume Nault [Mon, 31 Jan 2022 11:02:13 +0000 (12:02 +0100)] 
iprule: Allow option dsfield in 'ip rule show'

When the dsfield option was added to ip rule, it only worked for add
and delete operations. For consistency, allow it when dumping rules
too.

Fixes: dec01609dc62 ("iproute2: Add dsfield as alias for tos for ip rules")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc/f_flower: fix indentation
Stephen Hemminger [Tue, 1 Feb 2022 04:28:19 +0000 (20:28 -0800)] 
tc/f_flower: fix indentation

Introduce print_indent_name_value to do the indented style
used in flower.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc_util: fix breakage from clang changes
Stephen Hemminger [Tue, 1 Feb 2022 04:28:18 +0000 (20:28 -0800)] 
tc_util: fix breakage from clang changes

This fixes the indentation of types with newline flag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc: add skip_hw and skip_sw to control action offload
Baowen Zheng [Wed, 26 Jan 2022 06:54:39 +0000 (14:54 +0800)] 
tc: add skip_hw and skip_sw to control action offload

Add skip_hw and skip_sw flags for user to control whether
offload action to hardware.

Also we add hw_count to show how many hardwares accept to offload
the action.

Change man page to describe the usage of skip_sw and skip_hw flag.

An example to add and query action as below.

$ tc actions add action police rate 1mbit burst 100k index 100 skip_sw

$ tc -s -d actions list action police
total acts 1
    action order 0:  police 0x64 rate 1Mbit burst 100Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet
    ref 1 bind 0  installed 2 sec used 2 sec
    Action statistics:
    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
    backlog 0b 0p requeues 0
    skip_sw in_hw in_hw_count 1
    used_hw_stats delayed

Signed-off-by: baowen zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoss: use freecon() instead of free() when appropriate
Andrea Claudi [Fri, 28 Jan 2022 10:53:58 +0000 (11:53 +0100)] 
ss: use freecon() instead of free() when appropriate

According to SELinux API, when resources are allocated using getpidcon()
of getfilecon(), they should be freed using freecon().

This commit makes ss use freecon() where appropriate, defining a stub
function executing a free() useful when iproute2 is compiled without
SELinux support.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoman: Fix a typo in the flag documentation of ip address
Thomas Niederberger [Fri, 28 Jan 2022 17:21:46 +0000 (09:21 -0800)] 
man: Fix a typo in the flag documentation of ip address

Signed-off-by: Thomas Niederberger <thomas@niederb.ch>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodcb: app: Add missing "dcb app show dev X default-prio"
Petr Machata [Thu, 20 Jan 2022 08:57:54 +0000 (09:57 +0100)] 
dcb: app: Add missing "dcb app show dev X default-prio"

All the actual code exists, but we neglect to recognize "default-prio" as a
CLI key for selection of what to show.

Reported-by: Maksym Yaremchuk <maksymy@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge branch 'clang-compile' into next
David Ahern [Wed, 26 Jan 2022 17:21:14 +0000 (10:21 -0700)] 
Merge branch 'clang-compile' into next

Stephen Hemminger  says:

====================

This patch set makes iproute2-next main branch compile without warnings
on Clang 11 (and probably later versions).

====================

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agojson_print: suppress clang format warning
Stephen Hemminger [Tue, 11 Jan 2022 17:54:38 +0000 (09:54 -0800)] 
json_print: suppress clang format warning

Clang complains about using non-format string in print_color_tv.

The ideal fix would be to put format attribute on all the print_XXX functions
in json_print.h. But that leads to furthur complications because the existing
code may pass a NULL as format if the format is unused since the print
is being done only for JSON output.

The comprimise is to just disable the warning for the one place
it shows up.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agolibbpf: fix clang warning about format non-literal
Stephen Hemminger [Tue, 11 Jan 2022 17:54:37 +0000 (09:54 -0800)] 
libbpf: fix clang warning about format non-literal

Add format attribute to the format string in print routines.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotunnel: fix clang warning
Stephen Hemminger [Tue, 11 Jan 2022 17:54:36 +0000 (09:54 -0800)] 
tunnel: fix clang warning

To fix clang warning about passing non-format string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotipc: fix clang warning about empty format string
Stephen Hemminger [Tue, 11 Jan 2022 17:54:35 +0000 (09:54 -0800)] 
tipc: fix clang warning about empty format string

When calling json_print with json only use a NULL instead of
empty string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agocan: fix clang warning
Stephen Hemminger [Tue, 11 Jan 2022 17:54:34 +0000 (09:54 -0800)] 
can: fix clang warning

Fix warning about passing non-format string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoipl2tp: fix clang warning
Stephen Hemminger [Tue, 11 Jan 2022 17:54:33 +0000 (09:54 -0800)] 
ipl2tp: fix clang warning

Clang complains about passing non-format string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc_util: fix clang warning in print_masked_type
Stephen Hemminger [Tue, 11 Jan 2022 17:54:32 +0000 (09:54 -0800)] 
tc_util: fix clang warning in print_masked_type

Clang complains about passing a non-format string but the code here.
The old code was doing extra work the JSON case. JSON ignores one line mode.
This also fixes output format in oneline mode.

Fixes: 04b215015ba8 ("tc_util: introduce a function to print JSON/non-JSON masked numbers")
Cc: elibr@mellanox.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoflower: fix clang warnings
Stephen Hemminger [Tue, 11 Jan 2022 17:54:31 +0000 (09:54 -0800)] 
flower: fix clang warnings

Clang complains about passing non-format string to print_string.
Handle this by splitting json and non-json parts.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agonetem: fix clang warnings
Stephen Hemminger [Tue, 11 Jan 2022 17:54:30 +0000 (09:54 -0800)] 
netem: fix clang warnings

Netem is using empty format string to not print values.
Clang complains about this hack so don't do it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoutils: add format attribute
Stephen Hemminger [Tue, 11 Jan 2022 17:54:29 +0000 (09:54 -0800)] 
utils: add format attribute

One more format attribute needed to resolve clang warnings.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc: add format attribute to tc_print_rate
Stephen Hemminger [Tue, 11 Jan 2022 17:54:28 +0000 (09:54 -0800)] 
tc: add format attribute to tc_print_rate

This catches future errors and silences warning from Clang.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'main' into next
David Ahern [Wed, 26 Jan 2022 16:16:06 +0000 (09:16 -0700)] 
Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agouapi: update kernel headers from 5.17-rc1
Stephen Hemminger [Mon, 24 Jan 2022 17:55:39 +0000 (09:55 -0800)] 
uapi: update kernel headers from 5.17-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc/action: print error to stderr
Stephen Hemminger [Thu, 20 Jan 2022 20:45:49 +0000 (12:45 -0800)] 
tc/action: print error to stderr

Error messages should go to stderr even if using JSON.

Fixes: 2704bd625583 ("tc: jsonify actions core")
Cc: jiri@mellanox.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agomptcp: add id check for deleting address
Geliang Tang [Sat, 15 Jan 2022 16:04:33 +0000 (00:04 +0800)] 
mptcp: add id check for deleting address

This patch added the id check for deleting address in mptcp_parse_opt().
The ADDRESS argument is invalid for the non-zero id address, only needed
for the id 0 address.

 # ip mptcp endpoint delete id 1
 # ip mptcp endpoint delete id 0 10.0.1.1

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodcb: Rewrite array-formatting code to not cause warnings with Clang
Petr Machata [Tue, 18 Jan 2022 11:09:30 +0000 (12:09 +0100)] 
dcb: Rewrite array-formatting code to not cause warnings with Clang

Some installation of Clang are unhappy about the use of a hand-rolled
formatting strings, and emit warnings such as this one:

dcb.c:334:31: warning: format string is not a string literal
[-Wformat-nonliteral]

Rewrite the impacted code so that it always uses literal format strings.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agof_flower: fix checkpatch warnings
Stephen Hemminger [Tue, 18 Jan 2022 05:02:50 +0000 (21:02 -0800)] 
f_flower: fix checkpatch warnings

Fix minor whitespace and other easy to fix complaints from
checkpatch.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonetem: fix checkpatch warnings
Stephen Hemminger [Tue, 18 Jan 2022 04:59:26 +0000 (20:59 -0800)] 
netem: fix checkpatch warnings

netem is old and pre-dates checkpatch, so fix it up.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge branch 'main' into next
David Ahern [Sun, 16 Jan 2022 22:55:59 +0000 (15:55 -0700)] 
Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agolib: fix ax25.h include for musl
Sam James [Thu, 13 Jan 2022 08:14:13 +0000 (08:14 +0000)] 
lib: fix ax25.h include for musl

ax25.h isn't guaranteed to be avilable in netax25/*;
it's dependent on our choice of libc (it's not available
on musl at least) [0].

Let's use the version from linux-headers.

[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers
Bug: https://bugs.gentoo.org/831102

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: add missing virtio headers
Stephen Hemminger [Sat, 15 Jan 2022 18:39:43 +0000 (10:39 -0800)] 
uapi: add missing virtio headers

These headers are referred to by virtio_net but were
not in uapi directory.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: add missing rose and ax25 files
Stephen Hemminger [Sat, 15 Jan 2022 18:38:58 +0000 (10:38 -0800)] 
uapi: add missing rose and ax25 files

All iproute2 headers should come from sanitized kernel headers
not the local system.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoq_cake: allow changing to diffserv3
Kevin Bracey [Thu, 6 Jan 2022 11:16:04 +0000 (13:16 +0200)] 
q_cake: allow changing to diffserv3

A diffserv3 option (enum value 0) was never sent to the kernel, so it
was not possible to use "tc qdisc change" to select it.

This also meant that were also relying on the kernel's default being
diffserv3 when adding. If the default were to change, we wouldn't have
been able to request diffserv3 explicitly.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoiplink_can: add ctrlmode_{supported,_static} to the "--details --json" output
Vincent Mailhol [Sun, 9 Jan 2022 15:30:40 +0000 (00:30 +0900)] 
iplink_can: add ctrlmode_{supported,_static} to the "--details --json" output

This patch is the userland counterpart of [1]. Indeed, [1] enables the
can netlink interface to report the CAN controller capabilities.

Previously, only the options which were switched on were reported
(i.e. can_priv::ctrlmode). Here, we add two additional pieces of
information to the json report:

  - ctrlmode_supported: the options that can be modified by netlink

  - ctrlmode_static: option which are statically enabled by the driver
    (i.e. can not be turned off)

For your information, we borrowed the naming convention from struct
can_priv [2].

Contrary to the ctrlmode, the ctrlmode_{supported,_static} are only
reported in the json context. The reason is that this newly added
information can quickly become very verbose and we do not want to
overload the default output. You can think of the "ip --details link
show canX" output as the verbose mode and the "ip --details --json
link show canX" output as the *very* verbose mode.

*Example:*

This is how the output would look like for a dummy driver which would
have:

  - CAN_CTRLMODE_LOOPBACK, CAN_CTRLMODE_LISTENONLY,
    CAN_CTRLMODE_3_SAMPLES, CAN_CTRLMODE_FD, CAN_CTRLMODE_CC_LEN8_DLC
    and TDC-AUTO supported by the driver

  - CAN_CTRLMODE_CC_LEN8_DLC turned on by the user

  - CAN_CTRLMODE_FD_NON_ISO statically enabled by the driver

| $ ip link set can0 type can cc-len8-dlc on
| $ ip --details --json --pretty link show can0
| [ {
|         "ifindex": 1,
|         "ifname": "can0",
|         "flags": [ "NOARP","ECHO" ],
|         "mtu": 16,
|         "qdisc": "noop",
|         "operstate": "DOWN",
|         "linkmode": "DEFAULT",
|         "group": "default",
|         "txqlen": 10,
|         "link_type": "can",
|         "promiscuity": 0,
|         "min_mtu": 0,
|         "max_mtu": 0,
|         "linkinfo": {
|             "info_kind": "can",
|             "info_data": {
|                 "ctrlmode": [ "FD-NON-ISO","CC-LEN8-DLC" ],
|                 "ctrlmode_supported": [ "LOOPBACK","LISTEN-ONLY","TRIPLE-SAMPLING","FD","CC-LEN8-DLC","TDC-AUTO" ],
|                 "ctrlmode_static": [ "FD-NON-ISO" ],
|                 "state": "STOPPED",
|                 "restart_ms": 0,
|                 "bittiming_const": {
|                     "name": "DUMMY_CAN_DEV",
|                     "tseg1": {
|                         "min": 2,
|                         "max": 256
|                     },
|                     "tseg2": {
|                         "min": 2,
|                         "max": 128
|                     },
|                     "sjw": {
|                         "min": 1,
|                         "max": 128
|                     },
|                     "brp": {
|                         "min": 1,
|                         "max": 512
|                     },
|                     "brp_inc": 1
|                 },
|                 "data_bittiming_const": {
|                     "name": "DUMMY_CAN_DEV",
|                     "tseg1": {
|                         "min": 2,
|                         "max": 32
|                     },
|                     "tseg2": {
|                         "min": 1,
|                         "max": 16
|                     },
|                     "sjw": {
|                         "min": 1,
|                         "max": 8
|                     },
|                     "brp": {
|                         "min": 1,
|                         "max": 32
|                     },
|                     "brp_inc": 1,
|                     "tdc": {
|                         "tdco": {
|                             "min": 0,
|                             "max": 127
|                         },
|                         "tdcf": {
|                             "min": 0,
|                             "max": 127
|                         }
|                     }
|                 },
|                 "clock": 80000000
|             }
|         },
|         "num_tx_queues": 1,
|         "num_rx_queues": 1,
|         "gso_max_size": 65536,
|         "gso_max_segs": 65535,
|         "parentbus": "usb",
|         "parentdev": "1-10:1.1"
|     } ]

As mentioned above, the default output remains unchanged:

| $ ip --details link show can0
| 1: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
|     link/can  promiscuity 0 minmtu 0 maxmtu 0
|     can <FD-NON-ISO,CC-LEN8-DLC> state STOPPED restart-ms 0
|    DUMMY_CAN_DEV: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
|    DUMMY_CAN_DEV: dtseg1 2..32 dtseg2 1..16 dsjw 1..8 dbrp 1..32 dbrp_inc 1
|    tdco 0..127 tdcf 0..127
|    clock 80000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus usb parentdev 1-10:1.1

[1] commit 383f0993fc77 ("can: netlink: report the CAN controller mode
    supported flags")
    https://lore.kernel.org/linux-can/20220105144402.1174191-16-mkl@pengutronix.de/T/#u

[2] https://elixir.bootlin.com/linux/v5.14/source/include/linux/can/dev.h#61

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Wed, 12 Jan 2022 17:31:20 +0000 (10:31 -0700)] 
Update kernel headers

Update kernel headers to commit:
    fe8152b38d3a ("Merge tag 'devprop-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'rdma-clang-compile' into next
David Ahern [Tue, 11 Jan 2022 16:20:02 +0000 (09:20 -0700)] 
Merge branch 'rdma-clang-compile' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agordma: Don't allocate sparse array
Leon Romanovsky [Sun, 9 Jan 2022 18:41:39 +0000 (20:41 +0200)] 
rdma: Don't allocate sparse array

The addition of driver QP type with index 0xFF caused to the following
clang compilation error:

res.c:152:10: warning: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare]
        if (idx < ARRAY_SIZE(qp_types_str) && qp_types_str[idx])
            ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Instead of allocating very sparse array, simply create separate check
for the driver QP type.

Fixes: 39307384cea7 ("rdma: Add driver QP type string")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agordma: Limit copy data by the destination size
Leon Romanovsky [Sun, 9 Jan 2022 18:41:38 +0000 (20:41 +0200)] 
rdma: Limit copy data by the destination size

The strncat() function will copy upto n bytes supplied as third
argument. The n bytes shouldn't be no more than destination and
not the source.

This change fixes the following clang compilation warnings:

res-srq.c:75:25: warning: size argument in 'strncat' call appears to be size of the source [-Wstrncat-size]
                        strncat(qp_str, tmp, sizeof(tmp) - 1);
                                             ^~~~~~~~~~~~~~~
res-srq.c:99:23: warning: size argument in 'strncat' call appears to be size of the source [-Wstrncat-size]
        strncat(qp_str, tmp, sizeof(tmp) - 1);
                             ^~~~~~~~~~~~~~~
res-srq.c:142:25: warning: size argument in 'strncat' call appears to be size of the source [-Wstrncat-size]
                        strncat(qp_str, tmp, sizeof(tmp) - 1);
                                             ^~~~~~~~~~~~~~~

Fixes: 9b272e138d23 ("rdma: Add SRQ resource tracking information")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'main' into next
David Ahern [Tue, 11 Jan 2022 16:16:35 +0000 (09:16 -0700)] 
Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agov5.16.0 v5.16.0
Stephen Hemminger [Mon, 10 Jan 2022 23:24:04 +0000 (15:24 -0800)] 
v5.16.0

3 years agotestsuite: Fix tc/vlan.t test
Andrea Claudi [Mon, 3 Jan 2022 18:00:22 +0000 (19:00 +0100)] 
testsuite: Fix tc/vlan.t test

Following commit 8323b20f1d76 ("net/sched: act_vlan: No dump for unset
priority"), the kernel no longer dump vlan priority if not explicitly
set before.

When modifying a vlan, tc/vlan.t test expects to find priority set to 0
without setting it explicitly. Thus, after 8323b20f1d76 this test fails.

Fix this simply removing the check on priority.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge branch 'vdpa-query-set-config' into next
David Ahern [Sat, 18 Dec 2021 21:10:08 +0000 (14:10 -0700)] 
Merge branch 'vdpa-query-set-config' into next

Parav Pandit  says:

====================

This series implements querying and setting of the mac address and mtu
device config fields of the vdpa device of type net.

An example of query and set as below.

$ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000

$ vdpa dev config show
bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000

$ vdpa dev config show -jp
{
    "config": {
        "bar": {
            "mac": "00:11:22:33:44:55",
            "link ": "up",
            "link_announce ": false,
            "mtu": 1500,
        }
    }
}

====================

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agovdpa: Enable user to set mtu of the vdpa device
Parav Pandit [Fri, 17 Dec 2021 08:08:27 +0000 (10:08 +0200)] 
vdpa: Enable user to set mtu of the vdpa device

Implement mtu setting for vdpa device.

$ vdpa mgmtdev show
vdpasim_net:
  supported_classes net

Add the device with mac address and mtu:
$ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000

In above command only mac address or only mtu can also be set.

View the config after setting:
$ vdpa dev config show
bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agovdpa: Enable user to set mac address of vdpa device
Parav Pandit [Fri, 17 Dec 2021 08:08:26 +0000 (10:08 +0200)] 
vdpa: Enable user to set mac address of vdpa device

vdpa: Enable user to set mtu of the vdpa device

Implement mtu setting for vdpa device.

$ vdpa mgmtdev show
vdpasim_net:
  supported_classes net

Add the device with specified mac address:
$ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55

View the config after setting:
$ vdpa dev config show
bar: mac 00:11:22:33:44:55 link up link_announce false mtu 1500

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agovdpa: Enable user to query vdpa device config layout
Parav Pandit [Fri, 17 Dec 2021 08:08:25 +0000 (10:08 +0200)] 
vdpa: Enable user to query vdpa device config layout

Query the device configuration layout whenever kernel supports it.

An example of configuration layout of vdpa device of type network:

$ vdpa dev add name bar mgmtdev vdpasim_net

$ vdpa dev config show
bar: mac 00:35:09:19:48:05 link up link_announce false mtu 1500

$ vdpa dev config show -jp
{
    "config": {
        "bar": {
            "mac": "00:35:09:19:48:05",
            "link ": "up",
            "link_announce ": false,
            "mtu": 1500,
        }
    }
}

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agovdpa: Update kernel headers
Parav Pandit [Fri, 17 Dec 2021 08:08:24 +0000 (10:08 +0200)] 
vdpa: Update kernel headers

Update kernel headers to commit:
ad69dd0bf26b ("vdpa: Introduce query of device config layout")

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers and import virtio_net
David Ahern [Sat, 18 Dec 2021 21:00:29 +0000 (14:00 -0700)] 
Update kernel headers and import virtio_net

Update kernel headers to commit:
    f85b244ee395 ("xdp: move the if dev statements to the first")

and import virtio_net.h for vdpa.

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agomptcp: add support for changing the backup flag
Davide Caratti [Thu, 16 Dec 2021 14:29:59 +0000 (15:29 +0100)] 
mptcp: add support for changing the backup flag

Linux supports 'MPTCP_PM_CMD_SET_FLAGS' since v5.12, and this control has
recently been extended to allow setting flags for a given endpoint id.
Although there is no use for changing 'signal' or 'subflow' flags, it can
be helpful to set/clear the backup bit on existing endpoints: add the 'ip
mptcp endpoint change <...>' command for this purpose.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/158
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agouapi: update to mptcp.h
Stephen Hemminger [Fri, 17 Dec 2021 23:24:54 +0000 (15:24 -0800)] 
uapi: update to mptcp.h

From 5.16-rc5

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agolib/bpf: fix verbose flag when using libbpf
Paul Chaignon [Thu, 16 Dec 2021 15:33:36 +0000 (16:33 +0100)] 
lib/bpf: fix verbose flag when using libbpf

Since commit 6d61a2b55799 ("lib: add libbpf support"), passing the
verbose flag to tc filter doesn't dump the verifier logs anymore in case
of successful loading.

This commit fixes it by setting the log_level attribute before loading.
To that end, we need to call bpf_object__load_xattr directly instead of
relying on bpf_object__load.

Fixes: 6d61a2b55799 ("lib: add libbpf support")
Signed-off-by: Paul Chaignon <paul@isovalent.com>
Acked-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc: Add support for ce_threshold_value/mask in fq_codel
Toke Høiland-Jørgensen [Wed, 8 Dec 2021 12:45:17 +0000 (13:45 +0100)] 
tc: Add support for ce_threshold_value/mask in fq_codel

Commit dfcb63ce1de6 ("fq_codel: generalise ce_threshold marking for subset
of traffic") added support in fq_codel for setting a value and mask that
will be applied to the diffserv/ECN byte to turn on the ce_threshold
feature for a subset of traffic.

This adds support to iproute for setting these values. The parameter is
called ce_threshold_selector and takes a value followed by a
slash-separated mask. Some examples:

 # apply ce_threshold to ECT(1) traffic
 tc qdisc replace dev eth0 root fq_codel ce_threshold 1ms ce_threshold_selector 0x1/0x3

 # apply ce_threshold to ECN-capable traffic marked as diffserv AF22
 tc qdisc replace dev eth0 root fq_codel ce_threshold 1ms ce_threshold_selector 0x50/0xfc

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc: flower: Fix buffer overflow on large labels
Paul Blakey [Sun, 5 Dec 2021 13:20:25 +0000 (15:20 +0200)] 
tc: flower: Fix buffer overflow on large labels

Buffer is 64bytes, but label printing can take 66bytes printing
in hex, and will overflow when setting the string delimiter ('\0').

Fix that by increasing the print buffer size.

Example of overflowing ct_label:
ct_label 11111111111111111111111111111111/11111111111111111111111111111111

Fixes: 2fffb1c03056 ("tc: flower: Add matching on conntrack info")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: update to if_ether.h
Stephen Hemminger [Fri, 3 Dec 2021 20:20:02 +0000 (12:20 -0800)] 
uapi: update to if_ether.h

Merged from 5.16-rc3

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agobond: add arp_missed_max option
Hangbin Liu [Tue, 30 Nov 2021 04:29:48 +0000 (12:29 +0800)] 
bond: add arp_missed_max option

Bond arp_missed_max is the maximum number of arp_interval monitor cycle
for missed ARP replies. If this number is exceeded, link is reported as
down.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agomptcp: add support for fullmesh flag
Paolo Abeni [Fri, 26 Nov 2021 10:35:44 +0000 (11:35 +0100)] 
mptcp: add support for fullmesh flag

The link kernel supports this endpoint flag since v5.15, let's
expose it to user-space. It allows creation on fullmesh topolgy
via MPTCP subflow.

Additionally update the related man-page, clarifying the behavior
of related options.

Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Fri, 3 Dec 2021 17:17:51 +0000 (10:17 -0700)] 
Update kernel headers

Update kernel headers to commit:
    bb14bfc7eb92 ("net: lan966x: fix a IS_ERR() vs NULL check in lan966x_create_targets()")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip/ipnexthop: fix unsigned overflow in parse_nh_group_type_res()
Maxim Petrov [Wed, 17 Nov 2021 19:11:24 +0000 (22:11 +0300)] 
ip/ipnexthop: fix unsigned overflow in parse_nh_group_type_res()

0UL has type 'unsigned long' which is likely to be 64bit on modern machines. At
the same time, the '{idle,unbalanced}_timer' variables are declared as u32, so
these variables cannot be greater than '~0UL / 100' when 'unsigned long' is 64
bits. In such condition it is still possible to pass the check but get the
overflow later when the timers are multiplied by 100 in 'addattr32'.

Fix the possible overflow by changing '~0UL' to 'UINT32_MAX'.

Fixes: 91676718228b ("nexthop: Add support for resilient nexthop groups")
Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agolib/bpf_legacy: remove always-true check
Maxim Petrov [Tue, 16 Nov 2021 19:32:26 +0000 (22:32 +0300)] 
lib/bpf_legacy: remove always-true check

The 'name' field of the 'struct bpf_prog_info' is a plain C array. Thus, the
logical condition in bpf_dump_prog_info() is useless as the array address is
always true, so just remove it.

Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agordma: update uapi headers
Stephen Hemminger [Thu, 18 Nov 2021 18:00:19 +0000 (10:00 -0800)] 
rdma: update uapi headers

Update the RDMA uapi headers from 5.16.0-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agovdpa: align uapi headers
Stephen Hemminger [Thu, 18 Nov 2021 17:56:57 +0000 (09:56 -0800)] 
vdpa: align uapi headers

Update vdpa headers based on 5.16.0-rc1 and remove redundant
copy.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agovdpa: Remove duplicate vdpa UAPI header file
Parav Pandit [Sat, 6 Nov 2021 06:41:52 +0000 (08:41 +0200)] 
vdpa: Remove duplicate vdpa UAPI header file

vdpa header file is already present in the tree at
vdpa/include/uapi/linux/vdpa.h and used by vdpa/vdpa.c.

As we discussed in thread [1] vdpa header comes from a different
tree, similar to rdma subsystem. Hence remove the duplicate vdpa
UAPI header file.

[1] https://www.spinics.net/lists/netdev/msg748458.html

Fixes: b5a6ed9cc9fc ("uapi: add missing virtio related headers")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
3 years agolnstat: fix buffer overflow in header output
[200~jiangheng [Wed, 17 Nov 2021 21:41:10 +0000 (13:41 -0800)] 
lnstat: fix buffer overflow in header output

Running lnstat will cause core dump from reading past end of array.

Segmentation fault (core dumped)

The maximum  value of th.num_lines is HDR_LINES(10),  h should not be equal to th.num_lines, array th.hdr may be out of bounds.

Signed-off-by jiangheng <jiangheng12@huawei.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH
Maxim Petrov [Wed, 17 Nov 2021 18:05:33 +0000 (21:05 +0300)] 
tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH

Fix the wild bracket in the if clause leading to the error in the condition.

Fixes: d61167dd88b4 ("m_vlan: add pop_eth and push_eth actions")
Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agomptcp: fix JSON output when dumping endpoints by id
Davide Caratti [Thu, 11 Nov 2021 09:52:13 +0000 (10:52 +0100)] 
mptcp: fix JSON output when dumping endpoints by id

iproute ignores '-j' command line argument when dumping endpoints by id:

 [dcaratti@dcaratti iproute2]$ ./ip/ip -j mptcp endpoint show
 [{"address":"1.2.3.4","id":42,"signal":true,"backup":true}]
 [dcaratti@dcaratti iproute2]$ ./ip/ip -j mptcp endpoint show id 42
 1.2.3.4 id 42 signal backup

fix mptcp_addr_show() to use the proper JSON helpers.

Fixes: 7e0767cd862b ("add support for mptcp netlink interface")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoman: tc-u32: Fix page to match new firstfrag behavior
Anssi Hannula [Thu, 4 Nov 2021 14:42:05 +0000 (16:42 +0200)] 
man: tc-u32: Fix page to match new firstfrag behavior

Commit 690b11f4a6b8 ("tc: u32: Fix firstfrag filter.") applied in 2012
changed the "ip firstfrag" selector to not match non-fragmented packets
anymore.

However, the documentation added in f15a23966fff ("tc: add a man page
for u32 filter") in 2015 includes an example that relies on the previous
behavior (non-fragmented packet counted as first fragment).

Due to this, the example does not work correctly and does not actually
classify regular SSH packets.

Modify the example to use a raw u16 selector on the fragment offset to
make it work, and also make the firstfrag description more clear about
the current behavior.

Fixes: f15a23966fff ("tc: add a man page for u32 filter")
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoFix some typos detected by Lintian in manpages
Luca Boccassi [Fri, 5 Nov 2021 23:36:02 +0000 (23:36 +0000)] 
Fix some typos detected by Lintian in manpages

Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: update vdpa.h
Stephen Hemminger [Tue, 9 Nov 2021 18:40:40 +0000 (10:40 -0800)] 
uapi: update vdpa.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge branch 'main' into next
David Ahern [Thu, 4 Nov 2021 15:45:31 +0000 (09:45 -0600)] 
Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoMerge branch 'can-tdc-plus-cleanups' into next
David Ahern [Thu, 4 Nov 2021 15:44:56 +0000 (09:44 -0600)] 
Merge branch 'can-tdc-plus-cleanups' into next

Vincent Mailhol  says:

====================

The main purpose is to add commandline support for Transmitter Delay
Compensation (TDC) in iproute. Other issues found during the
development of this feature also get addressed.

This patch series contains four patches which respectively:

  1. Correct the bittiming ranges in the print_usage function and add
  the units to give more clarity: some parameters are in milliseconds,
  some in nano seconds, some in time quantum and the newly TDC
  parameters introduced in this series would be in clock period.

  2. Do some code refactoring on function print_ctrlmode().

  3. factorize the many print_*(PRINT_JSON, ...) and fprintf
  occurrences in a single print_*(PRINT_ANY, ...) call and fix the
  signedness while doing that.

  4. report the value of the bitrate prescalers (brp and dbrp).

  5. adds command line support for the TDC in iproute and goes together
  with below series in the kernel:
  https://lore.kernel.org/linux-can/20210814091750.73931-1-mailhol.vincent@wanadoo.fr/T/#t

** Changelog **

>From RFC v5 to v6:
  * Dropped the RFC tag because the related patch series on the kernel
    side were pulled into net-next.
  * Remove the changes in include/uapi/linux/can/netlink.h because
    these should be pulled separately.
  * Add another patch (the second of this series) to do some cleanup
    on function print_ctrlmode().
  * Minor fixes in the patch comments (grammar, rephrasing).

>From RFC v4 to RFC v5:
  * Add the unit (bps, tq, ns or ms) in print_usage()
  * Rewrote void can_print_timing_min_max() to better factorize the
    code.
  * Rewrote the commit message of the two last patches (those related
    to TDC) to either add clarification of fix inacurracies.

>From v3 to RFC v4:
  * Reflect the changes made on the kernel side.

>From RFC v2 to v3:
  * Dropped the RFC tag. Now that the kernel patch reach the testing
    branch, I am finaly ready.
  * Regression fix: configuring a link with only nominal bittiming
    returned -EOPNOTSUPP
  * Added two more patches to the series:
      - iplink_can: fix configuration ranges in print_usage()
      - iplink_can: print brp and dbrp bittiming variables
  * Other small fixes on formatting.

>From RFC v1 to RFC v2:
  * Add an additional patch to the series to fix the issues reported
    by Stephen Hemminger
    Ref: https://lore.kernel.org/linux-can/20210506112007.1666738-1-mailhol.vincent@wanadoo.fr/T/#t

====================

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation ...
Vincent Mailhol [Wed, 3 Nov 2021 16:44:28 +0000 (01:44 +0900)] 
iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)

At high bit rates, the propagation delay from the TX pin to the RX pin
of the transceiver causes measurement errors: the sample point on the
RX pin might occur on the previous bit.

This issue is addressed in ISO 11898-1 section 11.3.3 "Transmitter
delay compensation" (TDC).

This patch brings command line support to nine TDC parameters which
were recently added to the kernel's CAN netlink interface in order to
implement TDC:
  - IFLA_CAN_TDC_TDCV_MIN: Transmitter Delay Compensation Value
    minimum value
  - IFLA_CAN_TDC_TDCV_MAX: Transmitter Delay Compensation Value
    maximum value
  - IFLA_CAN_TDC_TDCO_MIN: Transmitter Delay Compensation Offset
    minimum value
  - IFLA_CAN_TDC_TDCO_MAX: Transmitter Delay Compensation Offset
    maximum value
  - IFLA_CAN_TDC_TDCF_MIN: Transmitter Delay Compensation Filter
    window minimum value
  - IFLA_CAN_TDC_TDCF_MAX: Transmitter Delay Compensation Filter
    window maximum value
  - IFLA_CAN_TDC_TDCV: Transmitter Delay Compensation Value
  - IFLA_CAN_TDC_TDCO: Transmitter Delay Compensation Offset
  - IFLA_CAN_TDC_TDCF: Transmitter Delay Compensation Filter window

All those new parameters are nested together into the attribute
IFLA_CAN_TDC.

The TDC parameters extend the FD parameters. As such, the TDC
parameters must be specified together the "fd on" flag.

When "fd on" flag is provided, a tdc-mode parameter allows to specify
how to operate.  Valid options for tdc-mode are:

  * auto: the transmitter dynamically measures TDCV for each of the
    transmitted frames. As such, TDCV can not be manually provided. In
    this mode, the user must specify TDCO and may also specify TDCF if
    supported.

  * manual: use a static TDCV provided by the user. In this mode, the
    user must specify both TDCV and TDCO and may also specify TDCF if
    supported.

  * off: TDC is explicitly disabled.

  * tdc-mode parameter omitted (default mode): the kernel decides
    whether TDC should be enabled or not and if so, it calculates the
    TDC values. TDC parameters are an expert option and the average
    user is not expected to provide those, thus the presence of this
    "default mode".

If the fd flag is omitted, all the FD values (including TDC values)
remain unchanged.

If "fd off" flag is specified, all FD values (including TDC values)
are zeroed.

TDCV is always reported in manual mode. In auto mode, TDCV is reported
only if the value is available. Especially, the TDCV might not be
available if the controller has no feature to report it or if the
value in not yet available (i.e. no data sent yet and measurement did
not occur).

TDCF is reported only if tdcf_max is not zero (i.e. if supported by
the controller).

For reference, here are a few samples of how the output looks like:

| $ ip link set can0 type can bitrate 1000000 dbitrate 8000000 fd on tdco 7 tdcf 8 tdc-mode auto

| $ ip --details link show can0
| 1:  can0: <NOARP,ECHO> mtu 72 qdisc noop state DOWN mode DEFAULT group default qlen 10
|     link/can  promiscuity 0 minmtu 0 maxmtu 0
|     can <FD,TDC-AUTO> state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
|    bitrate 1000000 sample-point 0.750
|    tq 12 prop-seg 29 phase-seg1 30 phase-seg2 20 sjw 1 brp 1
|    ES582.1/ES584.1: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
|    dbitrate 8000000 dsample-point 0.700
|    dtq 12 dprop-seg 3 dphase-seg1 3 dphase-seg2 3 dsjw 1 dbrp 1
|    tdco 7 tdcf 8
|    ES582.1/ES584.1: dtseg1 2..32 dtseg2 1..16 dsjw 1..8 dbrp 1..32 dbrp_inc 1
|    tdco 0..127 tdcf 0..127
|    clock 80000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

| $ ip --details --json --pretty link show can0
| [ {
|         "ifindex": 1,
|         "ifname": "can0",
|         "flags": [ "NOARP","ECHO" ],
|         "mtu": 72,
|         "qdisc": "noop",
|         "operstate": "DOWN",
|         "linkmode": "DEFAULT",
|         "group": "default",
|         "txqlen": 10,
|         "link_type": "can",
|         "promiscuity": 0,
|         "min_mtu": 0,
|         "max_mtu": 0,
|         "linkinfo": {
|             "info_kind": "can",
|             "info_data": {
|                 "ctrlmode": [ "FD","TDC-AUTO" ],
|                 "state": "STOPPED",
|                 "berr_counter": {
|                     "tx": 0,
|                     "rx": 0
|                 },
|                 "restart_ms": 0,
|                 "bittiming": {
|                     "bitrate": 1000000,
|                     "sample_point": "0.750",
|                     "tq": 12,
|                     "prop_seg": 29,
|                     "phase_seg1": 30,
|                     "phase_seg2": 20,
|                     "sjw": 1,
|                     "brp": 1
|                 },
|                 "bittiming_const": {
|                     "name": "ES582.1/ES584.1",
|                     "tseg1": {
|                         "min": 2,
|                         "max": 256
|                     },
|                     "tseg2": {
|                         "min": 2,
|                         "max": 128
|                     },
|                     "sjw": {
|                         "min": 1,
|                         "max": 128
|                     },
|                     "brp": {
|                         "min": 1,
|                         "max": 512
|                     },
|                     "brp_inc": 1
|                 },
|                 "data_bittiming": {
|                     "bitrate": 8000000,
|                     "sample_point": "0.700",
|                     "tq": 12,
|                     "prop_seg": 3,
|                     "phase_seg1": 3,
|                     "phase_seg2": 3,
|                     "sjw": 1,
|                     "brp": 1,
|                     "tdc": {
|                         "tdco": 7,
|                         "tdcf": 8
|                     }
|                 },
|                 "data_bittiming_const": {
|                     "name": "ES582.1/ES584.1",
|                     "tseg1": {
|                         "min": 2,
|                         "max": 32
|                     },
|                     "tseg2": {
|                         "min": 1,
|                         "max": 16
|                     },
|                     "sjw": {
|                         "min": 1,
|                         "max": 8
|                     },
|                     "brp": {
|                         "min": 1,
|                         "max": 32
|                     },
|                     "brp_inc": 1,
|                     "tdc": {
|                         "tdco": {
|                             "min": 0,
|                             "max": 127
|                         },
|                         "tdcf": {
|                             "min": 0,
|                             "max": 127
|                         }
|                     }
|                 },
|                 "clock": 80000000
|             }
|         },
|         "num_tx_queues": 1,
|         "num_rx_queues": 1,
|         "gso_max_size": 65536,
|         "gso_max_segs": 65535
|     } ]

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiplink_can: print brp and dbrp bittiming variables
Vincent Mailhol [Wed, 3 Nov 2021 16:44:27 +0000 (01:44 +0900)] 
iplink_can: print brp and dbrp bittiming variables

Report the value of the bit-rate prescaler (brp) for both the nominal
and the data bittiming.

Currently, only the constant brp values (brp_{min,max,inc}) are being
reported. Also, brp is the only member of struct can_bittiming not
being reported.

Noticeably, brp could be calculated by hand from the other bittiming
parameters with below formula:

        brp = clock * tq / 1000000000

with clock in hertz and tq in nano second (thus the need of a 1
billion factor to convert it back to second).

But because above formula is not so trivial to remember and is
subjected to rounding errors, it makes sense to directly output
{d,}bpr.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: David Ahern <dsahern@kernel.org>