From 999d976958874ec012caea125c9251f667fc9e05 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Sun, 12 Mar 2017 17:34:06 +0100 Subject: [PATCH] app/testpmd: print MTU in port info This patch adds MTU display to "show port info" command. Signed-off-by: Maxime Coquelin Acked-by: Yuanhan Liu --- app/test-pmd/config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 780ce6bd47..c6945789f5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -449,6 +449,7 @@ port_infos_display(portid_t port_id) struct rte_mempool * mp; static const char *info_border = "*********************"; portid_t pid; + uint16_t mtu; if (port_id_is_invalid(port_id, ENABLED_WARN)) { printf("Valid port range is [0"); @@ -480,6 +481,10 @@ port_infos_display(portid_t port_id) printf("Link speed: %u Mbps\n", (unsigned) link.link_speed); printf("Link duplex: %s\n", (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? ("full-duplex") : ("half-duplex")); + + if (!rte_eth_dev_get_mtu(port_id, &mtu)) + printf("MTU: %u\n", mtu); + printf("Promiscuous mode: %s\n", rte_eth_promiscuous_get(port_id) ? "enabled" : "disabled"); printf("Allmulticast mode: %s\n", -- 2.20.1