]> git.ipfire.org Git - thirdparty/iproute2.git/log
thirdparty/iproute2.git
4 days agoss: escape characters in command name main
Stephen Hemminger [Wed, 25 Mar 2026 23:03:02 +0000 (00:03 +0100)] 
ss: escape characters in command name

Since the process name is under user control with prctl(PR_SET_NAME)
it may contain escape characters to try and mess with screen output.

Reuse the existing string logic from procps (used by ps command).

Reported-by: Josiah Stearns <B00TK1D@proton.me>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Tested-by: Michal Kubecek <mkubecek@suse.cz>
2 weeks agodpll: Fix missing notifications in monitor mode
Andrea Claudi [Thu, 12 Mar 2026 18:35:47 +0000 (19:35 +0100)] 
dpll: Fix missing notifications in monitor mode

When running dpll monitor with output redirected to a file, notifications
could be lost because stdout is fully buffered for file redirection instead
of line-buffered like in interactive mode. If the program is killed or
crashes, buffered data is lost before reaching the file.

Fix by calling fflush(stdout) after each notification to ensure immediate
writes to the log file.

Fixes: 656cfc3ce05b ("dpll: Add dpll command")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 weeks agodpll: fix pin id-get type filter parsing
Petr Oros [Tue, 24 Feb 2026 09:12:40 +0000 (10:12 +0100)] 
dpll: fix pin id-get type filter parsing

dpll_parse_attr_enum() expects the keyword to be already consumed,
but cmd_pin_id_get() used dpll_argv_match() which does not advance
the argument pointer. This caused the parser to read the keyword
"type" as the enum value instead of the actual type (e.g. "gnss").

Use dpll_argv_match_inc() to properly consume the keyword before
parsing the value.

Fixes: 656cfc3ce05b ("dpll: Add dpll command")
Signed-off-by: Petr Oros <poros@redhat.com>
5 weeks agoremove leftover references to /usr/lib/route2
Stephen Hemminger [Mon, 2 Mar 2026 16:37:53 +0000 (08:37 -0800)] 
remove leftover references to /usr/lib/route2

