Commit Graph

5957 Commits

Author SHA1 Message Date
David Ahern
7cb0e24dcf devlink: Remove strtouint64_t in favor of get_u64
strtouint64_t duplicates get_u64; remove it.

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-21 09:33:33 -07:00
David Ahern
7848f6bb70 Update kernel headers
Update kernel headers to commit:
    7b779cc8846a ("Merge branch 'octeontx2-ptp-updates'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-21 09:26:21 -07:00
Wojciech Drewek
4f01597298 f_flower: fix indentation for enc_key_id and u32
Commit b2450e46b7 ("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>
2022-02-16 20:34:42 -07:00
Benjamin Poirier
09c6a3d23f bridge: Remove vlan listing from bridge link
vlan listing from `bridge link -d` was broken by commit f32e4977dc ("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: f32e4977dc ("bridge: add json support for link command")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-16 12:16:43 -08:00
Benjamin Poirier
e4fda2596c bridge: Fix error string typo
Fixes: fab9a18a2e ("bridge: request vlans along with link information")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-16 12:16:43 -08:00
Maxim Petrov
cc143bda6b 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>
2022-02-16 12:14:35 -08:00
Vincent Mailhol
90bbf8612b 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: 0c263d7c36 ("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>
2022-02-16 12:12:42 -08:00
Petr Machata
1b5c7414a4 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>
2022-02-16 12:12:19 -08:00
Stephen Hemminger
a38d305d15 tc: fix duplicate fall-through
Cleanup from last patch

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-14 13:07:49 -08:00
Maxim Petrov
f8beda6e00 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>
2022-02-11 11:38:51 -08:00
Roi Dayan
7f70eb2a8b 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>
2022-02-10 17:20:42 -08:00
Gal Pressman
25a9c4fa81 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: 5632cf69ad ("tunnel: fix clang warning")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-10 10:03:00 -08:00
David Ahern
2e1e72531c 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>
2022-02-10 09:54:51 -08:00
Justin Iurman
ff14875e9d 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>
2022-02-10 09:54:10 -08:00
Justin Iurman
8908cb2571 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>
2022-02-10 09:53:21 -08:00
David Ahern
cd24451e79 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>
2022-02-10 09:51:07 -08:00
Eric Dumazet
e4ba36f752 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>
2022-02-07 10:51:03 -08:00
Coco Li
5d57e13036 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>
2022-02-07 10:50:00 -08:00
Wen Liang
721435dcfd 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>
2022-02-02 20:51:43 -07:00
Wen Liang
c733722b99 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>
2022-02-02 20:51:11 -07:00
Guillaume Nault
29da83f89f 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: dec01609dc ("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>
2022-02-01 12:56:30 -08:00
Stephen Hemminger
5f44590dde 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>
2022-02-01 09:06:36 -07:00
Stephen Hemminger
9948b6cb92 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>
2022-02-01 09:05:22 -07:00
Baowen Zheng
f4cd4f1270 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>
2022-01-31 20:41:05 -07:00
Andrea Claudi
07012a1f4e 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>
2022-01-31 14:37:25 -08:00
Thomas Niederberger
03b4de0b47 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>
2022-01-28 09:21:46 -08:00
Petr Machata
924f6b4a5d 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>
2022-01-26 20:22:47 -08:00
David Ahern
f050cde911 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>
2022-01-26 10:21:14 -07:00
Stephen Hemminger
ba5ac984eb 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
bf71c8f214 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
5632cf69ad 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
c02488786f 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
371c13e8f2 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
8d27eee50c 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
560d233608 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: 04b215015b ("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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
b2450e46b7 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
4e27d53895 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
9d5e29e60f 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>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
343c4f52b6 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>
2022-01-26 10:19:08 -07:00
David Ahern
a19da4e190 Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-26 10:18:43 -07:00
Stephen Hemminger
5c9571bc8b uapi: update kernel headers from 5.17-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-24 09:55:39 -08:00
Stephen Hemminger
d542543bb5 tc/action: print error to stderr
Error messages should go to stderr even if using JSON.

Fixes: 2704bd6255 ("tc: jsonify actions core")
Cc: jiri@mellanox.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-20 13:06:09 -08:00
Geliang Tang
52370c611a 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>
2022-01-19 12:41:41 -08:00
Petr Machata
c556f57784 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>
2022-01-19 12:41:33 -08:00
Stephen Hemminger
0dc5da8e3d f_flower: fix checkpatch warnings
Fix minor whitespace and other easy to fix complaints from
checkpatch.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-17 21:02:50 -08:00
Stephen Hemminger
ffbcb24607 netem: fix checkpatch warnings
netem is old and pre-dates checkpatch, so fix it up.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-17 20:59:26 -08:00
David Ahern
08a296cf12 Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-16 15:55:59 -07:00
Sam James
8bced38a94 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>
2022-01-15 10:41:13 -08:00
Stephen Hemminger
e27bb8e5df 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>
2022-01-15 10:39:43 -08:00
Stephen Hemminger
26ff0afa6f 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>
2022-01-15 10:38:58 -08:00