]> git.ipfire.org Git - thirdparty/iproute2.git/log
thirdparty/iproute2.git
2 years agodcb: Do not leave ACKs in socket receive buffer
Ido Schimmel [Tue, 27 Dec 2022 11:03:18 +0000 (13:03 +0200)] 
dcb: Do not leave ACKs in socket receive buffer

Originally, the dcb utility only stopped receiving messages from a
socket when it found the attribute it was looking for. Cited commit
changed that, so that the utility will also stop when seeing an ACK
(NLMSG_ERROR message), by setting the NLM_F_ACK flag on requests.

This is problematic because it means a successful request will leave an
ACK in the socket receive buffer, causing the next request to bail
before reading its response.

Fix that by not stopping when finding the required attribute in a
response. Instead, stop on the subsequent ACK.

Fixes: 84c036972659 ("dcb: unblock mnl_socket_recvfrom if not message received")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoconfigure: Remove include <sys/stat.h>
Hauke Mehrtens [Fri, 23 Dec 2022 17:03:45 +0000 (18:03 +0100)] 
configure: Remove include <sys/stat.h>

The check_name_to_handle_at() function in the configure script is
including sys/stat.h. This include fails with glibc 2.36 like this:
````
In file included from /linux-5.15.84/include/uapi/linux/stat.h:5,
                 from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31,
                 from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465,
                 from config.YExfMc/name_to_handle_at_test.c:3:
/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp]
   10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
      |  ^~~~~~~
In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5,
                 from /linux-5.15.84/include/uapi/linux/types.h:14:
/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
    5 | #include <linux/compiler_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
````

Just removing the include works, the manpage of name_to_handle_at() says
only fcntl.h is needed.

Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented")
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agouapi: update headers to 6.2-rc1
Stephen Hemminger [Tue, 27 Dec 2022 01:57:36 +0000 (17:57 -0800)] 
uapi: update headers to 6.2-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevlink: fix mon json output for trap-policer
Jiri Pirko [Thu, 15 Dec 2022 17:00:56 +0000 (18:00 +0100)] 
devlink: fix mon json output for trap-policer

There is a json footer missed for trap-policer output in "devlink mon".
So add it and fix the json output.

Fixes: a66af5569337 ("devlink: Add devlink trap policer set and show commands")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoMerge branch 'main' into next
David Ahern [Fri, 16 Dec 2022 16:12:38 +0000 (09:12 -0700)] 
Merge branch 'main' into next

Conflicts:
devlink/devlink.c

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agofix version # v6.1.0
Stephen Hemminger [Wed, 14 Dec 2022 17:42:22 +0000 (09:42 -0800)] 
fix version #

2 years agoMerge branch 'new-ipsec-offload-type' into next
David Ahern [Wed, 14 Dec 2022 16:04:31 +0000 (09:04 -0700)] 
Merge branch 'new-ipsec-offload-type' into next

Leon Romanovsky  says:

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

From: Leon Romanovsky <leonro@nvidia.com>

Extend ip tool to support new IPsec offload mode.
Followup of the recently accepted series to netdev.
https://lore.kernel.org/r/20221209093310.4018731-1-steffen.klassert@secunet.com

Changelog:
v1:
 * Changed "full offload" to "packet offload" to be aligned with kernel names.
 * Rebase to latest iproute2-next
v0: https://lore.kernel.org/all/cover.1652179360.git.leonro@nvidia.com

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

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoxfrm: add an interface to offload policy
Leon Romanovsky [Mon, 12 Dec 2022 07:54:06 +0000 (09:54 +0200)] 
xfrm: add an interface to offload policy

Extend at "ip xfrm policy" to allow policy offload to specific device.
The syntax and the code follow already established pattern from the
state offload.

The only difference between them is that direction was already mandatory
argument in policy configuration commands, so don't need to add direction
handling logic like it was done for the state offload.

The syntax is as follows:
 $ ip xfrm policy .... offload packet dev <if-name>

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoxfrm: add packet offload mode to xfrm state
Leon Romanovsky [Mon, 12 Dec 2022 07:54:05 +0000 (09:54 +0200)] 
xfrm: add packet offload mode to xfrm state

Allow users to configure xfrm states with packet offload type.

Packet offload mode:
  ip xfrm state offload packet dev <if-name> dir <in|out>
Crypto offload mode:
  ip xfrm state offload crypto dev <if-name> dir <in|out>
  ip xfrm state offload dev <if-name> dir <in|out>

The latter variant configures crypto offload mode and is needed
to provide backward compatibility.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoxfrm: prepare state offload logic to set mode
Leon Romanovsky [Mon, 12 Dec 2022 07:54:04 +0000 (09:54 +0200)] 
xfrm: prepare state offload logic to set mode

The offload in xfrm state requires to provide device and direction
in order to activate it. However, in the help section, device and
direction were displayed as an optional.

As a preparation to addition of packet offload, let's fix the help
section and refactor the code to be more clear.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoMerge branch 'devlink-port-function' into next
David Ahern [Wed, 14 Dec 2022 16:01:13 +0000 (09:01 -0700)] 
Merge branch 'devlink-port-function' into next

Shay Drory  says:

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

Patch implementing new netlink attribute for devlink-port function got
merged to net-next.
https://lore.kernel.org/netdev/20221206185119.380138-1-shayd@nvidia.com/

Now there is a need to support these new attribute in the userspace
tool. Implement roce and migratable port function attributes in devlink
userspace tool. Update documentation.

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

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: Add documentation for roce and migratable port function attributes
Shay Drory [Sun, 11 Dec 2022 11:58:49 +0000 (13:58 +0200)] 
devlink: Add documentation for roce and migratable port function attributes

New port function attributes roce and migratable were added.
Update the man page for devlink-port to account for new attributes.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: Support setting port function migratable cap
Shay Drory [Sun, 11 Dec 2022 11:58:48 +0000 (13:58 +0200)] 
devlink: Support setting port function migratable cap

Suppor port function commands to enable / disable migratable
capability, this is used to set the port function as migratable.

Live migration is the process of transferring a live virtual machine
from one physical host to another without disrupting its normal
operation.

In order for a VM to be able to perform LM, all the VM components must
be able to perform migration. e.g.: to be migratable.
In order for VF to be migratable, VF must be bound to VFIO driver with
migration support.

When migratable capability is enable for a function of the port, the
device is making the necessary preparations for the function to be
migratable, which might include disabling features which cannot be
migrated.

Example of LM with migratable function configuration:
Set migratable of the VF's port function.

$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0
vfnum 1
    function:
        hw_addr 00:00:00:00:00:00 migratable disable

$ devlink port function set pci/0000:06:00.0/2 migratable enable

$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0
vfnum 1
    function:
        hw_addr 00:00:00:00:00:00 migratable enable

Bind VF to VFIO driver with migration support:
$ echo <pci_id> > /sys/bus/pci/devices/0000:08:00.0/driver/unbind
$ echo mlx5_vfio_pci > /sys/bus/pci/devices/0000:08:00.0/driver_override
$ echo <pci_id> > /sys/bus/pci/devices/0000:08:00.0/driver/bind

Attach VF to the VM.
Start the VM.
Perform LM.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: Support setting port function roce cap
Shay Drory [Sun, 11 Dec 2022 11:58:47 +0000 (13:58 +0200)] 
devlink: Support setting port function roce cap

Support port function commands to enable / disable RoCE, this is used to
control the port RoCE device capabilities.

When RoCE is disabled for a function of the port, function cannot create
any RoCE specific resources (e.g GID table).
It also saves system memory utilization. For example disabling RoCE
enable a VF/SF to save 1 Mbytes of system memory per function.