Since commit 962692356a1c ("Makefile: use /usr/share/iproute2 for config
files") the path was moved to /usr/share in Makefile; but there
were leftover references.

Reported-by: Yedaya Katsman <yedaya.ka@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 weeks agoss: Remove trailing whitespace when output is not a TTY
Daniel Schulte [Wed, 25 Feb 2026 19:39:03 +0000 (20:39 +0100)] 
ss: Remove trailing whitespace when output is not a TTY

Sometimes a value in the last column might be very long.
When grepping ss output the matched lines are also padded to the longest value.
In some cases this can result in multiple lines of the terminal getting filled
with spaces.

Don't print right padding in last visible column when ss can't determine the
screen width.

Signed-off-by: Daniel Schulte <trilader@schroedingers-bit.net>
5 weeks agoinclude/json_print.h: add includes for `__u32` and `timeval` declarations
Sergei Trofimovich [Mon, 23 Feb 2026 22:34:35 +0000 (22:34 +0000)] 
include/json_print.h: add includes for `__u32` and `timeval` declarations

Without the change the build fails on `musl` as:

```
../include/json_print.h:100:44: error: unknown type name ‘__u32’
  100 | unsigned int print_range(const char *name, __u32 start, __u32 end);
      |                                            ^~~~~
...
../include/json_print.h:82:30: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition or declaration
   82 | _PRINT_FUNC(tv, const struct timeval *)
      |                              ^~~~~~~
../include/json_print.h:57:45: note: in definition of macro ‘_PRINT_FUNC’
   57 |                                             type value)                 \
      |                                             ^~~~
../include/json_print.h: In function ‘print_tv’:
../include/json_print.h:60:48: error: passing argument 5 of ‘print_color_tv’ from incompatible pointer type [-Wincompatible-pointer-types]
   60 |                                                value);                  \
      |                                                ^~~~~
      |                                                |
      |                                                const struct timeval *
```

6 weeks agoss: suppress netlink errors for unsupported protocols
Stephen Hemminger [Wed, 25 Feb 2026 20:59:13 +0000 (12:59 -0800)] 
ss: suppress netlink errors for unsupported protocols

Error messages from sock_diag were only suppressed for extended
protocols (> 255).  Protocols like SCTP and DCCP also get EINVAL
when their kernel modules are not loaded.  Remove the conditional
so all protocols suppress the error.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
7 weeks agoMerge remote-tracking branch 'main' into next
David Ahern [Thu, 19 Feb 2026 16:58:20 +0000 (09:58 -0700)] 
Merge remote-tracking branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agov6.19.0 v6.19.0
Stephen Hemminger [Wed, 18 Feb 2026 15:36:13 +0000 (07:36 -0800)] 
v6.19.0

7 weeks agodevlink: support displaying and resetting to default params
Daniel Zahka [Fri, 6 Feb 2026 21:11:30 +0000 (13:11 -0800)] 
devlink: support displaying and resetting to default params

Add devlink cli support for default param values.

For param-get, any default values provided by the kernel will be
displayed next to the current value. For param-set,
DEVLINK_ATTR_PARAM_RESET_DEFAULT can be included in the request to
request that the parameter be reset to its default value.

Default values of type bool are encoded with a u8 by the kernel to
distinguish "false" from "not present".

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agodevlink: Pull the value printing logic out of pr_out_param_value()
Daniel Zahka [Fri, 6 Feb 2026 21:11:29 +0000 (13:11 -0800)] 
devlink: Pull the value printing logic out of pr_out_param_value()

Split the type demux and value print out of pr_out_param_value() into
a new function pr_out_param_value_print(). This new function can be
re-used for printing additional kinds of values e.g., a default value
reported by the kernel.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agomptcp: display addr & ifname in color
Matthieu Baerts (NGI0) [Wed, 11 Feb 2026 12:03:18 +0000 (13:03 +0100)] 
mptcp: display addr & ifname in color

Similar to other commands, now the addresses and interface names in
"ip mptcp" commands are now displayed in color if supported/requested.

That's the only attributes that are used in ipmptcp.c: no MAC or state
(UP/DOWN) attributes.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agomptcp: monitor: also show iface name
Matthieu Baerts (NGI0) [Wed, 11 Feb 2026 12:03:17 +0000 (13:03 +0100)] 
mptcp: monitor: also show iface name

Previously, only the interface index was printed.

It is helpful to display the interface name, instead of letting the
reader doing the translation from the index to the name.

Because the index was already displayed before, keep it instead of
replacing it, just not to break some possible scripts parsing this
output.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agoip/netns: avoid redundant mounts
Chen Linxuan [Tue, 10 Feb 2026 04:11:48 +0000 (12:11 +0800)] 
ip/netns: avoid redundant mounts

On Ubuntu 24.04, I observed redundant mounts after adding a netns with
the commands below:

sudo ip netns add xxx
cat /proc/self/mountinfo | grep /run

Output:

29 31 0:26 / /run rw,nosuid,nodev,noexec,relatime shared:5 - tmpfs tmpfs ...
...
203 29 0:26 /netns /run/netns rw,nosuid,nodev,noexec,relatime shared:5 - tmpfs tmpfs ...
6443 203 0:4 net:[4026533578] /run/netns/xxx rw shared:917 - nsfs nsfs rw
6444 29 0:4 net:[4026533578] /run/netns/xxx rw shared:917 - nsfs nsfs rw

There are two mounts (6443 and 6444) related to the "xxx" netns created
above.

This redundancy occurs because systemd changed the default system mount
propagation to "shared" since commit b3ac5f8cb987 ("mount-setup: change
system mount propagation to shared by default"). Consequently, mount
propagation of `/run` is shared.

Link: https://docs.kernel.org/filesystems/sharedsubtree.html
Link: https://github.com/systemd/systemd/commit/b3ac5f8cb98757416d8660023d6564a7c411f0a0
When `ip netns` makes `/run/netns` a mount point, a new bind mount (203)
is created and attached to the same peer group as mount 29. Since mount
29 and 203 are in the same peer group (shared:5), any mount under 203
propagates back to 29, resulting in the redundant mount 6444.

To prevent this, `/run/netns` should be placed in a new peer group. This
can be achieved by reconfiguring `/run/netns` to MS_PRIVATE first, and
then to MS_SHARED again.

With this patch applied, the redundant mount is no longer present, and
`/run/netns` is in a new peer group (917):

29 31 0:26 / /run rw,nosuid,nodev,noexec,relatime shared:5 - tmpfs tmpfs ...
...
203 29 0:26 /netns /run/netns rw,nosuid,nodev,noexec,relatime shared:917 - tmpfs tmpfs ...
6443 203 0:4 net:[4026533578] /run/netns/xxx rw shared:918 - nsfs nsfs rw

I also verified that mount propagation to containers remains functional.

Signed-off-by: Chen Linxuan <me@black-desk.cn>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agoMerge remote-tracking branch 'main' into next
David Ahern [Wed, 18 Feb 2026 02:30:24 +0000 (19:30 -0700)] 
Merge remote-tracking branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agodpll: add support for fractional frequency offset in ppt
Ivan Vecera [Tue, 3 Feb 2026 10:14:21 +0000 (11:14 +0100)] 
dpll: add support for fractional frequency offset in ppt

Add support for the DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT attribute
to the pin print attributes.

The logic ensures that in standard (human-readable) output, the legacy
fractional-frequency-offset is hidden if the new ppt (parts per trillion)
value is present, preventing redundant information.

However, the legacy attribute is still printed if:
1. The output format is JSON (to maintain full data availability).
2. The new PPT attribute is missing (backward compatibility with older
   kernels).

Human-readable output example:
==============================
[root@host iproute2-next]# ./dpll/dpll pin show id 5
pin id 5:
  module-name: zl3073x
  clock-id: 5855731461854439600
  board-label: TCX0
  package-label: REF4P
  type: ext
  frequency: 20000000 Hz
  frequency-supported:
    20000000 Hz
  capabilities: 0x6 state-can-change priority-can-change
  phase-adjust-min: -2147483648
  phase-adjust-max: 2147483647
  phase-adjust: 0
  fractional-frequency-offset-ppt: 3003980
  esync-frequency: 0 Hz
  esync-pulse: 0
  parent-device:
    id 0 direction input prio 14 state disconnected phase-offset 0
    id 1 direction input prio 14 state disconnected phase-offset 0

JSON output example:
====================
[root@host iproute2-next]# ./dpll/dpll -j -p pin show id 5
{
    "id": 5,
    "module-name": "zl3073x",
    "clock-id": 5855731461854439600,
    "board-label": "TCX0",
    "package-label": "REF4P",
    "type": "ext",
    "frequency": 20000000,
    "frequency-supported": [ {
            "frequency-min": 20000000,
            "frequency-max": 20000000
        } ],
    "capabilities": [ "state-can-change","priority-can-change" ],
    "phase-adjust-min": -2147483648,
    "phase-adjust-max": 2147483647,
    "phase-adjust": 0,
    "fractional-frequency-offset": 3,
    "fractional-frequency-offset-ppt": 3042863,
    "esync-frequency": 0,
    "esync-pulse": 0,
    "parent-device": [ {
            "parent-id": 0,
            "direction": "input",
            "prio": 14,
            "state": "disconnected",
            "phase-offset": 0
        },{
            "parent-id": 1,
            "direction": "input",
            "prio": 14,
            "state": "disconnected",
            "phase-offset": 0
        } ]
}

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agoUpdate kernel headers
David Ahern [Tue, 17 Feb 2026 17:22:49 +0000 (10:22 -0700)] 
Update kernel headers

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

Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agouapi: headers update from 7.0-rc0
Stephen Hemminger [Mon, 16 Feb 2026 01:16:48 +0000 (17:16 -0800)] 
uapi: headers update from 7.0-rc0

Updates from upstream.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoman: Fix spelling in tipc-link man page
David Ahern [Sat, 31 Jan 2026 19:17:40 +0000 (12:17 -0700)] 
man: Fix spelling in tipc-link man page

Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoman/tc-actions: fix typo
Stephen Hemminger [Sat, 31 Jan 2026 19:43:01 +0000 (11:43 -0800)] 
man/tc-actions: fix typo

Obviously, packet was intended.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoss: fix grammar, articles, and phrasing in man page
Stephen Hemminger [Sat, 24 Jan 2026 20:00:41 +0000 (12:00 -0800)] 
ss: fix grammar, articles, and phrasing in man page

This patch addresses grammatical errors, awkward phrasing, missing
articles, and singular/plural agreement issues throughout the ss
man page documentation.

Main corrections:

Grammar and agreement (10 instances):
  - Fix singular/plural: "connection" -> "connections"
  - Fix "five kind" -> "five kinds"
  - Fix "packet" -> "packets" (7 instances throughout memory descriptions)
  - Fix "the retransmission occurred" -> "retransmissions have occurred"
  - Fix "process using socket" -> "processes using sockets"
  - Fix "thread using socket" -> "threads using sockets"
  - Fix "socket option" -> "socket options"

Article corrections:
  - Fix "an uuid" -> "a uuid" (use "a" before consonant sounds)
  - Fix "construct arbitrary set" -> "construct an arbitrary set"
  - Fix "these information" -> "this information" (uncountable noun)
  - Add "instead of human-readable values" (complete phrase)

Awkward phrasing (4 instances):
  - Fix "how long time the timer will expire" -> "how long until the timer will expire"
  - Fix "how long time since" -> "how long it has been since" (3 instances for lastsnd, lastrcv, lastack)

Additional grammar fixes:
  - Add relative pronoun: "memory can be allocated" -> "memory that can be allocated" (2 instances)
  - Fix conditional: "If need memory" -> "If memory is needed"
  - Fix gerund: "before allocate" -> "before allocating"
  - Fix sentence fragment: "Following normal arithmetic rules." -> "following normal arithmetic rules"
  - Add missing period to back_log description

Formatting:
  - Remove duplicate .TP markup between --tipc and --vsock options

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoMerge branch 'man-page-fixups' into next
David Ahern [Sat, 31 Jan 2026 19:07:48 +0000 (12:07 -0700)] 
Merge branch 'man-page-fixups' into next

Stephen Hemminger  says:

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

AI does a great job of finding and fixing manual pages.
This patch series is the result of editorial review and correction of
subsystem man pages, addressing grammatical errors, style inconsistencies, and
clarity issues throughout the documentation.

The corrections cover the following subsystems:
  - DCB (Data Center Bridging)
  - devlink
  - Statistics tools (lnstat, rtacct, nstat)
  - netshaper
  - TIPC
  - vdpa
  - RDMA

Common patterns corrected across all man pages:
  - Subject-verb agreement and singular/plural consistency
  - Missing or incorrect articles (a, an, the)
  - Inconsistent verb tenses in command descriptions
  - Missing terminal punctuation in examples and descriptions
  - Overly long section headers (split into concise headers + body text)
  - Awkward or non-idiomatic English phrasing
  - Copy-paste errors (e.g., incorrect titles from template files)
  - Formatting issues (duplicate markup, missing commas in cross-references)

All corrections are purely editorial. No functional changes have been made, and
all technical content remains accurate. The documentation now maintains consistent
style and proper grammar while preserving the original technical information.

Total corrections: approximately 100+ individual fixes across 40+ man page files.

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

Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agordma: fix grammar, formatting, and style in man pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:31 +0000 (11:49 -0800)] 
rdma: fix grammar, formatting, and style in man pages

This patch addresses grammatical errors, overly long section headers,
missing punctuation, and style inconsistencies across all RDMA man
page documentation.

Changes by file:

rdma.8:
  - Fix hyphenation: "non zero" -> "non-zero"
  - Remove article: "a pretty JSON" -> "pretty JSON"
  - Capitalize option description: "output" -> "Output"
  - Add missing period after "monitor"

rdma-dev.8:
  - Split overly long section headers into concise titles + body text
  - Fix semicolon to period and add missing articles
  - Fix possessive: "it's parent" -> "its parent"
  - Add missing article: "specified" -> "the specified"
  - Fix tense: "is previously created" -> "was previously created"
  - Add article: "iproute2 ip command" -> "the iproute2 ip command"
  - Fix verb tense in examples: "Add" -> "Adds", "Delete" -> "Deletes"

rdma-link.8:
  - Split overly long section header
  - Add missing article: "specified" -> "the specified"
  - Add missing periods (2 instances)

rdma-monitor.8:
  - Split awkward section header and reword
  - Add missing period

rdma-resource.8:
  - Add missing article: "specified" -> "the specified"
  - Add missing periods (4 instances)

rdma-statistic.8:
  - Split overly long section header
  - Fix verb form: "are bind" -> "are bound"
  - Add missing periods (7 instances)
  - Fix grammar: "does not exists" -> "it does not exist"
  - Fix plural verb: "that was enabled" -> "that were enabled"

rdma-system.8:
  - Fix plural: "network namespace" -> "network namespaces"
  - Remove duplicate .PP line

The most significant improvements are splitting overly long section
headers across multiple files, fixing missing punctuation in examples,
and correcting various grammatical errors.

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agovdpa: fix grammar, titles, and formatting in man pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:30 +0000 (11:49 -0800)] 
vdpa: fix grammar, titles, and formatting in man pages

This patch addresses grammatical errors, copy-paste errors from devlink
documentation, and formatting issues across the vdpa man page documentation.

Changes by file:

vdpa.8:
  - Remove unnecessary article: "a pretty JSON output" -> "pretty JSON output"

vdpa-dev.8:
  - Fix incorrect title: "DEVLINK\-DEV" -> "VDPA\-DEV"
  - Fix file path: "virtio*h" -> "virtio*.h" (add missing period)
  - Fix capitalization and punctuation in macro description
  - Split overly long vstats section header into title + body
  - Fix spacing: "-Name" -> "- Name"
  - Fix article error: "the all vdpa devices" -> "all vdpa devices"
  - Add missing periods to example descriptions (2 instances)

