]> git.ipfire.org Git - thirdparty/iproute2.git/log
thirdparty/iproute2.git
43 hours agoMerge remote-tracking branch 'main/main' into next main
David Ahern [Thu, 16 Apr 2026 01:13:12 +0000 (19:13 -0600)] 
Merge remote-tracking branch 'main/main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
2 days agoss: force a flush in monitor mode
Eric Dumazet [Wed, 15 Apr 2026 13:03:07 +0000 (13:03 +0000)] 
ss: force a flush in monitor mode

Call fflush() from generic_show_sock() in order to work
with pipes and redirects.

After this patch, "ss -E &>log_file" works as expected.

Signed-off-by: Eric Dumazet <edumazet@google.com>
4 days agov7.0.0 v7.0.0
Stephen Hemminger [Mon, 13 Apr 2026 19:02:03 +0000 (12:02 -0700)] 
v7.0.0

6 days agojson_writer: fix builtin test code
Stephen Hemminger [Fri, 10 Apr 2026 22:46:27 +0000 (15:46 -0700)] 
json_writer: fix builtin test code

The code under #ifdef was not generating valid JSON
and it is missing test for control characters.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 days agojson_writer: support control character escaping
Stephen Hemminger [Fri, 10 Apr 2026 22:38:36 +0000 (15:38 -0700)] 
json_writer: support control character escaping

Iproute2 never handled control characters in strings correctly.
There are some cases like where string is under user control
like paths in ss command. Make iproute2 json output conform
to RFC 8259.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
10 days agoman8: update seg6 encap documentation
Justin Iurman [Fri, 20 Mar 2026 14:08:47 +0000 (15:08 +0100)] 
man8: update seg6 encap documentation

Include "tunsrc" in the man page.

Signed-off-by: Justin Iurman <justin.iurman@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
10 days agoseg6: add tunsrc support in iproute_lwtunnel
Justin Iurman [Fri, 20 Mar 2026 14:08:46 +0000 (15:08 +0100)] 
seg6: add tunsrc support in iproute_lwtunnel

Add support for the new optional "tunsrc" parameter. Now, a tunnel
source address can be configured per route and has priority over the
configured per-netns source address (if any).

Example:
ip -6 r a 2001:db8:1::/64 encap seg6 mode encap tunsrc 2001:db8:ab::
    segs 2001:db8:42::1,2001:db8:ffff::2 dev eth0

Signed-off-by: Justin Iurman <justin.iurman@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agodpll: Send object per event in JSON monitor mode
Vitaly Grinberg [Sun, 29 Mar 2026 07:51:01 +0000 (10:51 +0300)] 
dpll: Send object per event in JSON monitor mode

Previously, monitor mode wrapped all events in a single JSON array
inside a top-level object, which made piping the output to external
tools (such as `jq`) impossible.
Send a separate JSON object for each event in monitor mode,
making the output suitable for line-by-line consumers. Skip the
global JSON wrapper for monitor mode.

Signed-off-by: Vitaly Grinberg <vgrinber@redhat.com>
Reviewed-by: Petr Oros <poros@redhat.com>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agoMerge branch 'frmr-pools' into next
David Ahern [Sun, 5 Apr 2026 17:07:21 +0000 (11:07 -0600)] 
Merge branch 'frmr-pools' into next

Chiara Meiohas  says:

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

This series adds support for managing Fast Registration Memory Region
(FRMR) pools in rdma tool, enabling users to monitor and configure FRMR
pool behavior.

FRMR pools are used to cache and reuse Fast Registration Memory Region
handles to improve performance by avoiding the overhead of repeated
memory region creation and destruction. This series introduces commands
to view FRMR pool statistics and configure pool parameters such as
aging time and pinned handle count.

The 'show' command allows users to display FRMR pools created on
devices, their properties, and usage statistics. Each pool is identified
by a unique key (hex-encoded properties) for easy reference in
subsequent operations.

The aging 'set' command allows users to modify the aging time parameter,
which controls how long unused FRMR handles remain in the pool before
being released.

The pinned 'set' command allows users to configure the number of pinned
handles in a pool. Pinned handles are exempt from aging and remain
permanently available for reuse, which is useful for workloads with
predictable memory region usage patterns.

Command usage and examples are included in the commits and man pages.

