From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 89E70A0613 for ; Thu, 26 Sep 2019 15:59:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A8331BE51; Thu, 26 Sep 2019 15:59:47 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8FB481BDFD for ; Thu, 26 Sep 2019 15:59:45 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 06:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,552,1559545200"; d="scan'208";a="364735541" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga005.jf.intel.com with ESMTP; 26 Sep 2019 06:59:43 -0700 Date: Thu, 26 Sep 2019 21:57:28 +0800 From: Ye Xiaolong To: Haiyue Wang Cc: dev@dpdk.org, ferruh.yigit@intel.com, ray.kinsella@intel.com, bernard.iremonger@intel.com, chenmin.sun@intel.com Message-ID: <20190926135728.GC91335@intel.com> References: <20190926114818.91063-1-haiyue.wang@intel.com> <20190926114818.91063-5-haiyue.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190926114818.91063-5-haiyue.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v1 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" On 09/26, Haiyue Wang wrote: >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 | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > >diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c >index 957c61fbe..ada89a19d 100644 >--- a/app/test-pmd/config.c >+++ b/app/test-pmd/config.c >@@ -330,9 +330,25 @@ 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) >+{ >+ int offset; >+ >+ while (options != 0) { >+ offset = rte_bsf64(options); >+ >+ printf(" %s", >+ rte_eth_burst_mode_option_name(1ULL << offset)); >+ >+ options &= ~(1ULL << offset); >+ } >+} >+ > 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 = "*********************"; >@@ -360,12 +376,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 = "*********************"; >@@ -389,6 +412,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"); > } > >-- >2.17.1 > Reviewed-by: Xiaolong Ye