vdpa-mgmtdev.8:
  - Fix incorrect title: "DEVLINK\-DEV" -> "VDPA\-MGMTDEV"
  - Fix NAME section: "vdpa-dev" -> "vdpa-mgmtdev"

The title corrections in vdpa-dev.8 and vdpa-mgmtdev.8 fix critical
copy-paste errors that would cause man page indexing problems and
confusion about which command is being documented.

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agotipc: fix grammar and style issues in man pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:29 +0000 (11:49 -0800)] 
tipc: fix grammar and style issues in man pages

This patch addresses grammatical errors, typos, and formatting issues
across the TIPC man page documentation.

Changes by file:

tipc.8:
  - Fix subject-verb agreement: "consists" -> "consist"

tipc-bearer.8:
  - Fix verb agreement: "udp identify" -> "udp identifies"
  - Fix article and hyphenation: "an multi bearer" -> "a multi-bearer"
  - Fix IP notation: "IP v4/v6" -> "IPv4/IPv6"

tipc-link.8:
  - Fix plural verb: "messages has been" -> "messages have been"
  - Fix preposition: "If set of 0" -> "If set to 0"
  - Fix plural noun: "Possible status are" -> "Possible statuses are"
    (3 instances)

tipc-nametable.8:
  - Fix misplaced help text: move from after -p option to -h option
    where it belongs

tipc-node.8:
  - Fix preposition: "On the form" -> "In the form"
  - Fix typo: "Can by used" -> "Can be used"

tipc-socket.8:
  - Add missing comma in SEE ALSO section after tipc-bearer(8)

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agonetshaper: fix grammar and style issues in man page
Stephen Hemminger [Sat, 24 Jan 2026 19:49:28 +0000 (11:49 -0800)] 
netshaper: fix grammar and style issues in man page

This patch addresses grammatical errors and style inconsistencies in
the netshaper man page documentation.

Changes:
  - Improve clarity of set command description by restructuring
    awkward parenthetical about id parameter
  - Fix punctuation consistency in scope list formatting
  - Capitalize "ID" in example heading for proper title case
  - Add missing article "the" in color option description (3 instances)
  - Make example descriptions consistent by using present tense
    third person ("Displays", "Removes") to match Example 1

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agofix grammar and style issues in man pages for stat related pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:27 +0000 (11:49 -0800)] 
fix grammar and style issues in man pages for stat related pages

This patch addresses grammatical errors and style inconsistencies in
the ifstat, lnstat, and rtacct man pages documentation.

lnstat Changes:
  - Capitalize "Linux" as proper noun in NAME and DESCRIPTION sections
  - Add missing period to -j/--json option description
  - Fix passive voice: "is being used" -> "is used"
  - Fix word form: "can not" -> "cannot"

rtacct Changes:
  - Fix date format: remove comma in "27 June, 2007" -> "27 June 2007"
  - Remove period from NAME section per man page convention
  - Capitalize SNMP acronym (2 instances)
  - Add missing periods to -h and -V option descriptions
  - Improve clarity of -s/--noupdate description
  - Add missing article in -d/--scan description

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agodevlink: fix grammar and style issues in man pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:26 +0000 (11:49 -0800)] 
devlink: fix grammar and style issues in man pages

This patch addresses various grammatical errors, style inconsistencies,
and clarity issues across the devlink man page documentation.

Changes by file:

devlink.8:
  - Add missing article "The" in -b option description
  - Add missing periods in object descriptions (region, health, trap)
  - Update synopsis to include all objects (rate, lc, dpipe)
  - Add descriptions for rate, lc, and dpipe objects
  - Add complete cross-references in SEE ALSO section

devlink-dev.8:
  - Change "HWs" to "hardware devices" for clarity
  - Fix verb form: "restart driver" -> "restarting the driver"
  - Fix plural agreement: "some driver" -> "some drivers"
  - Fix typo: "actrually" -> "actually"

devlink-port.8:
  - Capitalize "Set port type" parameter description
  - Fix preposition: "split to" -> "split into"
  - Fix punctuation: "on. or" -> "on, or"
  - Rewrite pfnum description for grammatical clarity
  - Fix plural agreement: "devices which supports" -> "devices which support"
  - Fix article: "a Ethernet" -> "an Ethernet"
  - Fix verb form: "restart driver" -> "restarting the driver"
  - Fix typo: "Unplit" -> "Unsplit"
  - Fix verb form: "active the function" -> "activate the function"

devlink-rate.8:
  - Fix plural agreement: "some driver" -> "some drivers"
  - Fix possessive pronouns: "it's" -> "its" (3 instances)
  - Fix plural: "leaf have" -> "leaves have"
  - Add article: "create leaf rate object" -> "create a leaf rate object"
  - Format "1to1" as "1-to-1"
  - Fix plural: "These parameter" -> "These parameters"
  - Add verb: "parent node applied" -> "parent node are applied"
  - Fix spelling: "behaviour" -> "behavior"
  - Improve phrasing: "treated as parent unset" -> "is treated as unsetting the parent"

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agodcb: fix grammar and style issues in man pages
Stephen Hemminger [Sat, 24 Jan 2026 19:49:25 +0000 (11:49 -0800)] 
dcb: fix grammar and style issues in man pages

This patch addresses various grammatical errors, style inconsistencies,
and clarity issues across the DCB man page documentation.

Changes by file:

dcb.8:
  - Capitalize first word of -n option description
  - Add missing article "The" in -b option description
  - Fix verb form "shown" -> "show" in -s option description
  - Add missing dcb-dcbx(8) reference in SEE ALSO section

dcb-app.8:
  - Add missing article "the" before "APP table"
  - Fix singular/plural: "value" -> "values"
  - Improve phrasing: "priority of both 1 and 2" -> "priorities 1 and 2"
  - Make command descriptions consistent (present tense)
  - Simplify relative clause construction in default-prio description
  - Fix PCP/DEI description formatting and punctuation

dcb-apptrust.8:
  - Remove inappropriate period in NAME section
  - Improve clarity by removing unnecessary commas and redundant phrasing
  - Use present tense instead of future in DESCRIPTION
  - Make command descriptions consistent with proper articles

dcb-buffer.8:
  - Remove unnecessary "be" in DESCRIPTION
  - Add missing comma in prio-buffer parameter description

dcb-dcbx.8:
  - Capitalize first word of static parameter description

dcb-ets.8:
  - Add missing commas after introductory phrases in prio-tc and
    tc-tsa parameter descriptions

dcb-rewr.8:
  - Capitalize month name in TH date
  - Fix subject-verb agreement and plural forms in DESCRIPTION
  - Make command descriptions consistent (present tense)
  - Fix PCP/DEI description formatting and punctuation
  - Add missing commas in SEE ALSO section
  - Fix spacing in REPORTING BUGS section

No functional changes. All technical content remains accurate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agodpll: add mode setting support
Petr Oros [Thu, 29 Jan 2026 11:28:49 +0000 (12:28 +0100)] 
dpll: add mode setting support

Add ability to set DPLL device operating mode (automatic/manual)
through "dpll device set id ID mode MODE" command.

In automatic mode, the DPLL autonomously selects the best input
source based on priority and quality. In manual mode, the input
source must be explicitly configured.

The implementation adds dpll_mode_map for string-to-enum conversion,
str_to_dpll_mode() and dpll_parse_mode() functions, and refactors
dpll_mode_name() to use str_map_lookup_uint() for consistency.

Man page and bash completion updated accordingly.

Signed-off-by: Petr Oros <poros@redhat.com>
Tested-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoMerge remote-tracking branch 'main' into next
David Ahern [Fri, 23 Jan 2026 16:54:50 +0000 (09:54 -0700)] 
Merge remote-tracking branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoman: Add cake_mq documentation to the tc-cake man page
Toke Høiland-Jørgensen [Thu, 22 Jan 2026 13:58:49 +0000 (14:58 +0100)] 
man: Add cake_mq documentation to the tc-cake man page

Add documentation for the cake_mq qdisc to the tc-cake man page,
including a section describing the differences between the single-queue
and multi-queue CAKE variants.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agodevlink: Fix resource show output
Ido Schimmel [Thu, 15 Jan 2026 11:50:04 +0000 (13:50 +0200)] 
devlink: Fix resource show output

When the user asks to show device resources, devlink first queries the
device's dpipe tables so that it will be able to show the association
between resources and dpipe tables.

In this flow, 'ctx->resources' is always NULL as resources have yet to
be retrieved. As a result, the dpipe tables are not associated with a
resource identifier and the resource show command does not show any
dpipe tables:

$ devlink resource show pci/0000:03:00.0
pci/0000:03:00.0:
  name kvd size 258048 unit entry dpipe_tables none
    resources:
      name linear size 98304 occ 1 unit entry size_min 0 size_max 159744 size_gran 128 dpipe_tables none
        resources:
          name singles size 16384 occ 1 unit entry size_min 0 size_max 159744 size_gran 1 dpipe_tables none
          name chunks size 49152 occ 0 unit entry size_min 0 size_max 159744 size_gran 32 dpipe_tables none
          name large_chunks size 32768 occ 0 unit entry size_min 0 size_max 159744 size_gran 512 dpipe_tables none
      name hash_double size 65408 unit entry size_min 32768 size_max 192512 size_gran 128 dpipe_tables none
      name hash_single size 94336 unit entry size_min 65536 size_max 225280 size_gran 128 dpipe_tables none
  name span_agents size 3 occ 0 unit entry dpipe_tables none
  name counters size 32766 occ 4 unit entry dpipe_tables none
    resources:
      name rif size 8192 occ 0 unit entry dpipe_tables none
      name flow size 24574 occ 4 unit entry dpipe_tables none
  name global_policers size 1000 unit entry dpipe_tables none
    resources:
      name single_rate_policers size 968 occ 0 unit entry dpipe_tables none
  name rif_mac_profiles size 1 occ 0 unit entry dpipe_tables none
  name rifs size 1000 occ 1 unit entry dpipe_tables none
  name port_range_registers size 16 occ 0 unit entry dpipe_tables none
  name physical_ports size 64 occ 32 unit entry dpipe_tables none

Fix by moving the check against 'ctx->resources' to the place where it
is actually used. Output after the fix:

$ devlink resource show pci/0000:03:00.0
pci/0000:03:00.0:
  name kvd size 258048 unit entry dpipe_tables none
    resources:
      name linear size 98304 occ 1 unit entry size_min 0 size_max 159744 size_gran 128
        dpipe_tables:
          table_name mlxsw_adj
        resources:
          name singles size 16384 occ 1 unit entry size_min 0 size_max 159744 size_gran 1 dpipe_tables none
          name chunks size 49152 occ 0 unit entry size_min 0 size_max 159744 size_gran 32 dpipe_tables none
          name large_chunks size 32768 occ 0 unit entry size_min 0 size_max 159744 size_gran 512 dpipe_tables none
      name hash_double size 65408 unit entry size_min 32768 size_max 192512 size_gran 128
        dpipe_tables:
          table_name mlxsw_host6
      name hash_single size 94336 unit entry size_min 65536 size_max 225280 size_gran 128
        dpipe_tables:
          table_name mlxsw_host4
  name span_agents size 3 occ 0 unit entry dpipe_tables none
  name counters size 32766 occ 4 unit entry dpipe_tables none
    resources:
      name rif size 8192 occ 0 unit entry dpipe_tables none
      name flow size 24574 occ 4 unit entry dpipe_tables none
  name global_policers size 1000 unit entry dpipe_tables none
    resources:
      name single_rate_policers size 968 occ 0 unit entry dpipe_tables none
  name rif_mac_profiles size 1 occ 0 unit entry dpipe_tables none
  name rifs size 1000 occ 1 unit entry dpipe_tables none
  name port_range_registers size 16 occ 0 unit entry dpipe_tables none
  name physical_ports size 64 occ 32 unit entry dpipe_tables none

Fixes: 0e7e1819453c ("devlink: relax dpipe table show dependency on resources")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agotc: cake: add cake_mq support
Jonas Köppeler [Mon, 5 Jan 2026 16:29:02 +0000 (17:29 +0100)] 
tc: cake: add cake_mq support

This adds support for the cake_mq variant of sch_cake to tc.

Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoUpdate kernel headers
David Ahern [Thu, 15 Jan 2026 16:23:04 +0000 (09:23 -0700)] 
Update kernel headers

Update kernel headers to commit:
d4596891e72c: ("net: inline napi_skb_cache_get()")

Signed-off-by: David Ahern <dsahern@kernel.org>
2 months agoip/iplink: fix off-by-one KIND length in modify()
Jan Vaclav [Tue, 13 Jan 2026 11:41:27 +0000 (12:41 +0100)] 
ip/iplink: fix off-by-one KIND length in modify()

The expected size for IFLA_INFO_KIND in kernel is strlen(kind) + 1.
See `size` in rtnl_link_get_size() in net/core/rtnetlink.c.

Fixes: 1d93483985f0 ("iplink: use netlink for link configuration")
Reported-by: Gris Ge <fge@redhat.com>
Signed-off-by: Jan Vaclav <jvaclav@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agouapi: update mptcp and rdma headers
Stephen Hemminger [Sun, 4 Jan 2026 23:03:15 +0000 (15:03 -0800)] 
uapi: update mptcp and rdma headers

Update from 6.19-rc3

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: add CAN XL TMS PWM configuration support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:34 +0000 (19:24 +0100)] 
iplink_can: add CAN XL TMS PWM configuration support

This is the iproute2 counterpart of Linux kernel's commit 46552323fa67
("can: netlink: add PWM netlink interface").

When the TMS is switched on, the node uses PWM (Pulse Width Modulation)
during the data phase instead of the classic NRZ (Non Return to Zero)
encoding.

PWM is configured by three parameters:

  - PWMS: Pulse Width Modulation Short phase
  - PWML: Pulse Width Modulation Long phase
  - PWMO: Pulse Width Modulation Offset time

For each of these parameters, the CAN netlink interface defines three IFLA
symbols:

  - IFLA_CAN_PWM_PWM*_MIN: the minimum allowed value.
  - IFLA_CAN_PWM_PWM*_MAX: the maximum allowed value.
  - IFLA_CAN_PWM_PWM*: the runtime value.

This results in a total of nine IFLA symbols which are all nested in a
parent IFLA_CAN_XL_PWM symbol.

Add the "pwms", "pwml" and "pwmo" options to iplink_can which controls the
IFLA_CAN_PWM_PWM* runtime values.

Add the logic to query and print all those IFLA values. Update
print_usage() accordingly.

Example using the dummy_can driver:

  # modprobe dummy_can
  # ip link set can0 type can bitrate 1000000 xl on xbitrate 20000000 tms on
  $ ip --details link show can0
  5: can0: <NOARP> mtu 2060 qdisc noop state DOWN mode DEFAULT group default qlen 10
      link/can  promiscuity 0 allmulti 0 minmtu 76 maxmtu 2060
      can <XL,TMS> state STOPPED restart-ms 0
     bitrate 1000000 sample-point 0.750
     tq 6 prop-seg 59 phase-seg1 60 phase-seg2 40 sjw 20 brp 1
     dummy_can CC: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
     dummy_can FD: dtseg1 2..256 dtseg2 2..128 dsjw 1..128 dbrp 1..512 dbrp_inc 1
     tdco 0..127 tdcf 0..127
     xbitrate 20000000 xsample-point 0.625
     xtq 6 xprop-seg 2 xphase-seg1 2 xphase-seg2 3 xsjw 1 xbrp 1
     pwms 2 pwml 6 pwmo 0
     dummy_can XL: xtseg1 2..256 xtseg2 2..128 xsjw 1..128 xbrp 1..512 xbrp_inc 1
     xtdco 0..127 xtdcf 0..127
     pwms 1..8 pwml 2..24 pwmo 0..16
     clock 160000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 65536 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: add CAN XL transceiver mode setting (TMS) support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:33 +0000 (19:24 +0100)] 
iplink_can: add CAN XL transceiver mode setting (TMS) support

This is the iproute2 counterpart of Linux kernel's commit 233134af2086
("can: netlink: add CAN_CTRLMODE_XL_TMS flag").

The Transceiver Mode Switching (TMS) indicates whether the CAN XL
controller shall use the PWM or NRZ encoding during the data phase.

The term "transceiver mode switching" is used in both ISO 11898-1 and CiA
612-2 (although only the latter one uses the abbreviation TMS). We adopt
the same naming convention here for consistency.

Add the "tms" option to iplink_can which controls the CAN_CTRLMODE_XL_TMS
flag of the CAN netlink interface.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: add initial CAN XL support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:32 +0000 (19:24 +0100)] 
iplink_can: add initial CAN XL support

This is the iproute2 counterpart of Linux kernel's commit e63281614747
("can: netlink: add initial CAN XL support").

CAN XL uses bittiming parameters different from Classical CAN and CAN FD.
Thus, all the data bittiming parameters, including TDC, need to be
duplicated for CAN XL.

Add the "xl" option to iplink_can which controls the CAN_CTRLMODE_XL flag
of the netlink interface. Then add the "xbitrate", "xsample-point", "xtq",
"xprop-seg", "xphase-seg1", "xphase-seg2", "xsjw", "xtdcv", "xtdco",
"xtdcf" and "xtdc-mode" which are all sub options of "xl". Add the logic to
query and print all those values. Update print_usage() accordingly.

All these options behave similarly to their CAN FD equivalent.

The new options which are specific to CAN XL (i.e. not inherited from CAN
FD) will be added in a subsequent change.

