DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chengchang Tang <tangchengchang@huawei.com>
To: <dev@dpdk.org>
Cc: <linuxarm@huawei.com>, <thomas@monjalon.net>,
	<arybchenko@solarflare.com>,  <ferruh.yigit@intel.com>,
	<wenzhuo.lu@intel.com>, <maryam.tahhan@intel.com>
Subject: [dpdk-dev] [PATCH v5 1/2] ethdev: add a field for rxq info structure
Date: Mon, 21 Sep 2020 21:22:37 +0800	[thread overview]
Message-ID: <1600694558-19120-2-git-send-email-tangchengchang@huawei.com> (raw)
In-Reply-To: <1600694558-19120-1-git-send-email-tangchengchang@huawei.com>

Add a field named rx_buf_size in rte_eth_rxq_info to indicate the buffer
size used in receiving packets for HW.

In this way, upper-layer users can get this information by calling
rte_eth_rx_queue_info_get.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/proc-info/main.c                 | 13 +++++++++----
 app/test-pmd/config.c                |  2 ++
 doc/guides/rel_notes/deprecation.rst |  5 -----
 lib/librte_ethdev/rte_ethdev.h       |  1 +
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 0b030d3..64fb83b 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -708,15 +708,20 @@ show_port(void)
 		for (j = 0; j < dev_info.nb_rx_queues; j++) {
 			ret = rte_eth_rx_queue_info_get(i, j, &queue_info);
 			if (ret == 0) {
-				printf("\t  -- queue %d rx scatter %d"
-						" descriptors %d"
-						" offloads 0x%"PRIx64
-						" mempool socket %d\n",
+				printf("\t  -- queue %u rx scatter %u"
+						" descriptors %u"
+						" offloads 0x%" PRIx64
+						" mempool socket %d",
 						j,
 						queue_info.scattered_rx,
 						queue_info.nb_desc,
 						queue_info.conf.offloads,
 						queue_info.mp->socket_id);
+
+				if (queue_info.rx_buf_size != 0)
+					printf(" rx buffer size %u",
+						queue_info.rx_buf_size);
+				printf("\n");
 			}
 		}

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b6eb2a5..2d9a456 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -452,6 +452,8 @@ 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");
+	if (qinfo.rx_buf_size != 0)
+		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)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b136576..1beb76d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -189,11 +189,6 @@ Deprecation Notices
   specified lengths into the buffers allocated from the specified
   memory pools. The backward compatibility to existing API is preserved.

-* ethdev: The ``struct rte_eth_rxq_info`` will be modified to include
-  a new optional field, indicating the buffer size used in receiving packets
-  for HW. This change is planned for 20.11. For more details:
-  https://mails.dpdk.org/archives/dev/2020-July/176135.html.
-
 * ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done``
   will be removed in 21.11.
   Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status``
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index c3ab541..eeef52e 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1449,6 +1449,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_buf_size;       /**< hardware receive buffer size. */
 } __rte_cache_min_aligned;

 /**
--
2.7.4


  reply	other threads:[~2020-09-21 13:25 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 12:35 [dpdk-dev] [RFC] ethdev: add a field for rte_eth_rxq_info Chengchang Tang
2020-08-26  1:57 ` [dpdk-dev] [PATCH 0/3] add RX buffer size " Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 1/3] ethdev: add a field " Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 2/3] app/testpmd: Add RX buffer size display in queue info querry Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 3/3] net/hns3: add RX buffer size to rx qinfo querry Chengchang Tang
2020-08-26  7:12 ` [dpdk-dev] [PATCH v2 0/3] add Rx buffer size for rxq info structure Chengchang Tang
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 1/3] ethdev: add a field " Chengchang Tang
2020-08-26  7:29     ` Wei Hu (Xavier)
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-08-26  7:28     ` Wei Hu (Xavier)
2020-08-26 14:42     ` Stephen Hemminger
2020-08-29  6:48       ` Chengchang Tang
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 3/3] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-08-26  7:20     ` Wei Hu (Xavier)
2020-08-29  7:13 ` [dpdk-dev] [PATCH v3 0/4] add Rx buffer size for rxq info structure Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 1/4] ethdev: add a field " Chengchang Tang
2020-09-01 15:33     ` Matan Azrad
2020-09-02  3:52       ` Chengchang Tang
2020-09-02  7:19         ` Matan Azrad
2020-09-02 10:01           ` Chengchang Tang
2020-09-02 10:30             ` Matan Azrad
2020-09-03  1:48               ` Chengchang Tang
2020-09-06 13:45                 ` Matan Azrad
2020-09-07  7:47                   ` Chengchang Tang
2020-09-07  8:28                     ` Matan Azrad
2020-09-07 12:06                       ` Chengchang Tang
2020-09-07 13:02                         ` Matan Azrad
2020-09-03 15:00           ` Ferruh Yigit
2020-09-03 14:55         ` Ferruh Yigit
2020-09-03 15:01     ` Ferruh Yigit
2020-09-04  1:43       ` Chengchang Tang
2020-09-03 15:35     ` Bruce Richardson
2020-09-04 14:25       ` Ferruh Yigit
2020-09-04 15:14         ` Bruce Richardson
2020-09-04 15:30         ` Bruce Richardson
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 2/4] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 3/4] app/procinfo: add Rx buffer size to --show-port Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 4/4] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-05  9:07 ` [dpdk-dev] [PATCH v4 0/5] add Rx buffer size for rxq info structure Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 1/5] ethdev: add a field " Chengchang Tang
2020-09-05 16:50     ` Stephen Hemminger
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 2/5] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-09-18  8:54     ` Ferruh Yigit
2020-09-20  8:47       ` Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 3/5] app/procinfo: add Rx buffer size to --show-port Chengchang Tang
2020-09-05 16:59     ` Stephen Hemminger
2020-09-07  9:14       ` Chengchang Tang
2020-09-18 22:11         ` Stephen Hemminger
2020-09-21  2:06           ` Chengchang Tang
2020-09-21 11:26             ` Ferruh Yigit
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 4/5] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 5/5] doc: remove rxq info structure deprecation notice Chengchang Tang
2020-09-05 16:33     ` Thomas Monjalon
2020-09-07  9:12       ` Chengchang Tang
2020-09-21 13:22 ` [dpdk-dev] [PATCH v5 0/2] add Rx buffer size for rxq info structure Chengchang Tang
2020-09-21 13:22   ` Chengchang Tang [this message]
2020-09-21 14:18     ` [dpdk-dev] [PATCH v5 1/2] ethdev: add a field " Ferruh Yigit
2020-09-21 13:22   ` [dpdk-dev] [PATCH v5 2/2] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-21 14:19   ` [dpdk-dev] [PATCH v5 0/2] add Rx buffer size for rxq info structure Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1600694558-19120-2-git-send-email-tangchengchang@huawei.com \
    --to=tangchengchang@huawei.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=linuxarm@huawei.com \
    --cc=maryam.tahhan@intel.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).