[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180727204350.21799-1-stephen@networkplumber.org>
Date: Fri, 27 Jul 2018 13:43:50 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <sthemmin@...rosoft.com>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCHi iproute2-next] ip: show min and max mtu
From: Stephen Hemminger <sthemmin@...rosoft.com>
Add min/max MTU to the link details
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
include/uapi/linux/if_link.h | 2 ++
ip/ipaddress.c | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 26e8cf8b45aa..8456ff254015 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -164,6 +164,8 @@ enum {
IFLA_CARRIER_UP_COUNT,
IFLA_CARRIER_DOWN_COUNT,
IFLA_NEW_IFINDEX,
+ IFLA_MIN_MTU,
+ IFLA_MAX_MTU,
__IFLA_MAX
};
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index bcee9ab731ce..85958e1a9cef 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1012,6 +1012,16 @@ int print_linkinfo(const struct sockaddr_nl *who,
" promiscuity %u ",
rta_getattr_u32(tb[IFLA_PROMISCUITY]));
+ if (tb[IFLA_MIN_MTU])
+ print_uint(PRINT_ANY,
+ "min_mtu", "minmtu %u ",
+ rta_getattr_u32(tb[IFLA_MIN_MTU]));
+
+ if (tb[IFLA_MAX_MTU])
+ print_uint(PRINT_ANY,
+ "max_mtu", "maxmtu %u ",
+ rta_getattr_u32(tb[IFLA_MAX_MTU]));
+
if (tb[IFLA_LINKINFO])
print_linktype(fp, tb[IFLA_LINKINFO]);
--
2.18.0
Powered by blists - more mailing lists