Example using the dummy_can driver:

  # modprobe dummy_can
  # ip link set can0 type can bitrate 500000 fd on dbitrate 2000000 xl on xbitrate 8000000
  $ ip --details link show can0
  5: can0: <NOARP> mtu 2060 qdisc noop state DOWN mode DEFAULT group default qlen 10
      link/can  promiscuity 0 allmulti 0 minmtu 76 maxmtu 2060
      can <FD,TDC-AUTO,XL,XL-TDC-AUTO> state STOPPED restart-ms 0
     bitrate 500000 sample-point 0.875
     tq 12 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 10 brp 2
     dummy_can CC: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
     dbitrate 2000000 dsample-point 0.750
     dtq 6 dprop-seg 29 dphase-seg1 30 dphase-seg2 20 dsjw 10 dbrp 1
     tdco 60 tdcf 0
     dummy_can FD: dtseg1 2..256 dtseg2 2..128 dsjw 1..128 dbrp 1..512 dbrp_inc 1
     tdco 0..127 tdcf 0..127
     xbitrate 8000000 xsample-point 0.750
     xtq 6 xprop-seg 7 xphase-seg1 7 xphase-seg2 5 xsjw 2 xbrp 1
     xtdco 15 xtdcf 0
     dummy_can XL: xtseg1 2..256 xtseg2 2..128 xsjw 1..128 xbrp 1..512 xbrp_inc 1
     xtdco 0..127 xtdcf 0..127
     clock 160000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 65536 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: add RESTRICTED operation mode support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:31 +0000 (19:24 +0100)] 
iplink_can: add RESTRICTED operation mode support

This is the iproute2 counterpart of Linux kernel's commit 60f511f443e5
("can: netlink: add CAN_CTRLMODE_RESTRICTED").

ISO 11898-1:2024 adds a new restricted operation mode. This mode is added
as a mandatory feature for nodes which support CAN XL and is retrofitted as
optional for legacy nodes (i.e. the ones which only support Classical CAN
and CAN FD).

The restricted operation mode is nearly the same as the listen only mode:
the node can not send data frames or remote frames and can not send
dominant bits if an error occurs. The only exception is that the node shall
still send the acknowledgment bit.

Add the "restricted" option to iplink_can which controls the
CAN_CTRLMODE_RESTRICTED flag of the netlink interface.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: print_usage: describe the CAN bittiming units
Vincent Mailhol [Wed, 3 Dec 2025 18:24:30 +0000 (19:24 +0100)] 
iplink_can: print_usage: describe the CAN bittiming units

While the meaning of "bps" or "ns" may be relatively easy to understand,
some of the CAN specific units such as "mtq" (minimum time quanta) may be
harder to understand.

Add a new paragraph to the help menu which describes all the different
units used for the CAN bittiming parameters.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: print_usage: change unit for minimum time quanta to mtq
Vincent Mailhol [Wed, 3 Dec 2025 18:24:29 +0000 (19:24 +0100)] 
iplink_can: print_usage: change unit for minimum time quanta to mtq

In the vast majority of the available CAN datasheets, the minimum time
quanta is abbreviated as "mtq". Note that the ISO standard uses "tqmin"
(with the "min" part as a subscript).

One fact is that no one seems to be using "tc". I was actually the one who
initially proposed to use "tc", but I can not recall anymore the reasoning
behind that.

Change the minimum time quanta unit from "tc" to "mtq" to follow what the
majority of the industry does.

Fixes: 0c263d7c36ff ("iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)")
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 months agoiplink_can: print_usage: fix the text indentation
Vincent Mailhol [Wed, 3 Dec 2025 18:24:28 +0000 (19:24 +0100)] 
iplink_can: print_usage: fix the text indentation

The description of the BITRATE variable is not correctly aligned with the
other ones. Put it on a new line with the same indentation as the other
variables.

This done, reindent everything to only one tabulation (was one tabulation
and two spaces before).

Before this patch...:

  $ ip link help can
  Usage: ip link set DEVICE type can

  (...)

   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:

  $ ip link help can
  Usage: ip link set DEVICE type can

  (...)

   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 }

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 months agoutils: do not be restrictive about alternate network device names
Stephen Hemminger [Sun, 21 Dec 2025 17:49:45 +0000 (09:49 -0800)] 
utils: do not be restrictive about alternate network device names

The kernel does not impose restrictions on alternate interface
names; therefore ip commands should not either.

This allows colon, slash, even .. as alternate names.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 months agoMerge remote-tracking branch 'main/main' into next
David Ahern [Wed, 7 Jan 2026 16:22:49 +0000 (09:22 -0700)] 
Merge remote-tracking branch 'main/main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
3 months agouapi: update mptcp and rdma headers
Stephen Hemminger [Sun, 4 Jan 2026 23:03:15 +0000 (15:03 -0800)] 
uapi: update mptcp and rdma headers

Update from 6.19-rc3

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 months agolib/bpf_legacy: Use userspace SHA-1 code instead of AF_ALG
Eric Biggers [Thu, 18 Dec 2025 20:09:10 +0000 (12:09 -0800)] 
lib/bpf_legacy: Use userspace SHA-1 code instead of AF_ALG

Add a basic SHA-1 implementation to lib/, and make lib/bpf_legacy.c use
it to calculate SHA-1 digests instead of the previous AF_ALG-based code.

This eliminates the dependency on AF_ALG, specifically the kernel config
options CONFIG_CRYPTO_USER_API_HASH and CONFIG_CRYPTO_SHA1.

Over the years AF_ALG has been very problematic, and it is also not
supported on all kernels.  Escalating to the kernel's privileged
execution context merely to calculate software algorithms, which can be
done in userspace instead, is not something that should have ever been
supported.  Even on kernels that support it, the syscall overhead of
AF_ALG means that it is often slower than userspace code.

Let's do the right thing here, and allow people to disable AF_ALG
support (or not enable it) on systems where iproute2 is the only user.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 months agoMerge remote-tracking branch 'main/main' into next
David Ahern [Sat, 20 Dec 2025 23:30:04 +0000 (16:30 -0700)] 
Merge remote-tracking branch 'main/main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoiplink_can: add CAN XL TMS PWM configuration support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:34 +0000 (19:24 +0100)] 
iplink_can: add CAN XL TMS PWM configuration support

This is the iproute2 counterpart of Linux kernel's commit 46552323fa67
("can: netlink: add PWM netlink interface").

When the TMS is switched on, the node uses PWM (Pulse Width Modulation)
during the data phase instead of the classic NRZ (Non Return to Zero)
encoding.

PWM is configured by three parameters:

  - PWMS: Pulse Width Modulation Short phase
  - PWML: Pulse Width Modulation Long phase
  - PWMO: Pulse Width Modulation Offset time

For each of these parameters, the CAN netlink interface defines three IFLA
symbols:

  - IFLA_CAN_PWM_PWM*_MIN: the minimum allowed value.
  - IFLA_CAN_PWM_PWM*_MAX: the maximum allowed value.
  - IFLA_CAN_PWM_PWM*: the runtime value.

This results in a total of nine IFLA symbols which are all nested in a
parent IFLA_CAN_XL_PWM symbol.

Add the "pwms", "pwml" and "pwmo" options to iplink_can which controls the
IFLA_CAN_PWM_PWM* runtime values.

Add the logic to query and print all those IFLA values. Update
print_usage() accordingly.

Example using the dummy_can driver:

  # modprobe dummy_can
  # ip link set can0 type can bitrate 1000000 xl on xbitrate 20000000 tms on
  $ ip --details link show can0
  5: can0: <NOARP> mtu 2060 qdisc noop state DOWN mode DEFAULT group default qlen 10
      link/can  promiscuity 0 allmulti 0 minmtu 76 maxmtu 2060
      can <XL,TMS> state STOPPED restart-ms 0
     bitrate 1000000 sample-point 0.750
     tq 6 prop-seg 59 phase-seg1 60 phase-seg2 40 sjw 20 brp 1
     dummy_can CC: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
     dummy_can FD: dtseg1 2..256 dtseg2 2..128 dsjw 1..128 dbrp 1..512 dbrp_inc 1
     tdco 0..127 tdcf 0..127
     xbitrate 20000000 xsample-point 0.625
     xtq 6 xprop-seg 2 xphase-seg1 2 xphase-seg2 3 xsjw 1 xbrp 1
     pwms 2 pwml 6 pwmo 0
     dummy_can XL: xtseg1 2..256 xtseg2 2..128 xsjw 1..128 xbrp 1..512 xbrp_inc 1
     xtdco 0..127 xtdcf 0..127
     pwms 1..8 pwml 2..24 pwmo 0..16
     clock 160000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 65536 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: add CAN XL transceiver mode setting (TMS) support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:33 +0000 (19:24 +0100)] 
iplink_can: add CAN XL transceiver mode setting (TMS) support

This is the iproute2 counterpart of Linux kernel's commit 233134af2086
("can: netlink: add CAN_CTRLMODE_XL_TMS flag").

The Transceiver Mode Switching (TMS) indicates whether the CAN XL
controller shall use the PWM or NRZ encoding during the data phase.