These patches are complimentary to the kernel patches:
https://lore.kernel.org/linux-rdma/20260226-frmr_pools-v4-0-95360b54f15e@nvidia.com/

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

Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agordma: Add FRMR pools set pinned command
Michael Guralnik [Mon, 30 Mar 2026 17:31:18 +0000 (20:31 +0300)] 
rdma: Add FRMR pools set pinned command

Add an option to set the amount of pinned handles to FRMR pool.
Pinned handles are not affected by aging and stay available for reuse in
the FRMR pool.

The pool is identified by a colon-separated key of hexadecimal fields
(vendor_key:num_dma_blocks:access_flags:ats) as shown in the 'show'
command output.

Usage:
  Set 250 pinned handles to FRMR pool with key 0:800:0:0 on
  device rocep8s0f0
  $rdma resource set frmr_pools dev rocep8s0f0 pinned 0:800:0:0 250

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Chiara Meiohas <cmeiohas@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agordma: Add FRMR pools set aging command
Michael Guralnik [Mon, 30 Mar 2026 17:31:17 +0000 (20:31 +0300)] 
rdma: Add FRMR pools set aging command

Add support for configuring the aging period of FRMR pools.
The aging mechanism frees unused FRMR handles that have not been
in use for the specified period.

Usage:
  rdma resource set frmr_pools dev DEV aging AGING_PERIOD

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Chiara Meiohas <cmeiohas@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agordma: Add resource FRMR pools show command
Michael Guralnik [Mon, 30 Mar 2026 17:31:16 +0000 (20:31 +0300)] 
rdma: Add resource FRMR pools show command

Allow users to see the FRMR pools that were created on the devices,
their properties and their usage statistics.
The set of properties of each pool are encoded as a colon-separated
list of hexadecimal fields (vendor_key:num_dma_blocks:access_flags:ats)
to simplify referencing a specific pool in 'set' commands.

Sample output:

$rdma resource show frmr_pools
dev rocep8s0f0 key 0:1000:0:0 queue 0 in_use 0 max_in_use 200
dev rocep8s0f0 key 0:800:0:0 queue 0 in_use 0 max_in_use 200
dev rocep8s0f0 key 0:400:0:0 queue 0 in_use 0 max_in_use 200

$rdma resource show frmr_pools -d
dev rocep8s0f0 key 0:1000:0:0 ats 0 access_flags 0 vendor_key 0 num_dma_blocks 4096 queue 0 in_use 0 max_in_use 200
dev rocep8s0f0 key 0:800:0:0 ats 0 access_flags 0 vendor_key 0 num_dma_blocks 2048 queue 0 in_use 0 max_in_use 200
dev rocep8s0f0 key 0:400:0:0 ats 0 access_flags 0 vendor_key 0 num_dma_blocks 1024 queue 0 in_use 0 max_in_use 200

$rdma resource show frmr_pools num_dma_blocks 2048
dev rocep8s0f0 key 0:800:0:0 queue 0 in_use 0 max_in_use 200

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Chiara Meiohas <cmeiohas@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agordma: Update headers
Michael Guralnik [Mon, 30 Mar 2026 17:31:15 +0000 (20:31 +0300)] 
rdma: Update headers

Update rdma_netlink.h file up to kernel commit dbd0472fd7a5
("RDMA/nldev: Expose kernel-internal FRMR pools in netlink")

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Chiara Meiohas <cmeiohas@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agoUpdate kernel headers
David Ahern [Sun, 5 Apr 2026 16:34:21 +0000 (10:34 -0600)] 
Update kernel headers

Update kernel headers to commit:
3741f8fa004b: ("Merge branch 'dpll-add-frequency-monitoring-feature'")

Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agoMerge branch 'tc-64b-burst' into next
David Ahern [Sun, 5 Apr 2026 16:32:35 +0000 (10:32 -0600)] 
Merge branch 'tc-64b-burst' into next

Ioana Lazea  says:

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

        This patchset updates the TBF and HTB queuing discipline
configurations to support burst sizes beyond the legacy 32-bit limits.
As network interface speeds increase, the kernel’s internal
representation of burst (calculated as time at a specific rate) can
easily exceed the 4 GB threshold. These changes enable userspace to
accommodate these larger values where the kernel API allows.

        Additionally, if the burst exceeds the upper limit supported by
the kernel API, it is now reported as an error in userspace before
attempting the Netlink transition. Previously, such values would
silently overflow, causing corrupted values to be passed to the kernel.

        The implementation follows the approach used for tc police burst
