diff mbox series

[iproute2] iplink: report tso_max_size and tso_max_segs

Message ID 20220525153624.1943884-1-eric.dumazet@gmail.com (mailing list archive)
State Accepted
Commit 2a0541810c85bc948de183ca62e931a3d6fd9a16
Delegated to: David Ahern
Headers show
Series [iproute2] iplink: report tso_max_size and tso_max_segs | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Eric Dumazet May 25, 2022, 3:36 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

New netlink attributes IFLA_TSO_MAX_SIZE and IFLA_TSO_MAX_SEGS
are used to report device TSO limits to user-space.

ip -d link sh dev eth0
...
   tso_max_size 65536 tso_max_segs 65535

ip -d link sh dev lo
...
   tso_max_size 524280 tso_max_segs 65535

Signed-off-by: Eric Dumazet <edumazet@google.com>
---

This compiles once include/uapi/linux/if_link.h has been synced.
It seems iproute2 maintainers prefer to sync the headers in separate patches.

 ip/ipaddress.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org May 30, 2022, 4 p.m. UTC | #1
Hello:

This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Wed, 25 May 2022 08:36:24 -0700 you wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> New netlink attributes IFLA_TSO_MAX_SIZE and IFLA_TSO_MAX_SEGS
> are used to report device TSO limits to user-space.
> 
> ip -d link sh dev eth0
> ...
>    tso_max_size 65536 tso_max_segs 65535
> 
> [...]

Here is the summary with links:
  - [iproute2] iplink: report tso_max_size and tso_max_segs
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=2a0541810c85

You are awesome, thank you!
diff mbox series

Patch

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index a80996efdc28753da3cc80e7a90e39941a67b926..a1ade37ca2777a121f835abcdc3beeda3eb8f3a5 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1219,6 +1219,18 @@  int print_linkinfo(struct nlmsghdr *n, void *arg)
 				   "gso_max_segs %u ",
 				   rta_getattr_u32(tb[IFLA_GSO_MAX_SEGS]));
 
+		if (tb[IFLA_TSO_MAX_SIZE])
+				   print_uint(PRINT_ANY,
+				   "tso_max_size",
+				   "tso_max_size %u ",
+				   rta_getattr_u32(tb[IFLA_TSO_MAX_SIZE]));
+
+		if (tb[IFLA_TSO_MAX_SEGS])
+				   print_uint(PRINT_ANY,
+				   "tso_max_segs",
+				   "tso_max_segs %u ",
+				   rta_getattr_u32(tb[IFLA_TSO_MAX_SEGS]));
+
 		if (tb[IFLA_GRO_MAX_SIZE])
 			print_uint(PRINT_ANY,
 				   "gro_max_size",