The term "transceiver mode switching" is used in both ISO 11898-1 and CiA
612-2 (although only the latter one uses the abbreviation TMS). We adopt
the same naming convention here for consistency.

Add the "tms" option to iplink_can which controls the CAN_CTRLMODE_XL_TMS
flag of the CAN netlink interface.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: add initial CAN XL support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:32 +0000 (19:24 +0100)] 
iplink_can: add initial CAN XL support

This is the iproute2 counterpart of Linux kernel's commit e63281614747
("can: netlink: add initial CAN XL support").

CAN XL uses bittiming parameters different from Classical CAN and CAN FD.
Thus, all the data bittiming parameters, including TDC, need to be
duplicated for CAN XL.

Add the "xl" option to iplink_can which controls the CAN_CTRLMODE_XL flag
of the netlink interface. Then add the "xbitrate", "xsample-point", "xtq",
"xprop-seg", "xphase-seg1", "xphase-seg2", "xsjw", "xtdcv", "xtdco",
"xtdcf" and "xtdc-mode" which are all sub options of "xl". Add the logic to
query and print all those values. Update print_usage() accordingly.

All these options behave similarly to their CAN FD equivalent.

The new options which are specific to CAN XL (i.e. not inherited from CAN
FD) will be added in a subsequent change.

Example using the dummy_can driver:

  # modprobe dummy_can
  # ip link set can0 type can bitrate 500000 fd on dbitrate 2000000 xl on xbitrate 8000000
  $ ip --details link show can0
  5: can0: <NOARP> mtu 2060 qdisc noop state DOWN mode DEFAULT group default qlen 10
      link/can  promiscuity 0 allmulti 0 minmtu 76 maxmtu 2060
      can <FD,TDC-AUTO,XL,XL-TDC-AUTO> state STOPPED restart-ms 0
     bitrate 500000 sample-point 0.875
     tq 12 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 10 brp 2
     dummy_can CC: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp_inc 1
     dbitrate 2000000 dsample-point 0.750
     dtq 6 dprop-seg 29 dphase-seg1 30 dphase-seg2 20 dsjw 10 dbrp 1
     tdco 60 tdcf 0
     dummy_can FD: dtseg1 2..256 dtseg2 2..128 dsjw 1..128 dbrp 1..512 dbrp_inc 1
     tdco 0..127 tdcf 0..127
     xbitrate 8000000 xsample-point 0.750
     xtq 6 xprop-seg 7 xphase-seg1 7 xphase-seg2 5 xsjw 2 xbrp 1
     xtdco 15 xtdcf 0
     dummy_can XL: xtseg1 2..256 xtseg2 2..128 xsjw 1..128 xbrp 1..512 xbrp_inc 1
     xtdco 0..127 xtdcf 0..127
     clock 160000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 65536 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: add RESTRICTED operation mode support
Vincent Mailhol [Wed, 3 Dec 2025 18:24:31 +0000 (19:24 +0100)] 
iplink_can: add RESTRICTED operation mode support

This is the iproute2 counterpart of Linux kernel's commit 60f511f443e5
("can: netlink: add CAN_CTRLMODE_RESTRICTED").

ISO 11898-1:2024 adds a new restricted operation mode. This mode is added
as a mandatory feature for nodes which support CAN XL and is retrofitted as
optional for legacy nodes (i.e. the ones which only support Classical CAN
and CAN FD).

The restricted operation mode is nearly the same as the listen only mode:
the node can not send data frames or remote frames and can not send
dominant bits if an error occurs. The only exception is that the node shall
still send the acknowledgment bit.

Add the "restricted" option to iplink_can which controls the
CAN_CTRLMODE_RESTRICTED flag of the netlink interface.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: print_usage: describe the CAN bittiming units
Vincent Mailhol [Wed, 3 Dec 2025 18:24:30 +0000 (19:24 +0100)] 
iplink_can: print_usage: describe the CAN bittiming units

While the meaning of "bps" or "ns" may be relatively easy to understand,
some of the CAN specific units such as "mtq" (minimum time quanta) may be
harder to understand.

Add a new paragraph to the help menu which describes all the different
units used for the CAN bittiming parameters.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: print_usage: change unit for minimum time quanta to mtq
Vincent Mailhol [Wed, 3 Dec 2025 18:24:29 +0000 (19:24 +0100)] 
iplink_can: print_usage: change unit for minimum time quanta to mtq

In the vast majority of the available CAN datasheets, the minimum time
quanta is abbreviated as "mtq". Note that the ISO standard uses "tqmin"
(with the "min" part as a subscript).

One fact is that no one seems to be using "tc". I was actually the one who
initially proposed to use "tc", but I can not recall anymore the reasoning
behind that.

Change the minimum time quanta unit from "tc" to "mtq" to follow what the
majority of the industry does.

Fixes: 0c263d7c36ff ("iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)")
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agoiplink_can: print_usage: fix the text indentation
Vincent Mailhol [Wed, 3 Dec 2025 18:24:28 +0000 (19:24 +0100)] 
iplink_can: print_usage: fix the text indentation

The description of the BITRATE variable is not correctly aligned with the
other ones. Put it on a new line with the same indentation as the other
variables.

This done, reindent everything to only one tabulation (was one tabulation
and two spaces before).

Before this patch...:

  $ ip link help can
  Usage: ip link set DEVICE type can

  (...)

   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:

  $ ip link help can
  Usage: ip link set DEVICE type can

  (...)

   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 }

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
4 months agouapi: update from 6.19 merge window
Stephen Hemminger [Sun, 7 Dec 2025 16:56:25 +0000 (08:56 -0800)] 
uapi: update from 6.19 merge window

Early grab of headers to allow for CAN update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 months agofix 'UINT_MAX' undeclared with build with musl libc
Akhilesh Nema [Wed, 3 Dec 2025 02:11:24 +0000 (18:11 -0800)] 
fix 'UINT_MAX' undeclared with build with musl libc

- utils_math.c:136:20: error: 'UINT_MAX' undeclared (first use in this function)
- tc_core.c:51:22: error: 'UINT_MAX' undeclared (first use in this function)

Signed-off-by: Akhilesh Nema <nemaakhilesh@gmail.com>
4 months agoMerge ssh://gitolite.kernel.org/pub/scm/network/iproute2/iproute2-next
Stephen Hemminger [Fri, 5 Dec 2025 20:21:42 +0000 (12:21 -0800)] 
Merge ssh://gitolite.kernel.org/pub/scm/network/iproute2/iproute2-next

4 months agoMerge branch 'mptcp-new-endpoint' into next
David Ahern [Tue, 2 Dec 2025 02:28:50 +0000 (19:28 -0700)] 
Merge branch 'mptcp-new-endpoint' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agomptcp: monitor: support 'server side' as a flag
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:26 +0000 (12:19 +0100)] 
mptcp: monitor: support 'server side' as a flag

In the v6.18 kernel, the 'server side' attribute has been deprecated [1]
in favour of the 'server side' flag [2].

Support both: first checking the new flag, then the old attribute to
continue supporting older kernels.

Link: https://git.kernel.org/torvalds/c/c8bc168f5f3d
Link: https://git.kernel.org/torvalds/c/3d7ae91107b8
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agomptcp: monitor: add 'deny join id0' info
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:25 +0000 (12:19 +0100)] 
mptcp: monitor: add 'deny join id0' info

Until recently, the 'flags' attribute was not used. This has recently
been changed with the introduction of the 'deny_join_id0' flag [1].

This flag is set when a connection is created and the other peer set the
'C' flag in the MP_CAPABLE packets [2]. This flag can be set to tell the
other side that the peer will not accept extra subflows requests sent to
its initial IP address and port: typically set by a server behind a
legacy Layer 4 load balancer.

Now, when this flag is set, "deny_join_id0" will be printed instead of
"flags=1". Unknown remaining flags will be printed in hexadecimal at the
end, e.g. "flags=0x2".

Link: https://git.kernel.org/torvalds/c/2293c57484ae
Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.1-20.6
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agomptcp: monitor: add 'server side' info
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:24 +0000 (12:19 +0100)] 
mptcp: monitor: add 'server side' info

This info has been added a while ago in the kernel [1], but it was not
displayed in 'ip monitor'.

Now, 'server_side' is displayed if the attribute is defined and set to
true. It looks better to do that instead of showing server_side=0. Note
that since v6.18 [2], this attribute is only defined if it is set to
true.

Link: https://git.kernel.org/torvalds/c/41b3c69bf941
Link: https://git.kernel.org/torvalds/c/c9809f03c158
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agomptcp: add 'laminar' endpoint support
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:23 +0000 (12:19 +0100)] 
mptcp: add 'laminar' endpoint support

This new endpoint type has been recently added to the kernel in v6.18
[1]. It will be used to create new subflows from the associated address
to additional addresses announced by the other peer. This will be done
if allowed by the MPTCP limits, and if the associated address is not
already being used by another subflow from the same MPTCP connection.