Example of a PCI VF port which supports a port function:

$ devlink port show pci/0000:06:00.0/2
    pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum
    0 vfnum 1
      function:
        hw_addr 00:00:00:00:00:00 roce enabled

$ devlink port function set pci/0000:06:00.0/2 roce disable

$ devlink port show pci/0000:06:00.0/2
    pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum
    0 vfnum 1
      function:
        hw_addr 00:00:00:00:00:00 roce disabled

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoUpdate kernel headers
David Ahern [Wed, 14 Dec 2022 15:54:03 +0000 (08:54 -0700)] 
Update kernel headers

Update kernel headers to commit:
    7e68dd7d07a2 ("Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agov6.1.0
Stephen Hemminger [Mon, 12 Dec 2022 22:36:54 +0000 (14:36 -0800)] 
v6.1.0

2 years agoman: add missing tc class show
Stephen Hemminger [Mon, 12 Dec 2022 22:30:00 +0000 (14:30 -0800)] 
man: add missing tc class show

"tc class show" is valid sub command but missing from synopsis.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc: make prefix const
Stephen Hemminger [Mon, 12 Dec 2022 21:30:49 +0000 (13:30 -0800)] 
tc: make prefix const

Tcstats functions have prefix argument that can be made const.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoip: print mpls errors on stderr
Stephen Hemminger [Mon, 12 Dec 2022 16:37:40 +0000 (08:37 -0800)] 
ip: print mpls errors on stderr

Error messages should go on stderr.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc: print errors on stderr
Stephen Hemminger [Sat, 10 Dec 2022 03:47:03 +0000 (19:47 -0800)] 
tc: print errors on stderr

Don't mix output and errors.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoiplink: support JSON in MPLS output
Stephen Hemminger [Sat, 10 Dec 2022 03:45:47 +0000 (19:45 -0800)] 
iplink: support JSON in MPLS output

The MPLS statistics did not support oneline or JSON
in current code.

Fixes: 837552b445f5 ("iplink: add support for afstats subcommand")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoip-link: man: Document existence of netns argument in add command
Daniel Xu [Thu, 8 Dec 2022 18:53:06 +0000 (11:53 -0700)] 
ip-link: man: Document existence of netns argument in add command

ip-link-add supports netns argument just like ip-link-set. This commit
documents the existence of netns in help text and man page.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agolibnetlink: Fix memory leak in __rtnl_talk_iov()
Lahav Schlesinger [Mon, 5 Dec 2022 08:47:41 +0000 (10:47 +0200)] 
libnetlink: Fix memory leak in __rtnl_talk_iov()

If `__rtnl_talk_iov` fails then callers are not expected to free `answer`.

Currently if `NLMSG_ERROR` was received with an error then the netlink
buffer was stored in `answer`, while still returning an error

This leak can be observed by running this snippet over time.
This triggers an `NLMSG_ERROR` because for each neighbour update, `ip`
will try to query for the name of interface 9999 in the wrong netns.
(which in itself is a separate bug)

 set -e

 ip netns del test-a || true
 ip netns add test-a
 ip netns del test-b || true
 ip netns add test-b

 ip -n test-a netns set test-b auto
 ip -n test-a link add veth_a index 9999 type veth \
  peer name veth_b netns test-b
 ip -n test-b link set veth_b up

 ip -n test-a monitor link address prefix neigh nsid label all-nsid \
  > /dev/null &
 monitor_pid=$!
 clean() {
  kill $monitor_pid
  ip netns del test-a
  ip netns del test-b
 }
 trap clean EXIT

 while true; do
  ip -n test-b neigh add dev veth_b 1.2.3.4 lladdr AA:AA:AA:AA:AA:AA
  ip -n test-b neigh del dev veth_b 1.2.3.4
 done

Fixes: 55870dfe7f8b ("Improve batch and dump times by caching link lookups")
Signed-off-by: Lahav Schlesinger <lschlesinger@drivenets.com>
Signed-off-by: Gilad Naaman <gnaaman@drivenets.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevlink: update ifname map when message contains DEVLINK_ATTR_PORT_NETDEV_NAME
Jiri Pirko [Mon, 5 Dec 2022 12:21:58 +0000 (13:21 +0100)] 
devlink: update ifname map when message contains DEVLINK_ATTR_PORT_NETDEV_NAME

Recent kernels send PORT_NEW message with when ifname changes,
so benefit from that by having ifnames updated.

Whenever there is a message containing DEVLINK_ATTR_PORT_NETDEV_NAME
attribute, use it to update ifname map.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: push common code to __pr_out_port_handle_start_tb()
Jiri Pirko [Mon, 5 Dec 2022 12:21:57 +0000 (13:21 +0100)] 
devlink: push common code to __pr_out_port_handle_start_tb()

There is a common code in pr_out_port_handle_start() and
pr_out_port_handle_start_arr(). As the next patch is going to extend it
even more, push the code into common helper.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: get devlink port for ifname using RTNL get link command
Jiri Pirko [Mon, 5 Dec 2022 12:21:56 +0000 (13:21 +0100)] 
devlink: get devlink port for ifname using RTNL get link command

Currently, when user specifies ifname as a handle on command line of
devlink, the related devlink port is looked-up in previously taken dump
of all devlink ports on the system. There are 3 problems with that:
1) The dump iterates over all devlink instances in kernel and takes a
   devlink instance lock for each.
2) Dumping all devlink ports would not scale.
3) Alternative ifnames are not exposed by devlink netlink interface.

Instead, benefit from RTNL get link command extension and get the
devlink port handle info from IFLA_DEVLINK_PORT attribute, if supported.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: add ifname_map_add/del() helpers
Jiri Pirko [Mon, 5 Dec 2022 12:21:55 +0000 (13:21 +0100)] 
devlink: add ifname_map_add/del() helpers

Add couple of helpers to alloc/free of map object alongside with list
addition/removal.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoMerge branch 'pcp-prio-apptrust' into next
David Ahern [Thu, 8 Dec 2022 16:23:56 +0000 (09:23 -0700)] 
Merge branch 'pcp-prio-apptrust' into next

Daniel Machon  says:

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

This patch series makes use of the newly introduced [1] DCB_APP_SEL_PCP
selector, for PCP/DEI prioritization, and DCB_ATTR_IEEE_APP_TRUST
attribute for configuring per-selector trust and trust-order.

========================================================================
New parameter "pcp-prio" to existing "app" subcommand:
========================================================================

A new pcp-prio parameter has been added to the app subcommand, which can
be used to classify traffic based on PCP and DEI from the VLAN header.
PCP and DEI is specified in a combination of numerical and symbolic
form, where 'de' (drop-eligible) means DEI=1 and 'nd' (not-drop-eligible)
means DEI=0.

Map PCP 1 and DEI 0 to priority 1
$ dcb app add dev eth0 pcp-prio 1nd:1

Map PCP 1 and DEI 1 to priority 1
$ dcb app add dev eth0 pcp-prio 1de:1

========================================================================
New apptrust subcommand for configuring per-selector trust and trust
order:
========================================================================

This new command currently has a single parameter, which lets you
specify an ordered list of trusted selectors. The microchip sparx5
driver is already enabled to offload said list of trusted selectors. The
new command has been given the name apptrust, to indicate that the trust
covers APP table selectors only. I found that 'apptrust' was better than
plain 'trust' as the latter does not indicate the scope of what is to be
trusted.

Example:

Trust selectors dscp and pcp, in that order:
$ dcb apptrust set dev eth0 order dscp pcp

