[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220525153624.1943884-1-eric.dumazet@gmail.com>
Date: Wed, 25 May 2022 08:36:24 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH iproute2] iplink: report tso_max_size and tso_max_segs
From: Eric Dumazet <edumazet@...gle.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@...gle.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
Powered by blists - more mailing lists