From patchwork Thu Jun 18 12:35:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengchang Tang X-Patchwork-Id: 71729 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB614A04A5; Thu, 18 Jun 2020 15:59:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0ACDC1BF54; Thu, 18 Jun 2020 15:59:02 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id BBA474CA7 for ; Thu, 18 Jun 2020 14:36:48 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3B6CD669CE9ADF8CD26C; Thu, 18 Jun 2020 20:36:47 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 18 Jun 2020 20:36:37 +0800 From: Chengchang Tang To: CC: , , , Date: Thu, 18 Jun 2020 20:35:09 +0800 Message-ID: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 18 Jun 2020 15:59:00 +0200 Subject: [dpdk-dev] [RFC] ethdev: add a field for rte_eth_rxq_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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In common practice, PMD configure the rx_buf_size according to the data room size of the object in mempool. But in fact the final value is related to the specifications of hw, and its values will affect the number of fragments in recieving pkts. At present, we seem to have no way to espose relevant information to upper layer users. Add a field named rx_bufsize in rte_eth_rxq_info to indicate the buffer size used in recieving pkts for hw. Signed-off-by: Chengchang Tang --- lib/librte_ethdev/rte_ethdev.h | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 0f6d053..82b7e98 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1306,6 +1306,7 @@ 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. */ + uint16_t rx_bufsize; /**< size of RX buffer. */ } __rte_cache_min_aligned; /** From patchwork Wed Aug 26 07:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengchang Tang X-Patchwork-Id: 75967 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0713A04B1; Wed, 26 Aug 2020 09:14:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D1B44C99; Wed, 26 Aug 2020 09:14:44 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 30E7D255 for ; Wed, 26 Aug 2020 09:14:42 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id ABBE6BD00F8892DB44C6; Wed, 26 Aug 2020 15:14:39 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Wed, 26 Aug 2020 15:14:33 +0800 From: Chengchang Tang To: CC: , , , Date: Wed, 26 Aug 2020 15:12:22 +0800 Message-ID: <1598425943-61981-3-git-send-email-tangchengchang@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598425943-61981-1-git-send-email-tangchengchang@huawei.com> References: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> <1598425943-61981-1-git-send-email-tangchengchang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 2/3] app/testpmd: add Rx buffer size display in queue info query 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 Rx buffer size to queue info querry cmd so that the user can get the buffer length used by HW queue for receiving packets. Signed-off-by: Chengchang Tang Reviewed-by: Wei Hu (Xavier) --- v1 -> v2: fix some spelling mistake --- app/test-pmd/config.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 30bee33..b432ac6 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -452,6 +452,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id) (qinfo.conf.rx_deferred_start != 0) ? "on" : "off"); printf("\nRX scattered packets: %s", (qinfo.scattered_rx != 0) ? "on" : "off"); + printf("\nRX buffer size: %hu", qinfo.rx_buf_size); printf("\nNumber of RXDs: %hu", qinfo.nb_desc); if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0) From patchwork Sat Aug 29 07:13:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengchang Tang X-Patchwork-Id: 76145 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9381BA04B1; Sat, 29 Aug 2020 09:15:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 342272C2D; Sat, 29 Aug 2020 09:15:50 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 646882C2D for ; Sat, 29 Aug 2020 09:15:47 +0200 (CEST) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8E78142BDBA1624B5C5E; Sat, 29 Aug 2020 15:15:45 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Sat, 29 Aug 2020 15:15:38 +0800 From: Chengchang Tang To: CC: , , , , , Date: Sat, 29 Aug 2020 15:13:18 +0800 Message-ID: <1598685199-1630-4-git-send-email-tangchengchang@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598685199-1630-1-git-send-email-tangchengchang@huawei.com> References: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> <1598685199-1630-1-git-send-email-tangchengchang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v3 3/4] app/procinfo: add Rx buffer size to --show-port 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 Rx buffer size to show_port function to display it in the port PMD information so that the user can get the buffer length used by HW queue of receiving packets. Signed-off-by: Chengchang Tang --- app/proc-info/main.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index abeca4a..e840dea 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -711,11 +711,13 @@ show_port(void) if (ret == 0) { printf("\t -- queue %d rx scatter %d" " descriptors %d" + " rx buffer size %d" " offloads 0x%"PRIx64 " mempool socket %d\n", j, queue_info.scattered_rx, queue_info.nb_desc, + queue_info.rx_buf_size, queue_info.conf.offloads, queue_info.mp->socket_id); } From patchwork Sat Sep 5 09:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengchang Tang X-Patchwork-Id: 76603 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D674A04C5; Sat, 5 Sep 2020 11:10:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DF1B2BF1; Sat, 5 Sep 2020 11:10:07 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 5F431E07 for ; Sat, 5 Sep 2020 11:10:05 +0200 (CEST) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 78F971BF597F409BF204; Sat, 5 Sep 2020 17:10:00 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sat, 5 Sep 2020 17:09:51 +0800 From: Chengchang Tang To: CC: , , , , , Date: Sat, 5 Sep 2020 17:07:33 +0800 Message-ID: <1599296854-56620-5-git-send-email-tangchengchang@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599296854-56620-1-git-send-email-tangchengchang@huawei.com> References: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> <1599296854-56620-1-git-send-email-tangchengchang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v4 4/5] net/hns3: add Rx buffer size to Rx qinfo query 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" Report hns3 PMD configured Rx buffer size in Rx queue information query. Signed-off-by: Chengchang Tang Reviewed-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index fc1a256..d67c5ad 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2830,6 +2830,8 @@ hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->mp = rxq->mb_pool; qinfo->nb_desc = rxq->nb_rx_desc; qinfo->scattered_rx = dev->data->scattered_rx; + /* Report the HW Rx buffer length to user */ + qinfo->rx_buf_size = rxq->rx_buf_len; /* * If there are no available Rx buffer descriptors, incoming packets