aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-05-25 08:36:24 -0700
committerDavid Ahern <dsahern@kernel.org>2022-05-30 09:51:53 -0600
commit2a0541810c85bc948de183ca62e931a3d6fd9a16 (patch)
treea3d3d23cd65523794d3c6ac28ec398df89e037f9
parent555a7750128a2c618587715fbad141f6750a4d06 (diff)
downloadiproute2-2a0541810c85bc948de183ca62e931a3d6fd9a16.tar.gz
iplink: report tso_max_size and tso_max_segs
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> Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r--ip/ipaddress.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 17341d287..142731933 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1230,6 +1230,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",