From patchwork Tue Sep 10 16:33:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 59106 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 844101EF75; Tue, 10 Sep 2019 18:39:21 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7535A1EF40 for ; Tue, 10 Sep 2019 18:39:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 09:39:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,490,1559545200"; d="scan'208";a="178732672" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.115]) by orsmga008.jf.intel.com with ESMTP; 10 Sep 2019 09:39:12 -0700 From: Haiyue Wang To: dev@dpdk.org, ferruh.yigit@intel.com, mdr@ashroe.eu, chenmin.sun@intel.com Cc: Haiyue Wang Date: Wed, 11 Sep 2019 00:33:37 +0800 Message-Id: <20190910163337.4843-5-haiyue.wang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910163337.4843-1-haiyue.wang@intel.com> References: <20190910163337.4843-1-haiyue.wang@intel.com> Subject: [dpdk-dev] [RFC v3 4/4] app/testpmd: show the Rx/Tx burst mode description 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add the 'Burst mode' section into command 'show rxq|txq info ' to show the Rx/Tx burst mode description like: "Burst mode: Vector AVX2 Scattered" Signed-off-by: Haiyue Wang Acked-by: Bernard Iremonger --- app/test-pmd/config.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 1a5a5c13c..d10ad6cfa 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -324,9 +324,21 @@ nic_stats_mapping_display(portid_t port_id) nic_stats_mapping_border, nic_stats_mapping_border); } +static void +burst_mode_options_display(uint64_t options) +{ + uint64_t opt; + + for (opt = 1; options != 0; opt <<= 1, options >>= 1) { + if (options & 1) + printf(" %s", rte_eth_burst_mode_option_name(opt)); + } +} + void rx_queue_infos_display(portid_t port_id, uint16_t queue_id) { + struct rte_eth_burst_mode mode; struct rte_eth_rxq_info qinfo; int32_t rc; static const char *info_border = "*********************"; @@ -354,12 +366,19 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id) printf("\nRX scattered packets: %s", (qinfo.scattered_rx != 0) ? "on" : "off"); printf("\nNumber of RXDs: %hu", qinfo.nb_desc); + + if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0) { + printf("\nBurst mode:"); + burst_mode_options_display(mode.options); + } + printf("\n"); } void tx_queue_infos_display(portid_t port_id, uint16_t queue_id) { + struct rte_eth_burst_mode mode; struct rte_eth_txq_info qinfo; int32_t rc; static const char *info_border = "*********************"; @@ -383,6 +402,12 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id) printf("\nTX deferred start: %s", (qinfo.conf.tx_deferred_start != 0) ? "on" : "off"); printf("\nNumber of TXDs: %hu", qinfo.nb_desc); + + if (rte_eth_tx_burst_mode_get(port_id, queue_id, &mode) == 0) { + printf("\nBurst mode:"); + burst_mode_options_display(mode.options); + } + printf("\n"); }