From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCHi iproute2-next] ip: show min and max mtu
Date: Fri, 27 Jul 2018 13:43:50 -0700 [thread overview]
Message-ID: <20180727204350.21799-1-stephen@networkplumber.org> (raw)
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
next reply other threads:[~2018-07-27 22:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 20:43 Stephen Hemminger [this message]
2018-08-12 21:25 ` [PATCHi iproute2-next] ip: show min and max mtu David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180727204350.21799-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
--cc=sthemmin@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox