[RFC,v1,1/3] ethdev: add the Rx/Tx burst description field in queue information

Message ID 1565619305-17116-2-git-send-email-haiyue.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series show the Rx/Tx burst description field |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wang, Haiyue Aug. 12, 2019, 2:15 p.m. UTC
  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 <haiyue.wang@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Stephen Hemminger Aug. 12, 2019, 3:37 p.m. UTC | #1
On Mon, 12 Aug 2019 22:15:03 +0800
Haiyue Wang <haiyue.wang@intel.com> wrote:

> 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 <haiyue.wang@intel.com>

I can see why it might help with diagnosing issues on VPP,
but it would have bigger impacts for other users of DPDK.

Think of a better way that doesn't break ABI.
This is not enough value to make the DPDK more unstable.
  

Patch

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 */