Trust selectors ethtype, stream-port and pcp, in that order
$ dcb apptrust set dev eth0 order ethtype stream-port pcp

Show the trust order
$ dcb apptrust show dev eth0 order order: ethtype stream-port pcp

A concern was raised here [2], that 'apptrust' would not work well with
matches(), so instead strcmp() has been used to match for the new
subcommand, as suggested here [3]. Same goes with pcp-prio parameter for
dcb app.

The man page for dcb_app has been extended to cover the new pcp-prio
parameter, and a new man page for dcb_apptrust has been created.

[1] https://lore.kernel.org/netdev/20221101094834.2726202-1-daniel.machon@microchip.com/
[2] https://lore.kernel.org/netdev/20220909080631.6941a770@hermes.local/
[3] https://lore.kernel.org/netdev/Y0fP+9C0tE7P2xyK@shredder/

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

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodcb: add new subcommand for apptrust
Daniel Machon [Mon, 5 Dec 2022 22:21:45 +0000 (23:21 +0100)] 
dcb: add new subcommand for apptrust

Add new apptrust subcommand for the dcbnl apptrust extension object.

The apptrust command lets you specify a consecutive ordered list of
trusted selectors, which can be used by drivers to determine which
selectors are eligible (trusted) for packet prioritization, and in which
order.

Selectors are sent in a new nested attribute:
DCB_ATTR_IEEE_APP_TRUST_TABLE.  The nest contains trusted selectors
encapsulated in either DCB_ATTR_IEEE_APP or DCB_ATTR_DCB_APP attributes,
for standard and non-standard selectors, respectively.

Example:

Trust selectors dscp and pcp, in that order
$ dcb apptrust set dev eth0 order dscp pcp

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodcb: add new pcp-prio parameter to dcb app
Daniel Machon [Mon, 5 Dec 2022 22:21:44 +0000 (23:21 +0100)] 
dcb: add new pcp-prio parameter to dcb app

Add new pcp-prio parameter to the app subcommand, which can be used to
classify traffic based on PCP and DEI from the VLAN header. PCP and DEI
is specified in a combination of numerical and symbolic form, where 'de'
(drop-eligible) means DEI=1 and 'nd' (not-drop-eligible) means DEI=0.

Map PCP 1 and DEI 0 to priority 1
$ dcb app add dev eth0 pcp-prio 1nd:1

Map PCP 1 and DEI 1 to priority 1
$ dcb app add dev eth0 pcp-prio 1de:1

Internally, PCP and DEI is encoded in the protocol field of the dcb_app
struct. Each combination of PCP and DEI maps to a priority, thus needing
a range of  0-15. A well formed dcb_app entry for PCP/DEI
prioritization, could look like:

    struct dcb_app pcp = {
        .selector = DCB_APP_SEL_PCP,
.priority = 7,
        .protocol = 15
    }

For mapping PCP=7 and DEI=1 to Prio=7.

Also, three helper functions for translating between std and non-std APP
selectors, have been added to dcb_app.c and exposed through dcb.h.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: support direct region read requests
Jacob Keller [Mon, 5 Dec 2022 22:59:31 +0000 (14:59 -0800)] 
devlink: support direct region read requests

The kernel has gained support for reading from regions without needing to
create a snapshot. To use this support, the DEVLINK_ATTR_REGION_DIRECT
attribute must be added to the command.

For the "read" command, if the user did not specify a snapshot, add the new
attribute to request a direct read. The "dump" command will still require a
snapshot. While technically a dump could be performed without a snapshot it
is not guaranteed to be atomic unless the region size is no larger than
256 bytes.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agolibnetlink: Fix wrong netlink header placement
Ido Schimmel [Thu, 8 Dec 2022 14:38:16 +0000 (16:38 +0200)] 
libnetlink: Fix wrong netlink header placement

The netlink header must be first in the netlink message, so move it
there.

Fixes: fee4a56f0191 ("Update kernel headers")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agotc: ct: Fix invalid pointer dereference
Roi Dayan [Wed, 7 Dec 2022 08:22:13 +0000 (10:22 +0200)] 
tc: ct: Fix invalid pointer dereference

Using macro NEXT_ARG_FWD does not validate argc.
Use macro NEXT_ARG which validates argc while parsing args
in the same loop iteration.

Fixes: c8a494314c40 ("tc: Introduce tc ct action")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevlink: Fix setting parent for 'rate add'
Michal Wilczynski [Thu, 1 Dec 2022 10:18:10 +0000 (11:18 +0100)] 
devlink: Fix setting parent for 'rate add'

Setting a parent during creation of the node doesn't work, despite
documentation [1] clearly saying that it should.

[1] man/man8/devlink-rate.8

Example:
$ devlink port function rate add pci/0000:4b:00.0/node_custom parent node_0
  Unknown option "parent"

Fix this by passing DL_OPT_PORT_FN_RATE_PARENT as an argument to
dl_argv_parse() when it gets called from cmd_port_fn_rate_add().

Fixes: 6c70aca76ef2 ("devlink: Add port func rate support")
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevlink: Add documentation for tx_prority and tx_weight
Michal Wilczynski [Thu, 1 Dec 2022 10:26:26 +0000 (11:26 +0100)] 
devlink: Add documentation for tx_prority and tx_weight

New netlink attributes tx_priority and tx_weight were added.
Update the man page for devlink-rate to account for new attributes.

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: Introduce new attribute 'tx_weight' to devlink-rate
Michal Wilczynski [Thu, 1 Dec 2022 10:26:25 +0000 (11:26 +0100)] 
devlink: Introduce new attribute 'tx_weight' to devlink-rate

To fully utilize hierarchical QoS algorithm new attribute 'tx_weight'
needs to be introduced. Weight attribute allows for usage of Weighted
Fair Queuing arbitration scheme among siblings. This arbitration
scheme can be used simultaneously with the strict priority.

Introduce ability to configure tx_weight from devlink userspace
utility. Make the new attribute optional.

Example commands:
$ devlink port function rate add pci/0000:4b:00.0/node_custom \
  tx_weight 50 parent node_0

$ devlink port function rate set pci/0000:4b:00.0/2 tx_weight 20

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agodevlink: Introduce new attribute 'tx_priority' to devlink-rate
Michal Wilczynski [Thu, 1 Dec 2022 10:26:24 +0000 (11:26 +0100)] 
devlink: Introduce new attribute 'tx_priority' to devlink-rate

To fully utilize hierarchical QoS algorithm new attribute 'tx_priority'
needs to be introduced. Priority attribute allows for usage of strict
priority arbiter among siblings. This arbitration scheme attempts to
schedule nodes based on their priority as long as the nodes remain within
their bandwidth limit.

Introduce ability to configure tx_priority from devlink userspace
utility. Make the new attribute optional.

Example commands:
$ devlink port function rate add pci/0000:4b:00.0/node_custom \
  tx_priority 5 parent node_0
$ devlink port function rate set pci/0000:4b:00.0/2 tx_priority 5

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoMerge branch 'main' into next
David Ahern [Fri, 2 Dec 2022 15:59:28 +0000 (08:59 -0700)] 
Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoUpdate kernel headers
David Ahern [Fri, 2 Dec 2022 15:57:25 +0000 (08:57 -0700)] 
Update kernel headers

Update kernel headers to commit:
    dbadae927287 ("tsnep: Rework RX buffer allocation")

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agotestsuite: Add test for ip --json neigh get
Leonard Crestez [Thu, 1 Dec 2022 21:41:06 +0000 (23:41 +0200)] 
testsuite: Add test for ip --json neigh get

