From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D0B93CFBA for ; Sun, 12 Mar 2017 17:34:48 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 469D1624C5; Sun, 12 Mar 2017 16:34:49 +0000 (UTC) Received: from max-t460s.redhat.com (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 717E42D5C4; Sun, 12 Mar 2017 16:34:46 +0000 (UTC) From: Maxime Coquelin To: aconole@redhat.com, sodey@sonusnet.com, yuanhan.liu@linux.intel.com, jianfeng.tan@intel.com, thomas.monjalon@6wind.com, dev@dpdk.org Cc: Maxime Coquelin Date: Sun, 12 Mar 2017 17:34:06 +0100 Message-Id: <20170312163406.17714-10-maxime.coquelin@redhat.com> In-Reply-To: <20170312163406.17714-1-maxime.coquelin@redhat.com> References: <20170213142820.8964-1-maxime.coquelin@redhat.com> <20170312163406.17714-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sun, 12 Mar 2017 16:34:49 +0000 (UTC) Subject: [dpdk-dev] [PATCH v3 9/9] app/testpmd: print MTU value in show port info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 16:34:49 -0000 This patch adds MTU display to "show port info" command. Signed-off-by: Maxime Coquelin --- 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 80491fc..73d9603 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.9.3