handling introduced in commit 3b26e8abf404 ("tc/police: enable use of 64
bit burst parameter"). The reasoning behind the patches proposed here is
largely based on the rationale described in the aforementioned change.

        Similarly to the case of the tc police burst option, as
implemented now the TBF and HTB burst option limit the sizes of the
burst up to 4 GB (UINT_MAX for a 32 bit unsigned int) due to the
constraints in the user space tooling. Historically, TBF and HTB burst
options were capped at 32 bits, which was a sufficient limit for the
lower line rates common when they were initially developed. However,
since the underlying kernel logic treats the burst as a time-based
value, it is already capable of handling larger sizes at high rates
without requiring internal modifications. This patchset bridges that gap
in the user space tools.

        The detailed technical explanation for this change was
previously detailed by Jay Vosburgh:

Link: https://lore.kernel.org/netdev/20250916215731.3431465-1-jay.vosburgh@canonical.com/
        To summarize the details at the link, the burst size is limited
by the kernel to approximately 274 seconds at the specified rate, and
has no inherent 4 GB limit.

        Below is a short description of the main changes made to the TBF
and HTB queuing disciplines.

        In both TBF and HTB, the primary modification replaces the
unsigned integer burst variable with an unsigned 64 bit integer variable
(buffer64) so that burst sizes larger than 4 GB can be represented and
passed correctly through the kernel API.

        For the TBF qdisc specifically, the following logic was added:

if (buffer64 < (1ULL << 32)) {
        __u32 buffer32 = (__u32)buffer64;

        addattr_l(n, 2124, TCA_TBF_BURST, &buffer32, sizeof(buffer32));
}

        Increasing the burst size representation to 64 bits introduces
an issue with TCA_TBF_BURST. The kernel expects this attribute as
NLA_U32 (a 32-bit unsigned value), while the updated implementation may
produce burst values exceeding this range. Passing such values would
cause the tbf_policy validation in the kernel to fail. To avoid this,
TCA_TBF_BURST is only included when the value fits within 32 bits. When
the attribute is omitted (for example, when buffer64 exceeds the 32-bit
limit), the kernel falls back to using the value stored in qopt->buffer,
which already supports larger burst sizes.
        As seen in commit 2e04ad424b03 ("sch_tbf: add
TBF_BURST/TBF_PBURST attribute"), TCA_TBF_BURST was originally
introduced to handle issues with very small burst values. Omitting the
attribute for large bursts therefore preserves the intended behavior
while avoiding incompatibilities with the kernel attribute policy.
Additionally, the burst value is explicitly cast to 32 bits where
required, ensuring that 64-bit values are not passed to kernel
interfaces expecting 32-bit fields.

        These modifications bring the user space tools in line with the
kernel's internal 64-bit handling. The logic effectively avoids Netlink
attribute validation failures while preserving the original intent of
the burst mechanism for small values.

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

Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agotc/htb: enable use of 64 bit burst
Ioana Lazea [Mon, 23 Mar 2026 09:29:13 +0000 (09:29 +0000)] 
tc/htb: enable use of 64 bit burst

Modify the HTB queueing discipline to allow burst sizes up to the
limits supported by the kernel API, which may exceed 4 GB at higher rates.

In the current implementation, the burst option is effectively limited
to 4 GB due to the use of a 32-bit field while parsing the burst size.
However, the kernel internally represents the burst in terms of time
derived from the configured rate. As a result, at sufficiently high
rates this time-based representation can correspond to burst sizes
larger than 4 GB, making such bursts feasible without requiring changes
to the kernel.

This change removes the artificial 4 GB limit and allows larger burst
sizes where supported by the kernel API.

Signed-off-by: Ioana Lazea <ioana.lazea@canonical.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agotc/tbf: enable use of 64 bit burst
Ioana Lazea [Mon, 23 Mar 2026 09:29:12 +0000 (09:29 +0000)] 
tc/tbf: enable use of 64 bit burst

Modify the TBF queueing discipline configuration to allow burst sizes up
to the limits supported by the kernel API, which may exceed 4 GB at
higher rates.

In the current implementation, the burst option is effectively limited
to 4 GB because it is stored in a 32-bit field. However, the kernel
internally represents the burst in psched ticks (64 nsec each). At
sufficiently high rates, this representation can correspond to burst
sizes larger than 4 GB without requiring kernel changes.

Overflows (burst values that exceed UINT_MAX psched ticks) are now
correctly detected, and flagged as an error, rather than passing
arbitrary psched tick values to the kernel.

The change to increase the burst size to 64-bit introduced an issue with
TCA_TBF_BURST. The kernel expects this attribute as NLA_U32 (a 32-bit
unsigned value), but the updated implementation may produce a 64-bit
value, causing the tbf_policy check in the kernel to fail. However, when
TCA_TBF_BURST is omitted (which occurs when buffer64 >= UINT_MAX), the
kernel falls back to using the value assigned to qopt->buffer, which
correctly supports large burst sizes. Omitting TCA_TBF_BURST for large
bursts preserves backward compatibility and aligns with existing kernel
behavior. This change therefore ensures correct handling of large burst
sizes while remaining compatible with kernel and iproute2 expectations.

Signed-off-by: Ioana Lazea <ioana.lazea@canonical.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agoss: add support for TCP delack timers
Eric Dumazet [Fri, 3 Apr 2026 10:23:09 +0000 (10:23 +0000)] 
ss: add support for TCP delack timers

Kernel commit c698f5cc940d ("inet_diag: report delayed ack timer information")
added a new enum for idiag_timer values and support for delayed ack timers.

Change tcp_timer_print() to use the new enum and display "delack"
instead of "unknown":

tt -to
...
   ESTAB 10     0   [2002:a05:6830:1f86::]:12875 [2002:a05:6830:1f85::]:50438

        timer:(delack,003ms,0) ino:152178 sk:3004 cgroup:unreachable:189 <->

        skmem:(r1344,rb12780520,t0,tb262144,f2752,w0,o250,bl0,d0) ts usec_ts
        ...

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agodpll: add direction and state filtering for pin show
Petr Oros [Tue, 31 Mar 2026 13:59:18 +0000 (15:59 +0200)] 
dpll: add direction and state filtering for pin show

Allow filtering pins by direction (input/output) and state
(connected/disconnected/selectable) in the pin show command.
These filters match against parent-device nested attributes and
can be combined with the parent-device filter to check a specific
parent-device relationship.

Example: dpll pin show parent-device 0 direction input state connected
Signed-off-by: Petr Oros <poros@redhat.com>
Tested-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
12 days agoss: escape characters in command name
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>
3 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>
3 weeks agodevlink: show devlink instance index in dev output
Jiri Pirko [Mon, 16 Mar 2026 15:44:18 +0000 (16:44 +0100)] 
devlink: show devlink instance index in dev output

Print devlink instance index in dev show output when
the kernel provides it.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 weeks agomnl: add fallback implementation for mnl_attr_get_uint()
Jiri Pirko [Mon, 16 Mar 2026 15:44:17 +0000 (16:44 +0100)] 
mnl: add fallback implementation for mnl_attr_get_uint()

libmnl introduced mnl_attr_get_uint() to handle NLA_UINT
variable-width attributes. Add a configure check to detect it
and provide a fallback implementation for older libmnl versions.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
3 weeks agoUpdate kernel headers
David Ahern [Mon, 23 Mar 2026 00:07:36 +0000 (18:07 -0600)] 
Update kernel headers

Update kernel headers to commit:
fb78a629b4f0: ("Merge branch 'netdevsim-support-ets-offload'")

Signed-off-by: David Ahern <dsahern@kernel.org>
5 weeks agotc: Add JSON output support to multiq
Victor Nogueira [Tue, 3 Mar 2026 13:07:33 +0000 (10:07 -0300)] 
tc: Add JSON output support to multiq

Since qdisc core already assumes all qdiscs are able to output JSON,
add JSON output support to multiq.

Fixes: c91d262f414d ("tc: jsonify qdisc core")
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 weeks agotc: Add JSON output support to QFQ
Victor Nogueira [Tue, 3 Mar 2026 13:07:32 +0000 (10:07 -0300)] 
tc: Add JSON output support to QFQ

Since qdisc core already assumes all qdiscs are able to output JSON,
add JSON output support to QFQ.

Fixes: c91d262f414d ("tc: jsonify qdisc core")
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
5 weeks agotc: Add JSON output support to HFSC
Victor Nogueira [Tue, 3 Mar 2026 13:07:31 +0000 (10:07 -0300)] 
tc: Add JSON output support to HFSC

Since qdisc core already assumes all qdiscs are able to output JSON,
add JSON output support to HFSC.

Fixes: c91d262f414d ("tc: jsonify qdisc core")
Reported-by: Deren Teo <deren.teo@outlook.com>
Closes: https://lore.kernel.org/netdev/SI2PPF4F82E9256898C9826AF17C3AE8AD9F467A@SI2PPF4F82E9256.apcprd04.prod.outlook.com/
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
6 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>
6 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>
6 weeks agoMerge branch 'dpll-filter' into next
David Ahern [Mon, 2 Mar 2026 16:14:46 +0000 (09:14 -0700)] 
Merge branch 'dpll-filter' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
6 weeks agodpll: add pin filtering by parent-device and parent-pin
Petr Oros [Tue, 24 Feb 2026 09:12:43 +0000 (10:12 +0100)] 
dpll: add pin filtering by parent-device and parent-pin

The existing "device" argument in "dpll pin show" sent DPLL_A_ID
in the pin dump request, but the kernel does not use this attribute
for pin dump filtering. Replace it with client-side parent-device
filtering that checks DPLL_A_PIN_PARENT_ID inside nested
DPLL_A_PIN_PARENT_DEVICE attributes.

Also add parent-pin filtering for mux pin hierarchies using the
same approach with DPLL_A_PIN_PARENT_PIN nested attributes.

Rename the "device" argument to "parent-device" to better reflect
the actual semantics.

Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
6 weeks agodpll: add client-side filtering for pin show
Petr Oros [Tue, 24 Feb 2026 09:12:42 +0000 (10:12 +0100)] 
dpll: add client-side filtering for pin show

Add client-side filtering support for dpll pin show command.
Users can filter pins by module-name, clock-id, board-label,
panel-label, package-label, and type. Multiple filters use AND
semantics. Filters work with both dump and single GET operations.

Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
6 weeks agodpll: add client-side filtering for device show
Petr Oros [Tue, 24 Feb 2026 09:12:41 +0000 (10:12 +0100)] 
dpll: add client-side filtering for device show

Add client-side filtering support for dpll device show command.
Users can filter devices by module-name, clock-id, type, mode,
and lock-status. Multiple filters use AND semantics. Filters
work with both dump (all devices) and single GET (by id) operations.

Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
6 weeks agoiplink: bond_slave: print actor and partner churn state
Hangbin Liu [Thu, 26 Feb 2026 03:38:44 +0000 (03:38 +0000)] 
iplink: bond_slave: print actor and partner churn state

Add ability to print both actor and partner port churn states
(MONITOR/CHURN/NO_CHURN) via netlink attributes. This provides
visibility into the LACP churn detection state for bond slaves.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
6 weeks agoUpdate kernel headers
David Ahern [Mon, 2 Mar 2026 15:32:55 +0000 (08:32 -0700)] 
Update kernel headers

Update kernel headers to commit:
01857fc712f6: ("Merge branch 'net-sched-refactor-qdisc-drop-reasons-into-dedicated-tracepoint'")

Signed-off-by: David Ahern <dsahern@kernel.org>
6 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>
6 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 *
```

7 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 agomptcp: monitor: add JSON support
Matthieu Baerts (NGI0) [Mon, 23 Feb 2026 15:28:40 +0000 (16:28 +0100)] 
mptcp: monitor: add JSON support

The command 'ip [-t[s]] mptcp monitor' now produces an output with the JSON
format.

The previous text output has been preserved.

The JSON support has been added thanks to the print_*() helpers. Note that
it is also needed to add a signal handler to exit without errors in case of
SIGINT or SIGTERM, and close the JSON. This last step will print the final
']' when stopping 'ip -j mptcp monitor'.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agoutils: timestamp: add JSON support
Matthieu Baerts (NGI0) [Mon, 23 Feb 2026 15:28:39 +0000 (16:28 +0100)] 
utils: timestamp: add JSON support

Supporting JSON is easy with the helpers. The biggest modification is to
extract the end value. Different keys are used depending on the short or
long timestamp option being used, to ease the parsing.

No behavioural changes intended for the moment, this is a preparation for a
future usage of print_timestamp() within a JSON context.

Like in other helpers supporting JSON, the output stream 'fp' is ignored,
which is fine, because it is always set to 'stdout'.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
7 weeks agomptcp: uniform stream closure
Matthieu Baerts (NGI0) [Mon, 23 Feb 2026 15:28:38 +0000 (16:28 +0100)] 
mptcp: uniform stream closure

Use print_nl() instead of print_string(), close the json object, then flush
the stream to flush the end of the JSON object ASAP.

Note that in print_mptcp_limit(), the flush should have been done before
closing the JSON object, but because there is only one object and the
closure was done just before exiting, there was no visual impact.

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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
3 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>
3 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>
3 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>
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 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>