Note that the fullmesh flag takes precedence over the laminar one.
Without any of these two flags, the path-manager will create new
subflows to additional addresses announced by the other peer by
selecting the source address from the routing tables, which is harder to
configure if the announced address is not known in advance.

The support of the new flag is easy: simply by adding it in the
mptcp_addr_flag_names array.

The usage menu and the manual now references the new endpoint type. The
new corresponding counter has also been added in ss.

Link: https://git.kernel.org/torvalds/c/539f6b9de39e
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoman: mptcp: fix minor typos
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:22 +0000 (12:19 +0100)] 
man: mptcp: fix minor typos

- 'signaled' -> 'signalled'

- 'a implicit' -> 'an implicit'

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoMAINTAINERS: add entry for mptcp
Matthieu Baerts (NGI0) [Mon, 24 Nov 2025 11:19:21 +0000 (12:19 +0100)] 
MAINTAINERS: add entry for mptcp

Add Matthieu as main maintainer, but also the MPTCP Linux mailing list
to reach more people interested by MPTCP when submitting patches on this
subject.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agov6.18.0 v6.18.0
Stephen Hemminger [Mon, 1 Dec 2025 16:47:16 +0000 (08:47 -0800)] 
v6.18.0

4 months agotuntap: add missing brackets to json output
Stephen Hemminger [Sun, 23 Nov 2025 16:49:49 +0000 (08:49 -0800)] 
tuntap: add missing brackets to json output

The set of processes attached to tuntap are displayed
as JSON array, but was missing the inner brackets to
allow for multiple processes.

Fixes: 689bef5dc97a ("tuntap: support JSON output")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 months agogenl: move print_policy into genl
Stephen Hemminger [Sat, 15 Nov 2025 17:19:17 +0000 (09:19 -0800)] 
genl: move print_policy into genl

The function nl_print_policy was only used in the genl code
so it should be moved to that file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agogenl: add json support
Stephen Hemminger [Sat, 15 Nov 2025 17:19:16 +0000 (09:19 -0800)] 
genl: add json support

Cleanup the old code and support for JSON output.
The non-json output is the same as before the patch.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoMerge branch 'dpll' into next
David Ahern [Fri, 21 Nov 2025 16:12:27 +0000 (09:12 -0700)] 
Merge branch 'dpll' into next

Petr Oros  says:

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

This patch series adds a new userspace tool for managing and monitoring
DPLL (Digital Phase-Locked Loop) devices via the Linux kernel DPLL
subsystem.

The series includes preparatory patches to move shared code to lib/ and
the main dpll tool implementation with full support for device/pin
management, monitoring, and JSON output.

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

Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agodpll: Add dpll command
Petr Oros [Tue, 18 Nov 2025 14:10:31 +0000 (15:10 +0100)] 
dpll: Add dpll command

Add a new userspace tool for managing and monitoring DPLL devices via the
Linux kernel DPLL subsystem. The tool uses libmnl for netlink communication
and provides a complete interface for device and pin configuration.

The tool supports:

- Device management: enumerate devices, query capabilities (lock status,
  temperature, supported modes, clock quality levels), configure phase-offset
  monitoring and averaging

- Pin management: enumerate pins with hierarchical relationships, configure
  frequencies (including esync), phase adjustments, priorities, states, and
  directions

- Complex topologies: handle parent-device and parent-pin relationships,
  reference synchronization tracking, multi-attribute queries (frequency
  ranges, capabilities)

- ID resolution: query device/pin IDs by various attributes (module-name,
  clock-id, board-label, type)

- Monitoring: real-time display of device and pin state changes via netlink
  multicast notifications

- Output formats: both human-readable and JSON output (with pretty-print
  support)

The tool belongs in iproute2 as DPLL devices are tightly integrated with
network interfaces - modern NICs provide hardware clock synchronization
support. The DPLL subsystem uses the same netlink infrastructure as other
networking subsystems, and the tool follows established iproute2 patterns
for command structure, output formatting, and error handling.

Example usage:

  # dpll device show
  # dpll device id-get module-name ice
  # dpll device set id 0 phase-offset-monitor enable
  # dpll pin show
  # dpll pin set id 0 frequency 10000000
  # dpll pin set id 13 parent-device 0 state connected prio 10
  # dpll pin set id 0 reference-sync 1 state connected
  # dpll monitor
  # dpll -j -p device show

Testing notes:

Tested on real hardware with ice and zl3073x drivers. All commands work
(device show/set/id-get, pin show/set/id-get, monitor). JSON output was
carefully compared with cli.py - the tools are interchangeable.

v2:
- Added testing notes
- Added MAINTAINERS entry
- Removed unused -n parameter from man page
v3:
- Use shared mnlg and str_to_bool helpers from lib
- Use str_num_map for bidirectional string/enum mapping
- Remove unnecessary else after return
- Remove misleading "legacy" comments
- Simplify DPLL_PR_MULTI_ENUM_STR macro
- Convert json_output to global json variable
- Use appropriate mnl helpers with proper type casting to respect signed integer data types
- Use DPLL_PR_INT_FMT for phase-adjust-gran to respect signed integer type
- Remove dpll_link from Makefile (mistake in v2)
v4:
- Replace DPLL_PR_MULTI_ENUM_STR macro with dpll_pr_multi_enum_str() function
- Replace pr_out("\n") with print_nl() for one-line mode support
- Remove all is_json_context() code splitting, use PRINT_FP/PRINT_JSON/PRINT_ANY appropriately
- Add dpll_pr_freq_range() helper function to reduce code duplication
v5
- Fix checkpatch warnings
- Use structure initialization instead of memset
- Use sigemptyset() for proper signal mask initialization
- Remove redundant if (json) checks around JSON functions
- Use signalfd for signal handling in monitor
- Set netlink socket to non-blocking in monitor

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Co-developed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agouapi: import dpll.h from last sync point
David Ahern [Fri, 21 Nov 2025 16:11:28 +0000 (09:11 -0700)] 
uapi: import dpll.h from last sync point

Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agolib: Add str_to_bool helper function
Petr Oros [Tue, 18 Nov 2025 14:10:30 +0000 (15:10 +0100)] 
lib: Add str_to_bool helper function

Add str_to_bool() helper function to lib/utils.c that uses
parse_one_of() to parse boolean values. Update devlink to
use this common implementation.

Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agolib: Move mnlg to lib for shared use
Petr Oros [Tue, 18 Nov 2025 14:10:29 +0000 (15:10 +0100)] 
lib: Move mnlg to lib for shared use

Move mnlg.c to lib/ and mnlg.h to include/ to allow code reuse
across multiple tools.

Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoUpdate kernel headers
David Ahern [Fri, 21 Nov 2025 16:05:58 +0000 (09:05 -0700)] 
Update kernel headers

Update kernel headers to commit:
e2c20036a887: ("Merge branch 'devlink-net-mlx5-implement-swp_l4_csum_mode-via-devlink-params'")

Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agodevlink: Support DEVLINK_ESWITCH_MODE_SWITCHDEV_INACTIVE
Saeed Mahameed [Fri, 7 Nov 2025 00:14:35 +0000 (16:14 -0800)] 
devlink: Support DEVLINK_ESWITCH_MODE_SWITCHDEV_INACTIVE

Add support for the new inactive switchdev mode [1].

A user can start the eswitch in switchdev or switchdev_inactive mode.

Active: Traffic is enabled on this eswitch FDB.
Inactive: Traffic is ignored/dropped on this eswitch FDB.

An example use case:
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev_inactive
Setup FDB pipeline and netdev representors
...
Once ready to start receiving traffic
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev

[1] https://lore.kernel.org/all/20251107000831.157375-1-saeed@kernel.org/

Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
4 months agoUpdate kernel headers
David Ahern [Sat, 15 Nov 2025 01:16:24 +0000 (18:16 -0700)] 
Update kernel headers

Update kernel headers to commit:
df58ee7d8faf: ("Merge branch 'net-phy-mscc-add-support-for-phy-led-control'")

Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agonetshaper: ignore build result
Stephen Hemminger [Sat, 8 Nov 2025 18:24:39 +0000 (10:24 -0800)] 
netshaper: ignore build result

If netshaper is built locally, ignore the result.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agonetshaper: remove unused variable
Stephen Hemminger [Sat, 8 Nov 2025 17:33:29 +0000 (09:33 -0800)] 
netshaper: remove unused variable

Clang complains that the variable 'n' used for nlmsghdr is passed
uninitiailized. Remove it because it is never used.

Fixes: 6f7779ad4ef6 ("netshaper: Add netshaper command")
Cc: ernis@linux.microsoft.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agouapi: update to virtio_net.h
Stephen Hemminger [Thu, 6 Nov 2025 23:10:16 +0000 (15:10 -0800)] 
uapi: update to virtio_net.h

Update from 6.18-rc4

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agodevlink: Add support for 64bit parameters
Ivan Vecera [Thu, 30 Oct 2025 19:42:00 +0000 (20:42 +0100)] 
devlink: Add support for 64bit parameters

