From patchwork Mon Aug 12 14:15:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 57624 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 6EA8A1BDFD; Mon, 12 Aug 2019 16:20:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B90F527D for ; Mon, 12 Aug 2019 16:20:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 07:20:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="327368425" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.111.73]) by orsmga004.jf.intel.com with ESMTP; 12 Aug 2019 07:20:11 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang Date: Mon, 12 Aug 2019 22:15:03 +0800 Message-Id: <1565619305-17116-2-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> References: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> Subject: [dpdk-dev] [RFC v1 1/3] ethdev: add the Rx/Tx burst description field in queue information 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" Since each PMD has different Rx/Tx burst capabilities such as Vector, Scattered, Bulk etc, adding the Rx/Tx burst description field in queue information to provide apps current configuration of PMD Rx/Tx burst. This is a self-description for each PMD in its own format. Signed-off-by: Haiyue Wang --- lib/librte_ethdev/rte_ethdev.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index dc6596b..bc48c0c 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1192,6 +1192,9 @@ struct rte_eth_dev_info { struct rte_eth_switch_info switch_info; }; +/** Maximum information length to describe the PMD RX/TX functions */ +#define RTE_PMD_BURST_INFO_SIZE 128 + /** * Ethernet device RX queue information structure. * Used to retrieve information about configured queue. @@ -1201,6 +1204,8 @@ struct rte_eth_rxq_info { struct rte_eth_rxconf conf; /**< queue config parameters. */ uint8_t scattered_rx; /**< scattered packets RX supported. */ uint16_t nb_desc; /**< configured number of RXDs. */ + char burst_info[RTE_PMD_BURST_INFO_SIZE]; + /**< Description of PMD RX function, such as Vector, Scattered etc */ } __rte_cache_min_aligned; /** @@ -1210,6 +1215,8 @@ struct rte_eth_rxq_info { struct rte_eth_txq_info { struct rte_eth_txconf conf; /**< queue config parameters. */ uint16_t nb_desc; /**< configured number of TXDs. */ + char burst_info[RTE_PMD_BURST_INFO_SIZE]; + /**< Description of PMD TX function, such as Vector, Scattered etc */ } __rte_cache_min_aligned; /** Maximum name length for extended statistics counters */ From patchwork Mon Aug 12 14:15:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 57625 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 842661BE85; Mon, 12 Aug 2019 16:20:19 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B7DD58F96 for ; Mon, 12 Aug 2019 16:20:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 07:20:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="327368446" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.111.73]) by orsmga004.jf.intel.com with ESMTP; 12 Aug 2019 07:20:13 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang Date: Mon, 12 Aug 2019 22:15:04 +0800 Message-Id: <1565619305-17116-3-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> References: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> Subject: [dpdk-dev] [RFC v1 2/3] testpmd: show the Rx/Tx burst description field in queue 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 description' section into command 'show rxq|txq info ' to show the Rx/Tx burst description field in queue information. Signed-off-by: Haiyue Wang --- app/test-pmd/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 1a5a5c1..69607ba 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -354,6 +354,7 @@ 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); + printf("\nBurst description: %s\n", qinfo.burst_info); printf("\n"); } @@ -383,6 +384,7 @@ 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); + printf("\nBurst description: %s\n", qinfo.burst_info); printf("\n"); } From patchwork Mon Aug 12 14:15:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 57626 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 61F7B1BE8C; Mon, 12 Aug 2019 16:20:24 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 72DF91BE81 for ; Mon, 12 Aug 2019 16:20:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 07:20:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="327368453" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.111.73]) by orsmga004.jf.intel.com with ESMTP; 12 Aug 2019 07:20:15 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang Date: Mon, 12 Aug 2019 22:15:05 +0800 Message-Id: <1565619305-17116-4-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> References: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> Subject: [dpdk-dev] [RFC v1 3/3] net/ice: support the Rx/Tx burst description field in queue information 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" According to the Rx/Tx burst function that's selected currently, format the distinct burst description information for apps to query. Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_rxtx.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 0282b53..9e6b1f7 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -15,6 +15,16 @@ #define ICE_RX_ERR_BITS 0x3f +static uint16_t ice_recv_scattered_pkts(void *rx_queue, + struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); +static uint16_t ice_recv_pkts_bulk_alloc(void *rx_queue, + struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); +static uint16_t ice_xmit_pkts_simple(void *tx_queue, + struct rte_mbuf **tx_pkts, + uint16_t nb_pkts); + static enum ice_status ice_program_hw_rx_queue(struct ice_rx_queue *rxq) { @@ -935,6 +945,30 @@ ice_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = rxq->drop_en; qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; + + if (dev->rx_pkt_burst == ice_recv_scattered_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_bulk_alloc) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Bulk Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Normal Rx"); +#ifdef RTE_ARCH_X86 + else if (dev->rx_pkt_burst == ice_recv_scattered_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_scattered_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Rx"); +#endif } void @@ -955,6 +989,21 @@ ice_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.tx_rs_thresh = txq->tx_rs_thresh; qinfo->conf.offloads = txq->offloads; qinfo->conf.tx_deferred_start = txq->tx_deferred_start; + + if (dev->tx_pkt_burst == ice_xmit_pkts_simple) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Simple Tx"); + else if (dev->tx_pkt_burst == ice_xmit_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Normal Tx"); +#ifdef RTE_ARCH_X86 + else if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Tx"); + else if (dev->tx_pkt_burst == ice_xmit_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Tx"); +#endif } uint32_t