Signed-off-by: Leonard Crestez <cdleonard@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoip neigh: Support --json on ip neigh get
Leonard Crestez [Thu, 1 Dec 2022 21:41:05 +0000 (23:41 +0200)] 
ip neigh: Support --json on ip neigh get

The ip neigh command supports --json for "list" but not for "get". Add
json support for the "get" command so that it's possible to fetch
information about specific neighbors without regular expressions.

Fixes: aac7f725fa46 ("ipneigh: add color and json support")
Signed-off-by: Leonard Crestez <cdleonard@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agovdpa: allow provisioning device features
Jason Wang [Tue, 29 Nov 2022 04:28:16 +0000 (12:28 +0800)] 
vdpa: allow provisioning device features

This patch allows device features to be provisioned via vdpa. This
will be useful for preserving migration compatibility between source
and destination:

# vdpa dev add name dev1 mgmtdev pci/0000:02:00.0 device_features 0x300020000
# vdpa dev config show dev1
# dev1: mac 52:54:00:12:34:56 link up link_announce false mtu 65535
      negotiated_features CTRL_VQ VERSION_1 ACCESS_PLATFORM

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agotaprio: fix wrong for loop condition in add_tc_entries()
Tan Tee Min [Fri, 2 Dec 2022 06:25:42 +0000 (14:25 +0800)] 
taprio: fix wrong for loop condition in add_tc_entries()

The for loop in add_tc_entries() mistakenly included the last entry
index+1. Fix it to correctly loop the max_sdu entry between tc=0 and
num_max_sdu_entries-1.

Fixes: b10a6509c195 ("taprio: support dumping and setting per-tc max SDU")
Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agotc/basic: fix json output filter
Stephen Hemminger [Thu, 1 Dec 2022 15:30:54 +0000 (07:30 -0800)] 
tc/basic: fix json output filter

The flowid and handle in basic were not using JSON routines to print.
 To reproduce the issue:

 $ tc qdisc add dev eth1 handle ffff: ingress
 $ tc filter add dev eth1 parent ffff: prio 20 protocol all u32 match ip dport 22 \
     0xffff action police conform-exceed drop/ok rate 100000 burst 15k flowid ffff:1

 $ tc filter add dev eth1 parent ffff: prio 255 protocol all basic action police \
     conform-exceed drop/ok rate 100000 burst 15k flowid ffff:3

Reported-by: Christian Pössinger <christian@poessinger.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoip: fix return value for rtnl_talk failures
Hangbin Liu [Tue, 8 Nov 2022 12:43:44 +0000 (20:43 +0800)] 
ip: fix return value for rtnl_talk failures

Since my last commit "rtnetlink: add new function rtnl_echo_talk()" we
return the kernel rtnl exit code directly, which breaks some kernel
selftest checking. As there are still a lot of tests checking -2 as the
error return value, to keep backward compatibility, let's keep using
-2 for all the rtnl return values.

Reported-by: Ido Schimmel <idosch@idosch.org>
Fixes: 6c09257f1bf6 ("rtnetlink: add new function rtnl_echo_talk()")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevlink: load ifname map on demand from ifname_map_rev_lookup() as well
Jiri Pirko [Wed, 9 Nov 2022 12:48:51 +0000 (13:48 +0100)] 
devlink: load ifname map on demand from ifname_map_rev_lookup() as well

Commit 5cddbb274eab ("devlink: load port-ifname map on demand") changed
the ifname map to be loaded on demand from ifname_map_lookup(). However,
it didn't put this on-demand loading into ifname_map_rev_lookup() which
causes ifname_map_rev_lookup() to return -ENOENT all the time.

Fix this by triggering on-demand ifname map load
from ifname_map_rev_lookup() as well.

Fixes: 5cddbb274eab ("devlink: load port-ifname map on demand")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc: put size table options in json object
Stephen Hemminger [Fri, 25 Nov 2022 18:48:02 +0000 (10:48 -0800)] 
tc: put size table options in json object

Missed this part from earlier change.

Fixes: 6af6f02cce42 ("tc: add json support to size table")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc_util: Change datatype for maj to avoid overflow issue
Lai Peter Jun Ann [Mon, 21 Nov 2022 02:29:09 +0000 (10:29 +0800)] 
tc_util: Change datatype for maj to avoid overflow issue

The return value by stroul() is unsigned long int. Hence the datatype
for maj should defined as unsigned long to avoid overflow issue.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc_util: Fix no error return when large parent id used
Lai Peter Jun Ann [Thu, 17 Nov 2022 05:33:17 +0000 (13:33 +0800)] 
tc_util: Fix no error return when large parent id used

This patch is to fix the issue where there is no error return
when large value of parent ID is being used. The return value by
stroul() is unsigned long int. Hence the datatype for maj and min
should defined as unsigned long to avoid overflow issue.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc: add json support to size table
Stephen Hemminger [Wed, 23 Nov 2022 04:16:07 +0000 (20:16 -0800)] 
tc: add json support to size table

Fix the JSON output if size addaption table is used.

Example:
[ {
        "kind": "fq_codel",
        "handle": "1:",
        "dev": "enp2s0",
        "root": true,
        "refcnt": 2,
        "options": {
            "limit": 10240,
            "flows": 1024,
            "quantum": 1514,
            "target": 4999,
            "interval": 99999,
            "memory_limit": 33554432,
            "ecn": true,
            "drop_batch": 64
        },
        "stab": {
            "overhead": 30,
            "mpu": 68,
            "mtu": 2047,
            "tsize": 512
        }
    } ]

Remove fixed prefix arg and no longer needed fp arg.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoremove #if 0 code
Stephen Hemminger [Wed, 23 Nov 2022 03:01:23 +0000 (19:01 -0800)] 
remove #if 0 code

Let's not keep unused code. The YAGNI means that this dead
code doesn't work now, and if it did it would have to change.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agouapi: update for in.h and ip.h
Stephen Hemminger [Tue, 22 Nov 2022 19:33:49 +0000 (11:33 -0800)] 
uapi: update for in.h and ip.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agotc_stab: remove dead code
Stephen Hemminger [Mon, 21 Nov 2022 19:04:53 +0000 (11:04 -0800)] 
tc_stab: remove dead code

This code to print the STAB table is not supportable,
not converting to JSON.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agobridge: Remove unused function argument
Benjamin Poirier [Tue, 15 Nov 2022 21:07:15 +0000 (16:07 -0500)] 
bridge: Remove unused function argument

print_vnifilter_rtm() was probably modeled on print_vlan_rtm() but the
'monitor' argument is unused in the vnifilter case.

Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoMerge branch 'main' into next
David Ahern [Mon, 14 Nov 2022 02:29:25 +0000 (19:29 -0700)] 
Merge branch 'main' into next

Conflicts:
include/uapi/linux/bpf.h

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoman: bridge: Reword description of "locked" bridge port option
Ido Schimmel [Sun, 6 Nov 2022 11:39:57 +0000 (13:39 +0200)] 
man: bridge: Reword description of "locked" bridge port option

Adjust the description to mention the "no_linklocal_learn" bridge option
and make sure it is consistent between both the bridge(8) and ip-link(8)
man pages.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agobridge: link: Add MAC Authentication Bypass (MAB) support
Hans Schultz [Sun, 6 Nov 2022 11:39:56 +0000 (13:39 +0200)] 
bridge: link: Add MAC Authentication Bypass (MAB) support

Add MAB support in bridge(8) and ip(8), allowing these utilities to
enable / disable MAB and display its current status.