Kernel commit c0ef144695910 ("devlink: Add support for u64 parameters")
added support for 64bit devlink parameters, add the support for them
also into devlink utility userspace counterpart.

Tested on Microchip EDS2 development board...

Prior patch:

root@eds2:~# devlink dev param set i2c/1-0070 name clock_id value 1234 cmode driverinit
Value type not supported
root@eds2:~#

After patch:

root@eds2:~# devlink dev param set i2c/1-0070 name clock_id value 1234 cmode driverinit
root@eds2:~#

Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoMerge remote-tracking branch 'main' into next
David Ahern [Mon, 3 Nov 2025 16:44:36 +0000 (09:44 -0700)] 
Merge remote-tracking branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoip-xfrm: add pcpu-num support
Sabrina Dubroca [Wed, 29 Oct 2025 11:06:16 +0000 (12:06 +0100)] 
ip-xfrm: add pcpu-num support

The kernel supports passing the XFRMA_SA_PCPU attribute when creating
a state (via NEWSA or ALLOCSPI). Add a "pcpu-num" argument, and print
XFRMA_SA_PCPU when the kernel provides it.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoiplink: hsr: add protocol version to print_opt output
Jan Vaclav [Mon, 27 Oct 2025 13:52:06 +0000 (14:52 +0100)] 
iplink: hsr: add protocol version to print_opt output

Since this attribute is now exposed by kernel in net-next[1],
let's also add it here, so that it can be inspected from
userspace.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=16a2206354d1

Signed-off-by: Jan Vaclav <jvaclav@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agonetshaper: fix build failure
Andrea Claudi [Tue, 28 Oct 2025 22:17:56 +0000 (23:17 +0100)] 
netshaper: fix build failure

netshaper fails to build from sources with this error:

$ make
netshaper
    CC       netshaper.o
    LINK     netshaper
/usr/bin/ld: ../lib/libutil.a(utils_math.o): in function `get_rate':
utils_math.c:(.text+0x97): undefined reference to `floor'
/usr/bin/ld: ../lib/libutil.a(utils_math.o): in function `get_size64':
utils_math.c:(.text+0x2a8): undefined reference to `floor'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:10: netshaper] Error 1
make: *** [Makefile:81: all] Error 2

Fix this simply linking against the math C library, similarly to what we
already did with commit 1a22ad2721fb ("build: Fix link errors on some
systems").

Fixes: 6f7779ad4ef6 ("netshaper: Add netshaper command")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agodevlink: fix devlink flash error reporting
Ivan Vecera [Wed, 22 Oct 2025 12:23:02 +0000 (14:23 +0200)] 
devlink: fix devlink flash error reporting

Currently, devlink silently exits when a non-existent device is specified
for flashing or when the user lacks sufficient permissions. This makes it
hard to diagnose the problem.

Print an appropriate error message in these cases to improve user feedback.

Prior:
$ devlink dev flash foo/bar file test
$ sudo devlink dev flash foo/bar file test
$

After patch:
$ devlink/devlink dev flash foo/bar file test
devlink answers: Operation not permitted
$ sudo devlink/devlink dev flash foo/bar file test
devlink answers: No such device

Fixes: 9b13cddfe268 ("devlink: implement flash status monitoring")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agoMerge remote-tracking branch 'main' into next
David Ahern [Sun, 26 Oct 2025 23:20:37 +0000 (17:20 -0600)] 
Merge remote-tracking branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agolnstat: convert to high-level json_print API
Andrea Claudi [Tue, 21 Oct 2025 20:39:18 +0000 (22:39 +0200)] 
lnstat: convert to high-level json_print API

Replace the low-level json_writer API calls with the high-level
json_print API to maintain consistency with the rest of the iproute2
codebase.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agonstat: convert to high-level json_print API
Andrea Claudi [Tue, 21 Oct 2025 20:39:17 +0000 (22:39 +0200)] 
nstat: convert to high-level json_print API

Replace the low-level json_writer API calls with the high-level
json_print API to maintain consistency with the rest of the iproute2
codebase.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoifstat: convert to high-level json_print API
Andrea Claudi [Tue, 21 Oct 2025 20:39:16 +0000 (22:39 +0200)] 
ifstat: convert to high-level json_print API

Replace the low-level json_writer API calls with the high-level
json_print API to maintain consistency with the rest of the iproute2
codebase.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoRevert "mptcp: add implicit flag to the 'ip mptcp' inline help"
Stephen Hemminger [Wed, 22 Oct 2025 17:06:04 +0000 (10:06 -0700)] 
Revert "mptcp: add implicit flag to the 'ip mptcp' inline help"

This reverts commit 14749b22dd8f2246511c6622c2a4646adfc5b184.
Only kernel can create implicit endpoints.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agomptcp: add implicit flag to the 'ip mptcp' inline help
Andrea Claudi [Tue, 21 Oct 2025 19:26:56 +0000 (21:26 +0200)] 
mptcp: add implicit flag to the 'ip mptcp' inline help

ip mptcp supports the implicit flag since commit 3a2535a41854 ("mptcp:
add support for implicit flag"), however this flag is not listed in the
command inline help.

Add the implicit flag to the inline help.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agodcb: fix tc-maxrate unit conversions
Yijing Zeng [Sat, 11 Oct 2025 22:25:24 +0000 (15:25 -0700)] 
dcb: fix tc-maxrate unit conversions

The ieee_maxrate UAPI is defined as kbps, but dcb_maxrate uses Bps.
This fix patch converts Bps to kbps for parse by dividing 125,
and convert kbps to Bps for print_rate() by multiplying 125.

Fixes: 117939d9bd89 ("dcb: Add a subtool for the DCB maxrate object")
Signed-off-by: Yijing Zeng <yijingzeng@meta.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agonetshaper: update include files
Stephen Hemminger [Thu, 16 Oct 2025 21:58:37 +0000 (14:58 -0700)] 
netshaper: update include files

Use iwyu to make sure all includes are listed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agonetshaper: Add netshaper command
Erni Sri Satya Vennela [Tue, 7 Oct 2025 11:06:14 +0000 (04:06 -0700)] 
netshaper: Add netshaper command

Add support for the netshaper Generic Netlink family to
iproute2. Introduce a new command for configuring netshaper
parameters directly from userspace.

This interface allows users to set shaping attributes which
are passed to the kernel to perform the corresponding netshaper
operation.

Example usage:
$netshaper { set | show | delete } dev DEV \
           handle scope SCOPE [id ID] \
           [ bw-max BW_MAX ]

Internally, this triggers a kernel call to apply the shaping
configuration to the specified network device.

Currently, the tool supports the following functionalities:
- Setting bandwidth in Mbps, enabling bandwidth clamping for
  a network device that support netshaper operations.
- Deleting the current configuration.
- Querying the existing configuration.

Additional netshaper operations will be integrated into the tool
as per requirement.

This change enables easy and scriptable configuration of bandwidth
shaping for devices that use the netshaper Netlink family.

Corresponding net-next patches:
1) https://lore.kernel.org/all/cover.1728460186.git.pabeni@redhat.com/
2) https://lore.kernel.org/lkml/1750144656-2021-1-git-send-email-ernis@linux.microsoft.com/

Install pkg-config and libmnl* packages to print kernel extack
errors to stdout.

Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agouapi: update headers to 6.18-rc1
Stephen Hemminger [Thu, 16 Oct 2025 21:53:27 +0000 (14:53 -0700)] 
uapi: update headers to 6.18-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agolib: bridge: avoid redefinition of in6_addr
Yureka [Sun, 12 Oct 2025 12:39:47 +0000 (14:39 +0200)] 
lib: bridge: avoid redefinition of in6_addr

On musl libc, which does not use the kernel definitions of in6_addr, including
the libc headers after the kernel (UAPI) headers would cause a redefinition
error. The opposite order avoids the redefinition.

Fixes: 9e89d5b94d749f37525cd8778311e1c9f28f172a
Signed-off-by: Yureka <yureka@cyberchaos.dev>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 months agodevlink: Introduce burst period for health reporter
Shahar Shitrit [Wed, 8 Oct 2025 06:57:18 +0000 (09:57 +0300)] 
devlink: Introduce burst period for health reporter

Add a new devlink health set option to configure the health
reporter’s burst period. The burst period defines a time window
during which recovery attempts for reported errors are allowed.
Once this period expires, the configured grace period begins.

This feature addresses cases where multiple errors occur
simultaneously due to a common root cause. Without a burst period,
the grace period starts immediately after the first error recovery
attempt finishes. This means that only the first error might be
recovered, while subsequent errors are blocked during the grace period.
With the burst period, the reporter initiates a recovery attempt for
every error reported within this time window before the grace period
starts.

Example:
$ devlink health set pci/0000:00:09.0 reporter tx burst_period 500

Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 months agoMerge remote-tracking branch 'main' into next
David Ahern [Thu, 16 Oct 2025 15:19:22 +0000 (09:19 -0600)] 
Merge remote-tracking branch 'main' into next

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