* [PATCHi iproute2-next] ip: show min and max mtu
@ 2018-07-27 20:43 Stephen Hemminger
2018-08-12 21:25 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2018-07-27 20:43 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Stephen Hemminger
From: Stephen Hemminger <sthemmin@microsoft.com>
Add min/max MTU to the link details
Signed-off-by: Stephen Hemminger <stephen@networkplumber.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHi iproute2-next] ip: show min and max mtu
2018-07-27 20:43 [PATCHi iproute2-next] ip: show min and max mtu Stephen Hemminger
@ 2018-08-12 21:25 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2018-08-12 21:25 UTC (permalink / raw)
To: Stephen Hemminger, netdev; +Cc: Stephen Hemminger
On 7/27/18 2:43 PM, Stephen Hemminger wrote:
> From: Stephen Hemminger <sthemmin@microsoft.com>
>
> Add min/max MTU to the link details
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> include/uapi/linux/if_link.h | 2 ++
> ip/ipaddress.c | 10 ++++++++++
> 2 files changed, 12 insertions(+)
>
applied to iproute2-next. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-13 0:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 20:43 [PATCHi iproute2-next] ip: show min and max mtu Stephen Hemminger
2018-08-12 21:25 ` David Ahern
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).