Signed-off-by: Hans Schultz <netdev@kapio-technology.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agobridge: fdb: Add support for locked FDB entries
Hans Schultz [Sun, 6 Nov 2022 11:39:55 +0000 (13:39 +0200)] 
bridge: fdb: Add support for locked FDB entries

Print the "locked" FDB flag when it is set in the 'NDA_FLAGS_EXT'
attribute. Example output:

 # bridge fdb get 00:11:22:33:44:55 br br0
 00:11:22:33:44:55 dev swp1 locked master br0

 # bridge -j -p fdb get 00:11:22:33:44:55 br br0
 [ {
         "mac": "00:11:22:33:44:55",
         "ifname": "swp1",
         "flags": [ "locked" ],
         "master": "br0",
         "state": ""
     } ]

Signed-off-by: Hans Schultz <netdev@kapio-technology.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agoUpdate kernel headers
David Ahern [Mon, 7 Nov 2022 15:47:16 +0000 (08:47 -0700)] 
Update kernel headers

Update kernel headers to commit:
    bf46390f39c6 ("Merge branch 'genetlink-per-op-type-policies'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2 years agojson: do not escape single quotes
Andrea Claudi [Thu, 3 Nov 2022 17:39:25 +0000 (18:39 +0100)] 
json: do not escape single quotes

ECMA-404 standard does not include single quote character among the json
escape sequences. This means single quotes does not need to be escaped.

Indeed the single quote escape produces an invalid json output:

$ ip link add "john's" type dummy
$ ip link show "john's"
9: john's: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether c6:8e:53:f6:a3:4b brd ff:ff:ff:ff:ff:ff
$ ip -j link | jq .
parse error: Invalid escape at line 1, column 765

This can be fixed removing the single quote escape in jsonw_puts.
With this patch in place:

$ ip -j link | jq .[].ifname
"lo"
"john's"

Fixes: fcc16c2287bf ("provide common json output formatter")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
3 years agotaprio: support dumping and setting per-tc max SDU
Vladimir Oltean [Fri, 28 Oct 2022 11:50:53 +0000 (14:50 +0300)] 
taprio: support dumping and setting per-tc max SDU

The 802.1Q queueMaxSDU table is technically implemented in Linux as
the TCA_TAPRIO_TC_ENTRY_MAX_SDU attribute of the TCA_TAPRIO_ATTR_TC_ENTRY
nest. Multiple TCA_TAPRIO_ATTR_TC_ENTRY nests may appear in the netlink
message, one per traffic class. Other configuration items that are per
traffic class are also supposed to go there.

This is done for future extensibility of the netlink interface (I have
the feeling that the struct tc_mqprio_qopt passed through
TCA_TAPRIO_ATTR_PRIOMAP is not exactly extensible, which kind of defeats
the purpose of using netlink). But otherwise, the max-sdu is parsed from
the user, and printed, just like any other fixed-size 16 element array.

I've modified the example for a fully offloaded configuration (flags 2)
to also show a max-sdu use case. The gate intervals were 0x80 (for TC 7),
0xa0 (for TCs 7 and 5) and 0xdf (for TCs 7, 6, 4, 3, 2, 1, 0).
I modified the last gate to exclude TC 7 (df -> 5f), so that TC 7 now
only interferes with TC 5.

Output after running the full offload command from the man page example
(the new attribute is "max-sdu"):

$ tc qdisc show dev swp0 root
qdisc taprio 8002: root tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0
queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 offset 4 count 1 offset 5 count 1 offset 6 count 1 offset 7 count 1
 flags 0x2      base-time 200 cycle-time 100000 cycle-time-extension 0
        index 0 cmd S gatemask 0x80 interval 20000
        index 1 cmd S gatemask 0xa0 interval 20000
        index 2 cmd S gatemask 0x5f interval 60000
max-sdu 0 0 0 0 0 200 0 0 0 0 0 0 0 0 0 0

$ tc -j -p qdisc show dev eno0 root
[ {
        "kind": "taprio",
        "handle": "8002:",
        "root": true,
        "options": {
            "tc": 8,
            "map": [ 0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0 ],
            "queues": [ {
                    "offset": 0,
                    "count": 1
                },{
                    "offset": 1,
                    "count": 1
                },{
                    "offset": 2,
                    "count": 1
                },{
                    "offset": 3,
                    "count": 1
                },{
                    "offset": 4,
                    "count": 1
                },{
                    "offset": 5,
                    "count": 1
                },{
                    "offset": 6,
                    "count": 1
                },{
                    "offset": 7,
                    "count": 1
                } ],
            "flags": "0x2",
            "base_time": 200,
            "cycle_time": 100000,
            "cycle_time_extension": 0,
            "schedule": [ {
                    "index": 0,
                    "cmd": "S",
                    "gatemask": "0x80",
                    "interval": 20000
                },{
                    "index": 1,
                    "cmd": "S",
                    "gatemask": "0xa0",
                    "interval": 20000
                },{
                    "index": 2,
                    "cmd": "S",
                    "gatemask": "0x5f",
                    "interval": 60000
                } ],
            "max-sdu": [ 0,0,0,0,0,200,0,0,0,0,0,0,0,0,0,0 ]
        }
    } ]

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip-monitor: Do not error out when RTNLGRP_STATS is not available
Benjamin Poirier [Wed, 26 Oct 2022 06:49:07 +0000 (15:49 +0900)] 
ip-monitor: Do not error out when RTNLGRP_STATS is not available

Following commit 4e8a9914c4d4 ("ip-monitor: Include stats events in default
and "all" cases"), `ip monitor` fails to start on kernels which do not
contain linux.git commit 5fd0b838efac ("net: rtnetlink: Add UAPI toggle for
IFLA_OFFLOAD_XSTATS_L3_STATS") because the netlink group RTNLGRP_STATS
doesn't exist:

 $ ip monitor
 Failed to add stats group to list

When "stats" is not explicitly requested, ignore the error so that `ip
monitor` and `ip monitor all` continue to work on older kernels.

Note that the same change is not done for RTNLGRP_NEXTHOP because its value
is 32 and group numbers <= 32 are always supported; see the comment above
netlink_change_ngroups() in the kernel source. Therefore
NETLINK_ADD_MEMBERSHIP 32 does not error out even on kernels which do not
support RTNLGRP_NEXTHOP.

v2:
* Silently ignore a failure to implicitly add the stats group, instead of
  printing a warning.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Fixes: 4e8a9914c4d4 ("ip-monitor: Include stats events in default and "all" cases")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agogenl: remove unused vars in Makefile
Andrea Claudi [Sun, 23 Oct 2022 16:41:01 +0000 (18:41 +0200)] 
genl: remove unused vars in Makefile

Both GENLLIB and LIBUTIL are not used in genl Makefile, let's get rid of
them.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotestsuite: fix build failure
Andrea Claudi [Sun, 23 Oct 2022 15:37:11 +0000 (17:37 +0200)] 
testsuite: fix build failure

After commit 6c09257f1bf6 ("rtnetlink: add new function
rtnl_echo_talk()") "make check" results in:

$ make check

make -C testsuite
make -C iproute2 configure
make -C testsuite alltests
make -C tools
    CC       generate_nlmsg
/usr/bin/ld: /tmp/cc6YaGBM.o: in function `rtnl_echo_talk':
libnetlink.c:(.text+0x25bd): undefined reference to `new_json_obj'
/usr/bin/ld: libnetlink.c:(.text+0x25c7): undefined reference to `open_json_object'
/usr/bin/ld: libnetlink.c:(.text+0x25e3): undefined reference to `close_json_object'
/usr/bin/ld: libnetlink.c:(.text+0x25e8): undefined reference to `delete_json_obj'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:6: generate_nlmsg] Error 1
make[1]: *** [Makefile:40: generate_nlmsg] Error 2
make: *** [Makefile:130: check] Error 2

This is due to json function calls included in libutil and not in
libnetlink. Fix this adding libutil.a to the tools Makefile, and linking
against libcap as required by libutil itself.

Fixes: 6c09257f1bf6 ("rtnetlink: add new function rtnl_echo_talk()")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoss: re-add TIPC query support
Matthieu Baerts [Mon, 17 Oct 2022 17:03:08 +0000 (19:03 +0200)] 
ss: re-add TIPC query support

TIPC support has been introduced in 'iproute-master' (not -next) in
commit 5caf79a0 ("ss: Add support for TIPC socket diag in ss tool"), at
the same time a refactoring introducing filter_db_parse() was done, see
commit 67d5fd55 ("ss: Put filter DB parsing into a separate function")
from iproute2-next.

When the two commits got merged, the support for TIPC has been
apparently accidentally dropped.

This simply adds the missing entry for TIPC.

Fixes: 2c62a64d ("Merge branch 'iproute2-master' into iproute2-next")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoss: usage: add missing parameters
Matthieu Baerts [Mon, 17 Oct 2022 17:03:07 +0000 (19:03 +0200)] 
ss: usage: add missing parameters

These query entries were in the man page but not in 'ss -h':

- packet_raw
- packet_dgram
- dccp
- sctp
- xdp (+ the --xdp option)

I only created one commit with all: this fixes multiple commits but all
on the same line.

The only exception is with '--xdp' parameter which is linked to
commit 2abc3d76 ("ss: add AF_XDP support").

Fixes: aba5acdf ("(Logical change 1.3)") # packet raw/dgram
Fixes: 351efcde ("Update header files to 2.6.14") # dccp
Fixes: f89d46ad ("ss: Add support for SCTP protocol") # sctp
Fixes: 2abc3d76 ("ss: add AF_XDP support") # xdp
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoss: man: add missing entries for TIPC
Matthieu Baerts [Mon, 17 Oct 2022 17:03:06 +0000 (19:03 +0200)] 
ss: man: add missing entries for TIPC

'ss -h' was mentioning TIPC but not the man page.

Fixes: 5caf79a0 ("ss: Add support for TIPC socket diag in ss tool")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoss: man: add missing entries for MPTCP
Matthieu Baerts [Mon, 17 Oct 2022 17:03:05 +0000 (19:03 +0200)] 
ss: man: add missing entries for MPTCP

'ss -h' was mentioning MPTCP but not the man page.

While at it, also add the missing '.' at the end of the list, before the
new sentence.

Fixes: 9c3be2c0 ("ss: mptcp: add msk diag interface support")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodcb: unblock mnl_socket_recvfrom if not message received
Junxin Chen [Wed, 19 Oct 2022 01:20:08 +0000 (09:20 +0800)] 
dcb: unblock mnl_socket_recvfrom if not message received

Currently, the dcb command sinks to the kernel through the netlink
to obtain information. However, if the kernel fails to obtain infor-
mation or is not processed, the dcb command is suspended.

For example, if we don't implement dcbnl_ops->ieee_getpfc in the
kernel, the command "dcb pfc show dev eth1" will be stuck and subsequent
commands cannot be executed.

This patch adds the NLM_F_ACK flag to the netlink in mnlu_msg_prepare
to ensure that the kernel responds to user requests.

After the problem is solved, the execution result is as follows:
$ dcb pfc show dev eth1
Attribute not found: Success

Fixes: 67033d1c1c8a ("Add skeleton of a new tool, dcb")
Signed-off-by: Junxin Chen <chenjunxin1@huawei.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoiplink_can: add missing `]' of the bitrate, dbitrate and termination arrays
Vincent Mailhol [Mon, 10 Oct 2022 14:16:38 +0000 (23:16 +0900)] 
iplink_can: add missing `]' of the bitrate, dbitrate and termination arrays

The command "ip --details link show canX" misses the closing bracket
`]' of the bitrate, the dbitrate and the termination arrays. The --json
output is not impacted.

Change the first argument of close_json_array() from PRINT_JSON to
PRINT_ANY to fix the problem. The second argument was already set
correctly.

Fixes: 67f3c7a5cc0d ("iplink_can: use PRINT_ANY to factorize code and fix signedness")
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agou32: fix json formatting of flowid
Stephen Hemminger [Thu, 13 Oct 2022 15:30:34 +0000 (08:30 -0700)] 
u32: fix json formatting of flowid

The code to print json was not done for the flow id.
This would lead to incorrect JSON format output.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: update from 6.1 pre rc1
Stephen Hemminger [Tue, 11 Oct 2022 14:17:28 +0000 (07:17 -0700)] 
uapi: update from 6.1 pre rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge branch 'merge' of ../iproute2-next
Stephen Hemminger [Tue, 11 Oct 2022 14:14:19 +0000 (07:14 -0700)] 
Merge branch 'merge' of ../iproute2-next

3 years agof_flower: Introduce L2TPv3 support
Wojciech Drewek [Fri, 7 Oct 2022 07:51:01 +0000 (09:51 +0200)] 
f_flower: Introduce L2TPv3 support

Add support for matching on L2TPv3 session ID.
Session ID can be specified only when ip proto was
set to IPPROTO_L2TP.

L2TPv3 might be transported over IP or over UDP,
this implementation is only about L2TPv3 over IP.
IPv6 is also supported, in this case next header
is set to IPPROTO_L2TP.

Example filter:
  # tc filter add dev eth0 ingress prio 1 protocol ip \
      flower \
        ip_proto l2tp \
        l2tpv3_sid 1234 \
        skip_sw \
      action drop

Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotaprio: don't print the clockid if invalid
Vladimir Oltean [Tue, 4 Oct 2022 12:00:27 +0000 (15:00 +0300)] 
taprio: don't print the clockid if invalid

The clockid will not be reported by the kernel if the qdisc is fully
offloaded, since it is implicitly the PTP Hardware Clock of the device.

Currently "tc qdisc show" points us to a "clockid invalid" for a qdisc
created with "flags 0x2", let's hide that attribute instead.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoman: ss.8: fix a typo
Andrea Claudi [Tue, 4 Oct 2022 14:25:03 +0000 (16:25 +0200)] 
man: ss.8: fix a typo

Fixes: f76ad635f21d ("man: break long lines in man page sources")
Reported-by: Prijesh Patel <prpatel@redhat.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
3 years agov6.0.0 v6.0.0
Stephen Hemminger [Tue, 4 Oct 2022 15:17:15 +0000 (08:17 -0700)] 
v6.0.0

3 years agoss: fix duplicate include
Stephen Hemminger [Tue, 4 Oct 2022 15:11:01 +0000 (08:11 -0700)] 
ss: fix duplicate include

No need to include rt_names.h twice.

Fixes: 31f45088c9c8 ("build: fix build failure with -fno-common")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoMerge remote-tracking branch 'main/main' into next
David Ahern [Mon, 3 Oct 2022 14:51:23 +0000 (08:51 -0600)] 
Merge remote-tracking branch 'main/main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip: xfrm: support adding xfrm metadata as lwtunnel info in routes
Eyal Birger [Mon, 3 Oct 2022 09:12:12 +0000 (12:12 +0300)] 
ip: xfrm: support adding xfrm metadata as lwtunnel info in routes

Support for xfrm metadata as lwtunnel metadata was added in kernel commit
2c2493b9da91 ("xfrm: lwtunnel: add lwtunnel support for xfrm interfaces in collect_md mode")

This commit adds the respective support in lwt routes.

Example use (consider ipsec1 as an xfrm interface in "external" mode):

ip route add 10.1.0.0/24 dev ipsec1 encap xfrm if_id 1

Or in the context of vrf, one can also specify the "link" property:

ip route add 10.1.0.0/24 dev ipsec1 encap xfrm if_id 1 link_dev eth15

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip: xfrm: support "external" (`collect_md`) mode in xfrm interfaces
Eyal Birger [Mon, 3 Oct 2022 09:12:11 +0000 (12:12 +0300)] 
ip: xfrm: support "external" (`collect_md`) mode in xfrm interfaces

Support for collect metadata mode was introduced in kernel commit
abc340b38ba2 ("xfrm: interface: support collect metadata mode")

This commit adds support for creating xfrm interfaces in this
mode.

Example use:

ip link add ipsec1 type xfrm external

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Mon, 3 Oct 2022 14:42:41 +0000 (08:42 -0600)] 
Update kernel headers

Update kernel headers to commit:
    62c07983bef9 ("once: add DO_ONCE_SLOW() for sleepable contexts")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoiplink_bridge: Add no_linklocal_learn option support
Ido Schimmel [Sat, 1 Oct 2022 14:35:51 +0000 (17:35 +0300)] 
iplink_bridge: Add no_linklocal_learn option support

Kernel commit 70e4272b4c81 ("net: bridge: add no_linklocal_learn bool
option") added the no_linklocal_learn bridge option that can be set via
sysfs or netlink.

Add iproute2 support, allowing it to query and set the option via
netlink.

The option is useful, for example, in scenarios where we want the bridge
to be able to refresh dynamic FDB entries that were added by user space
and are pointing to locked bridge ports, but do not want the bridge to
populate its FDB from EAPOL frames used for authentication.

Example:

 $ ip -j -d link show dev br0 | jq ".[][\"linkinfo\"][\"info_data\"][\"no_linklocal_learn\"]"
 0
 $ cat /sys/class/net/br0/bridge/no_linklocal_learn
 0

 # ip link set dev br0 type bridge no_linklocal_learn 1

 $ ip -j -d link show dev br0 | jq ".[][\"linkinfo\"][\"info_data\"][\"no_linklocal_learn\"]"
 1
 $ cat /sys/class/net/br0/bridge/no_linklocal_learn
 1

 # ip link set dev br0 type bridge no_linklocal_learn 0

 $ ip -j -d link show dev br0 | jq ".[][\"linkinfo\"][\"info_data\"][\"no_linklocal_learn\"]"
 0
 $ cat /sys/class/net/br0/bridge/no_linklocal_learn
 0

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Sun, 2 Oct 2022 22:45:25 +0000 (16:45 -0600)] 
Update kernel headers

Update kernel headers to commit:
    bc37b24ee05e ("Merge branch 'mlx5-xsk-updates-part3-2022-09-30'")

Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: fix man page for linecard
Stephen Hemminger [Fri, 30 Sep 2022 19:40:44 +0000 (12:40 -0700)] 
devlink: fix man page for linecard

Doing make check on iproute2 runs several checks including man page
checks for common errors. Recent addition of linecard support to
devlink introduced this error.

Checking manpages for syntax errors...
an-old.tmac: <standard input>: line 31: 'R' is a string (producing the registered sign), not a macro.
Error in devlink-lc.8

Fixes: 4cb0bec3744a ("devlink: add support for linecard show and type set")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoip-monitor: Fix the selection of rtnl groups when listening for all object types
Benjamin Poirier [Thu, 22 Sep 2022 06:19:38 +0000 (15:19 +0900)] 
ip-monitor: Fix the selection of rtnl groups when listening for all object types

Currently, when using `ip monitor`, family-specific rtnl multicast groups
(ex. RTNLGRP_IPV4_IFADDR) are used when specifying the '-family' option (or
one of its short forms) and an object type is specified (ex. `ip -4 monitor
addr`) but not when listening for changes to all object types (ex. `ip -4
monitor`). In that case, multicast groups for all families, regardless of
the '-family' option, are used. Depending on the object type, this leads to
ignoring the '-family' selection (MROUTE, ADDR, NETCONF), or printing stray
prefix headers with no event (ROUTE, RULE).

Rewrite the parameter parsing code so that per-family rtnl multicast groups
are selected in all cases.

The issue can be witnessed while running `ip -4 monitor label` at the same
time as the following command:
ip link add dummy0 address 02:00:00:00:00:01 up type dummy
The output includes:
[ROUTE][ROUTE][ADDR]9: dummy0    inet6 fe80::ff:fe00:1/64 scope link
       valid_lft forever preferred_lft forever
Notice the stray "[ROUTE]" labels (related to filtered out ipv6 routes) and
the ipv6 ADDR entry. Those do not appear if using `ip -4 monitor label
route address`.

Fixes: aba5acdfdb34 ("(Logical change 1.3)")
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoip-monitor: Include stats events in default and "all" cases
Benjamin Poirier [Thu, 22 Sep 2022 06:19:37 +0000 (15:19 +0900)] 
ip-monitor: Include stats events in default and "all" cases

It seems that stats were omitted from `ip monitor` and `ip monitor all`.
Since all other event types are included, include stats as well. Use the
same logic as for nexthops.

Fixes: a05a27c07cbf ("ipmonitor: Add monitoring support for stats events")
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoip-monitor: Do not listen for nexthops by default when specifying stats
Benjamin Poirier [Thu, 22 Sep 2022 06:19:36 +0000 (15:19 +0900)] 
ip-monitor: Do not listen for nexthops by default when specifying stats

`ip monitor stats` listens for changes to nexthops and stats. It should
listen for stats only.

Fixes: a05a27c07cbf ("ipmonitor: Add monitoring support for stats events")
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agobridge: Do not print stray prefixes in monitor mode
Benjamin Poirier [Thu, 22 Sep 2022 06:19:35 +0000 (15:19 +0900)] 
bridge: Do not print stray prefixes in monitor mode

When using `bridge monitor` with the '-timestamp' option or the "all"
parameter, prefixes are printed before the actual event descriptions.
Currently, those prefixes are printed for each netlink message that's
received. However, some netlink messages do not lead to an event
description being printed. That's usually because a message is not related
to AF_BRIDGE. This results in stray prefixes being printed.

Restructure accept_msg() and its callees such that prefixes are only
printed after a message has been checked for eligibility.

The issue can be witnessed using the following commands:
ip link add dummy0 type dummy
# Start `bridge monitor all` now in another terminal.
# Cause a stray "[LINK]" to be printed (family 10).
# It does not appear yet because the output is line buffered.
ip link set dev dummy0 up
# Cause a stray "[NEIGH]" to be printed (family 2).
ip neigh add 10.0.0.1 lladdr 02:00:00:00:00:01 dev dummy0
# Cause a genuine entry to be printed, which flushes the previous
# output.
bridge fdb add 02:00:00:00:00:01 dev dummy0
# We now see:
# [LINK][NEIGH][NEIGH]02:00:00:00:00:01 dev dummy0 self permanent

Fixes: d04bc300c3e3 ("Add bridge command")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agouapi: update of if_tun.h
Stephen Hemminger [Fri, 30 Sep 2022 19:35:48 +0000 (12:35 -0700)] 
uapi: update of if_tun.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agortnetlink: add new function rtnl_echo_talk()
Hangbin Liu [Thu, 29 Sep 2022 08:10:16 +0000 (16:10 +0800)] 
rtnetlink: add new function rtnl_echo_talk()

Add a new function rtnl_echo_talk() that could be used when the
sub-component supports NLM_F_ECHO flag. With this function we can
remove the redundant code added by commit b264b4c6568c7 ("ip: add
NLM_F_ECHO support").

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: fix typo in variable name in ifname_map_cb()
Jiri Pirko [Thu, 29 Sep 2022 10:24:36 +0000 (12:24 +0200)] 
devlink: fix typo in variable name in ifname_map_cb()

s/port_ifindex/port_index/

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agodevlink: move use_iec into struct dl
Jiri Pirko [Thu, 29 Sep 2022 10:24:35 +0000 (12:24 +0200)] 
devlink: move use_iec into struct dl

Similar to other bool opts that could be set by the user, move the
global variable use_iec to be part of struct dl.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agotc/tc_monitor: print netlink extack message
Hangbin Liu [Tue, 27 Sep 2022 10:21:07 +0000 (18:21 +0800)] 
tc/tc_monitor: print netlink extack message

Upstream commit "sched: add extack for tfilter_notify" will make
tc event contain extack message, which could be used for logging
offloading failures. Let's print the extack message in tc monitor.
e.g.

  # tc monitor
  added chain dev enp3s0f1np1 parent ffff: chain 0
  added filter dev enp3s0f1np1 ingress protocol all pref 49152 flower chain 0 handle 0x1
    ct_state +trk+new
    not_in_hw
          action order 1: gact action drop
           random type none pass val 0
           index 1 ref 1 bind 1

  Warning: mlx5_core: matching on ct_state +new isn't supported.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agolibnetlink: add offset for nl_dump_ext_ack_done
Hangbin Liu [Tue, 27 Sep 2022 10:21:06 +0000 (18:21 +0800)] 
libnetlink: add offset for nl_dump_ext_ack_done

There is no rule to have an error code after NLMSG_DONE msg. The only reason
we has this offset is that kernel function netlink_dump_done() has an error
code followed by the netlink message header.

Making nl_dump_ext_ack_done() has an offset parameter. So we can adjust
this for NLMSG_DONE message without error code.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip link: add sub-command to view and change DSA conduit interface
Vladimir Oltean [Thu, 22 Sep 2022 22:06:55 +0000 (01:06 +0300)] 
ip link: add sub-command to view and change DSA conduit interface

Support the "dsa" kind of rtnl_link_ops exported by the kernel, and
export reads/writes to IFLA_DSA_MASTER.

Examples:

$ ip link set swp0 type dsa conduit eth1

$ ip -d link show dev swp0
    (...)
    dsa conduit eth0

$ ip -d -j link show swp0
[
{
"link": "eth1",
"linkinfo": {
"info_kind": "dsa",
"info_data": {
"conduit": "eth1"
}
},
}
]

Note that by construction and as shown in the example, the IFLA_LINK
reported by a DSA user port is identical to what is reported through
IFLA_DSA_MASTER. However IFLA_LINK is not writable, and overloading its
meaning to make it writable would clash with other users of IFLA_LINK
(vlan etc) for which writing this property does not make sense.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agolink: display 'allmulti' counter
Nicolas Dichtel [Mon, 19 Sep 2022 08:31:36 +0000 (10:31 +0200)] 
link: display 'allmulti' counter

This counter is based on the same principle that the 'promiscuity' counter:
the flag ALLMULTI is displayed only when it is explicitly requested by the
userland. This counter enables to know if 'allmulti' is configured on an
interface.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoip: add NLM_F_ECHO support
Hangbin Liu [Fri, 16 Sep 2022 03:34:28 +0000 (11:34 +0800)] 
ip: add NLM_F_ECHO support

When user space configures the kernel with netlink messages, it can set the
NLM_F_ECHO flag to request the kernel to send the applied configuration back
to the caller. This allows user space to retrieve configuration information
that are filled by the kernel (either because these parameters can only be
set by the kernel or because user space let the kernel choose a default
value).

NLM_F_ACK is also supplied incase the kernel doesn't support NLM_F_ECHO
and we will wait for the reply forever. Just like the update in
iplink.c, which I plan to post a patch to kernel later.

A new parameter -echo is added when user want to get feedback from kernel.
e.g.

  # ip -echo addr add 192.168.0.1/24 dev eth1
  3: eth1    inet 192.168.0.1/24 scope global eth1
         valid_lft forever preferred_lft forever
  # ip -j -p -echo addr del 192.168.0.1/24 dev eth1
  [ {
          "deleted": true,
          "index": 3,
          "dev": "eth1",
          "family": "inet",
          "local": "192.168.0.1",
          "prefixlen": 24,
          "scope": "global",
          "label": "eth1",
          "valid_life_time": 4294967295,
          "preferred_life_time": 4294967295
      } ]

Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoseg6: add support for flavors in SRv6 End* behaviors
Paolo Lungaroni [Mon, 12 Sep 2022 17:39:23 +0000 (19:39 +0200)] 
seg6: add support for flavors in SRv6 End* behaviors

As described in RFC 8986 [1], processing operations carried out by SRv6
End, End.X and End.T (End* for short) behaviors can be modified or
extended using the "flavors" mechanism. This patch adds the support for
PSP,USP,USD flavors (defined in [1]) and for NEXT-C-SID flavor (defined
in [2]) in SRv6 End* behaviors. Specifically, we add a new optional
attribute named "flavors" that can be leveraged by the user to enable
specific flavors while creating an SRv6 End* behavior instance.
Multiple flavors can be specified together by separating them using
commas.

If a specific flavor (or a combination of flavors) is not supported by the
underlying Linux kernel, an error message is reported to the user and the
creation of the specific behavior instance is aborted.

When the flavors attribute is omitted, the regular SRv6 End* behavior is
performed.

Flavors such as PSP, USP and USD do not accept additional configuration
attributes. Conversely, the NEXT-C-SID flavor can be configured to support
user-provided Locator-Block and Locator-Node Function lengths using,
respectively, the lblen and the nflen attributes.

Both lblen and nflen values must be evenly divisible by 8 and their sum
must not exceed 128 bit (i.e. the C-SID container size).

If the lblen attribute is omitted, the default value chosen by the Linux
kernel is 32-bit. If the nflen attribute is omitted, the default value
chosen by the Linux kernel is 16-bit.

Some examples:
ip -6 route add 2001:db8::1 encap seg6local action End flavors next-csid dev eth0
ip -6 route add 2001:db8::2 encap seg6local action End flavors next-csid lblen 48 nflen 16 dev eth0

Standard Output:
ip -6 route show 2001:db8::2
2001:db8::2  encap seg6local action End flavors next-csid lblen 48 nflen 16 dev eth0 metric 1024 pref medium

JSON Output:
ip -6 -j -p route show 2001:db8::2
[ {
        "dst": "2001:db8::2",
        "encap": "seg6local",
        "action": "End",
        "flavors": [ "next-csid" ],
        "lblen": 48,
        "nflen": 16,
        "dev": "eth0",
        "metric": 1024,
        "flags": [ ],
        "pref": "medium"
} ]

[1] - https://datatracker.ietf.org/doc/html/rfc8986
[2] - https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression

Signed-off-by: Paolo Lungaroni <paolo.lungaroni@uniroma2.it>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 years agoUpdate kernel headers
David Ahern [Thu, 22 Sep 2022 22:50:08 +0000 (15:50 -0700)] 
Update kernel headers

Update kernel headers to commit:
    0140a7168f8b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")

Signed-off-by: David Ahern <dsahern@kernel.org>