netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] iplink: report tso_max_size and tso_max_segs
@ 2022-05-25 15:36 Eric Dumazet
  2022-05-30 16:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2022-05-25 15:36 UTC (permalink / raw)
  To: David Ahern, Stephen Hemminger; +Cc: netdev, Eric Dumazet, Eric Dumazet

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(+)

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",
-- 
2.36.1.124.g0e6072fb45-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-30 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 15:36 [PATCH iproute2] iplink: report tso_max_size and tso_max_segs Eric Dumazet
2022-05-30 16:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).