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 9CBDA567F for ; Mon, 6 Mar 2017 09:28:14 +0100 (CET) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FFAF85365; Mon, 6 Mar 2017 08:28:15 +0000 (UTC) Received: from max-t460s.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v268RmvH006934; Mon, 6 Mar 2017 03:28:12 -0500 From: Maxime Coquelin To: aconole@redhat.com, sodey@sonusnet.com, yuanhan.liu@linux.intel.com, jianfeng.tan@intel.com, dev@dpdk.org Cc: Maxime Coquelin Date: Mon, 6 Mar 2017 09:27:40 +0100 Message-Id: <20170306082740.5675-8-maxime.coquelin@redhat.com> In-Reply-To: <20170306082740.5675-1-maxime.coquelin@redhat.com> References: <20170213142820.8964-1-maxime.coquelin@redhat.com> <20170306082740.5675-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Mar 2017 08:28:15 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2 7/7] 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: Mon, 06 Mar 2017 08:28:14 -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