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 D1516F932 for ; Mon, 13 Feb 2017 15:28:55 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 47F7481245; Mon, 13 Feb 2017 14:28:56 +0000 (UTC) Received: from max-t460s.redhat.com (ovpn-117-88.ams2.redhat.com [10.36.117.88]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1DESW1D014561; Mon, 13 Feb 2017 09:28:53 -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, 13 Feb 2017 15:28:20 +0100 Message-Id: <20170213142820.8964-8-maxime.coquelin@redhat.com> In-Reply-To: <20170213142820.8964-1-maxime.coquelin@redhat.com> References: <20170213142820.8964-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 13 Feb 2017 14:28:56 +0000 (UTC) Subject: [dpdk-dev] [PATCH 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, 13 Feb 2017 14:28:56 -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