Skip to contentSkip to conversation

ethdev: enhance the API for getting burst mode information

PATCH Superseded Haiyue Wang 5 participants 11 messages Nov 4, 2019 – Nov 6, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ethdev: enhance the API for getting burst mode information

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

---

v2: - Drop the bit field for burst mode information handling.

v1: - http://patchwork.dpdk.org/patch/62289/
- http://patchwork.dpdk.org/patch/62290/
- http://patchwork.dpdk.org/patch/62291/

 app/test-pmd/config.c                    |  33 ++-----
 doc/guides/nics/features.rst             |   3 +-
 doc/guides/rel_notes/release_19_11.rst   |   2 -
 drivers/net/i40e/i40e_rxtx.c             | 121 ++++++++++++-----------
 drivers/net/ice/ice_rxtx.c               |  89 +++++++++--------
 lib/librte_ethdev/rte_ethdev.c           |  35 -------
 lib/librte_ethdev/rte_ethdev.h           |  43 ++------
 lib/librte_ethdev/rte_ethdev_version.map |   1 -
 8 files changed, 131 insertions(+), 196 deletions(-)
app/test-pmd/config.c +10 -23
index efe2812a8..b6039749c 100644
@@ -350,21 +350,6 @@ 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)
 {
@@ -397,10 +382,11 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
@@ -433,10 +419,11 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_tx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
doc/guides/nics/features.rst +1 -2
index d96696801..7a31cf7c8 100644
@@ -879,8 +879,7 @@ Burst mode info
 Supports to get Rx/Tx packet burst mode information.
 
 * **[implements] eth_dev_ops**: ``rx_burst_mode_get``, ``tx_burst_mode_get``.
-* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``,
-  ``rte_eth_burst_mode_option_name()``.
+* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``.
 
 .. _nic_features_other:
 
doc/guides/rel_notes/release_19_11.rst +0 -2
index ae8e7b2f0..8fd1e7e62 100644
@@ -114,8 +114,6 @@ New Features
   ``rte_eth_tx_burst_mode_get`` that allow an application
   to retrieve the mode information about RX/TX packet burst
   such as Scalar or Vector, and Vector technology like AVX2.
-  Another new function ``rte_eth_burst_mode_option_name`` is
-  provided for burst mode options stringification.
 
 * **Updated the Intel ice driver.**
 
drivers/net/i40e/i40e_rxtx.c +61 -60

145 lines not on this page · raw message

drivers/net/ice/ice_rxtx.c +49 -40

115 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev.c +0 -35
index 7743205d3..208362971 100644
@@ -166,25 +166,6 @@ static const struct {
 
 #undef RTE_TX_OFFLOAD_BIT2STR
 
-static const struct {
-	uint64_t option;
-	const char *name;
-} rte_burst_option_names[] = {
-	{ RTE_ETH_BURST_SCALAR, "Scalar" },
-	{ RTE_ETH_BURST_VECTOR, "Vector" },
-
-	{ RTE_ETH_BURST_ALTIVEC, "AltiVec" },
-	{ RTE_ETH_BURST_NEON, "Neon" },
-	{ RTE_ETH_BURST_SSE, "SSE" },
-	{ RTE_ETH_BURST_AVX2, "AVX2" },
-	{ RTE_ETH_BURST_AVX512, "AVX512" },
-
-	{ RTE_ETH_BURST_SCATTERED, "Scattered" },
-	{ RTE_ETH_BURST_BULK_ALLOC, "Bulk Alloc" },
-	{ RTE_ETH_BURST_SIMPLE, "Simple" },
-	{ RTE_ETH_BURST_PER_QUEUE, "Per Queue" },
-};
-
 /**
  * The user application callback description.
  *
@@ -4284,22 +4265,6 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
 		       dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode));
 }
 
-const char *
-rte_eth_burst_mode_option_name(uint64_t option)
-{
-	const char *name = "";
-	unsigned int i;
-
-	for (i = 0; i < RTE_DIM(rte_burst_option_names); ++i) {
-		if (option == rte_burst_option_names[i].option) {
-			name = rte_burst_option_names[i].name;
-			break;
-		}
-	}
-
-	return name;
-}
-
 int
 rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct rte_ether_addr *mc_addr_set,
lib/librte_ethdev/rte_ethdev.h +10 -33

62 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_version.map +0 -1
index e59d51648..5b00b9a40 100644
@@ -287,5 +287,4 @@ EXPERIMENTAL {
 	# added in 19.11
 	rte_eth_rx_burst_mode_get;
 	rte_eth_tx_burst_mode_get;
-	rte_eth_burst_mode_option_name;
 };
Signature · 1 line
2.17.1
Acked-by on v2 1/1
#1 lore raw
Quoted 506 lines · Haiyue Wang

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

---

v2: - Drop the bit field for burst mode information handling.

v1: - http://patchwork.dpdk.org/patch/62289/
- http://patchwork.dpdk.org/patch/62290/
- http://patchwork.dpdk.org/patch/62291/

 app/test-pmd/config.c                    |  33 ++-----
 doc/guides/nics/features.rst             |   3 +-
 doc/guides/rel_notes/release_19_11.rst   |   2 -
 drivers/net/i40e/i40e_rxtx.c             | 121 ++++++++++++-----------
 drivers/net/ice/ice_rxtx.c               |  89 +++++++++--------
 lib/librte_ethdev/rte_ethdev.c           |  35 -------
 lib/librte_ethdev/rte_ethdev.h           |  43 ++------
 lib/librte_ethdev/rte_ethdev_version.map |   1 -
 8 files changed, 131 insertions(+), 196 deletions(-)
app/test-pmd/config.c +10 -23
index efe2812a8..b6039749c 100644
@@ -350,21 +350,6 @@ 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)
 {
@@ -397,10 +382,11 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
@@ -433,10 +419,11 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_tx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
doc/guides/nics/features.rst +1 -2
index d96696801..7a31cf7c8 100644
@@ -879,8 +879,7 @@ Burst mode info
 Supports to get Rx/Tx packet burst mode information.
 
 * **[implements] eth_dev_ops**: ``rx_burst_mode_get``, ``tx_burst_mode_get``.
-* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``,
-  ``rte_eth_burst_mode_option_name()``.
+* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``.
 
 .. _nic_features_other:
 
doc/guides/rel_notes/release_19_11.rst +0 -2
index ae8e7b2f0..8fd1e7e62 100644
@@ -114,8 +114,6 @@ New Features
   ``rte_eth_tx_burst_mode_get`` that allow an application
   to retrieve the mode information about RX/TX packet burst
   such as Scalar or Vector, and Vector technology like AVX2.
-  Another new function ``rte_eth_burst_mode_option_name`` is
-  provided for burst mode options stringification.
 
 * **Updated the Intel ice driver.**
 
drivers/net/i40e/i40e_rxtx.c +61 -60
index 6a66cec20..17dc8c78f 100644
@@ -3017,49 +3017,45 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
 	}
 }
 
-int
-i40e_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
-		       struct rte_eth_burst_mode *mode)
-{
-	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
-	uint64_t options;
-
-	if (pkt_burst == i40e_recv_scattered_pkts)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == i40e_recv_pkts_bulk_alloc)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_BULK_ALLOC;
-	else if (pkt_burst == i40e_recv_pkts)
-		options = RTE_ETH_BURST_SCALAR;
+static const struct {
+	eth_rx_burst_t pkt_burst;
+	const char *info;
+} i40e_rx_burst_infos[] = {
+	{ i40e_recv_scattered_pkts,          "Scalar Scattered" },
+	{ i40e_recv_pkts_bulk_alloc,         "Scalar Bulk Alloc" },
+	{ i40e_recv_pkts,                    "Scalar" },
 #ifdef RTE_ARCH_X86
-	else if (pkt_burst == i40e_recv_scattered_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2 |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == i40e_recv_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2;
-	else if (pkt_burst == i40e_recv_scattered_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == i40e_recv_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE;
+	{ i40e_recv_scattered_pkts_vec_avx2, "Vector AVX2 Scattered" },
+	{ i40e_recv_pkts_vec_avx2,           "Vector AVX2" },
+	{ i40e_recv_scattered_pkts_vec,      "Vector SSE Scattered" },
+	{ i40e_recv_pkts_vec,                "Vector SSE" },
 #elif defined(RTE_ARCH_ARM64)
-	else if (pkt_burst == i40e_recv_scattered_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_NEON |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == i40e_recv_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_NEON;
+	{ i40e_recv_scattered_pkts_vec,      "Vector Neon Scattered" },
+	{ i40e_recv_pkts_vec,                "Vector Neon" },
 #elif defined(RTE_ARCH_PPC_64)
-	else if (pkt_burst == i40e_recv_scattered_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_ALTIVEC |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == i40e_recv_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_ALTIVEC;
+	{ i40e_recv_scattered_pkts_vec,      "Vector AltiVec Scattered" },
+	{ i40e_recv_pkts_vec,                "Vector AltiVec" },
 #endif
-	else
-		options = 0;
+};
 
-	mode->options = options;
+int
+i40e_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
+		       struct rte_eth_burst_mode *mode)
+{
+	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
+	int ret = -EINVAL;
+	unsigned int i;
+
+	for (i = 0; i < RTE_DIM(i40e_rx_burst_infos); ++i) {
+		if (pkt_burst == i40e_rx_burst_infos[i].pkt_burst) {
+			snprintf(mode->info, sizeof(mode->info), "%s",
+				 i40e_rx_burst_infos[i].info);
+			ret = 0;
+			break;
+		}
+	}
 
-	return options != 0 ? 0 : -EINVAL;
+	return ret;
 }
 
 void __attribute__((cold))
@@ -3155,35 +3151,40 @@ i40e_set_tx_function(struct rte_eth_dev *dev)
 	}
 }
 
-int
-i40e_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
-		       struct rte_eth_burst_mode *mode)
-{
-	eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
-	uint64_t options;
-
-	if (pkt_burst == i40e_xmit_pkts_simple)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SIMPLE;
-	else if (pkt_burst == i40e_xmit_pkts)
-		options = RTE_ETH_BURST_SCALAR;
+static const struct {
+	eth_tx_burst_t pkt_burst;
+	const char *info;
+} i40e_tx_burst_infos[] = {
+	{ i40e_xmit_pkts_simple,   "Scalar Simple" },
+	{ i40e_xmit_pkts,          "Scalar" },
 #ifdef RTE_ARCH_X86
-	else if (pkt_burst == i40e_xmit_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2;
-	else if (pkt_burst == i40e_xmit_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE;
+	{ i40e_xmit_pkts_vec_avx2, "Vector AVX2" },
+	{ i40e_xmit_pkts_vec,      "Vector SSE" },
 #elif defined(RTE_ARCH_ARM64)
-	else if (pkt_burst == i40e_xmit_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_NEON;
+	{ i40e_xmit_pkts_vec,      "Vector Neon" },
 #elif defined(RTE_ARCH_PPC_64)
-	else if (pkt_burst == i40e_xmit_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_ALTIVEC;
+	{ i40e_xmit_pkts_vec,      "Vector AltiVec" },
 #endif
-	else
-		options = 0;
+};
 
-	mode->options = options;
+int
+i40e_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
+		       struct rte_eth_burst_mode *mode)
+{
+	eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
+	int ret = -EINVAL;
+	unsigned int i;
+
+	for (i = 0; i < RTE_DIM(i40e_tx_burst_infos); ++i) {
+		if (pkt_burst == i40e_tx_burst_infos[i].pkt_burst) {
+			snprintf(mode->info, sizeof(mode->info), "%s",
+				 i40e_tx_burst_infos[i].info);
+			ret = 0;
+			break;
+		}
+	}
 
-	return options != 0 ? 0 : -EINVAL;
+	return ret;
 }
 
 void __attribute__((cold))
drivers/net/ice/ice_rxtx.c +49 -40
index 8d4820d3c..bf14d337d 100644
@@ -2793,37 +2793,39 @@ ice_set_rx_function(struct rte_eth_dev *dev)
 	}
 }
 
+static const struct {
+	eth_rx_burst_t pkt_burst;
+	const char *info;
+} ice_rx_burst_infos[] = {
+	{ ice_recv_scattered_pkts,          "Scalar Scattered" },
+	{ ice_recv_pkts_bulk_alloc,         "Scalar Bulk Alloc" },
+	{ ice_recv_pkts,                    "Scalar" },
+#ifdef RTE_ARCH_X86
+	{ ice_recv_scattered_pkts_vec_avx2, "Vector AVX2 Scattered" },
+	{ ice_recv_pkts_vec_avx2,           "Vector AVX2" },
+	{ ice_recv_scattered_pkts_vec,      "Vector SSE Scattered" },
+	{ ice_recv_pkts_vec,                "Vector SSE" },
+#endif
+};
+
 int
 ice_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 		      struct rte_eth_burst_mode *mode)
 {
 	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
-	uint64_t options;
-
-	if (pkt_burst == ice_recv_scattered_pkts)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_bulk_alloc)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_BULK_ALLOC;
-	else if (pkt_burst == ice_recv_pkts)
-		options = RTE_ETH_BURST_SCALAR;
-#ifdef RTE_ARCH_X86
-	else if (pkt_burst == ice_recv_scattered_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2 |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2;
-	else if (pkt_burst == ice_recv_scattered_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE;
-#endif
-	else
-		options = 0;
+	int ret = -EINVAL;
+	unsigned int i;
 
-	mode->options = options;
+	for (i = 0; i < RTE_DIM(ice_rx_burst_infos); ++i) {
+		if (pkt_burst == ice_rx_burst_infos[i].pkt_burst) {
+			snprintf(mode->info, sizeof(mode->info), "%s",
+				 ice_rx_burst_infos[i].info);
+			ret = 0;
+			break;
+		}
+	}
 
-	return options != 0 ? 0 : -EINVAL;
+	return ret;
 }
 
 void __attribute__((cold))
@@ -2949,29 +2951,36 @@ ice_set_tx_function(struct rte_eth_dev *dev)
 	}
 }
 
+static const struct {
+	eth_tx_burst_t pkt_burst;
+	const char *info;
+} ice_tx_burst_infos[] = {
+	{ ice_xmit_pkts_simple,   "Scalar Simple" },
+	{ ice_xmit_pkts,          "Scalar" },
+#ifdef RTE_ARCH_X86
+	{ ice_xmit_pkts_vec_avx2, "Vector AVX2" },
+	{ ice_xmit_pkts_vec,      "Vector SSE" },
+#endif
+};
+
 int
 ice_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 		      struct rte_eth_burst_mode *mode)
 {
 	eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
-	uint64_t options;
-
-	if (pkt_burst == ice_xmit_pkts_simple)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SIMPLE;
-	else if (pkt_burst == ice_xmit_pkts)
-		options = RTE_ETH_BURST_SCALAR;
-#ifdef RTE_ARCH_X86
-	else if (pkt_burst == ice_xmit_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2;
-	else if (pkt_burst == ice_xmit_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE;
-#endif
-	else
-		options = 0;
+	int ret = -EINVAL;
+	unsigned int i;
 
-	mode->options = options;
+	for (i = 0; i < RTE_DIM(ice_tx_burst_infos); ++i) {
+		if (pkt_burst == ice_tx_burst_infos[i].pkt_burst) {
+			snprintf(mode->info, sizeof(mode->info), "%s",
+				 ice_tx_burst_infos[i].info);
+			ret = 0;
+			break;
+		}
+	}
 
-	return options != 0 ? 0 : -EINVAL;
+	return ret;
 }
 
 /* For each value it means, datasheet of hardware can tell more details
lib/librte_ethdev/rte_ethdev.c +0 -35
index 7743205d3..208362971 100644
@@ -166,25 +166,6 @@ static const struct {
 
 #undef RTE_TX_OFFLOAD_BIT2STR
 
-static const struct {
-	uint64_t option;
-	const char *name;
-} rte_burst_option_names[] = {
-	{ RTE_ETH_BURST_SCALAR, "Scalar" },
-	{ RTE_ETH_BURST_VECTOR, "Vector" },
-
-	{ RTE_ETH_BURST_ALTIVEC, "AltiVec" },
-	{ RTE_ETH_BURST_NEON, "Neon" },
-	{ RTE_ETH_BURST_SSE, "SSE" },
-	{ RTE_ETH_BURST_AVX2, "AVX2" },
-	{ RTE_ETH_BURST_AVX512, "AVX512" },
-
-	{ RTE_ETH_BURST_SCATTERED, "Scattered" },
-	{ RTE_ETH_BURST_BULK_ALLOC, "Bulk Alloc" },
-	{ RTE_ETH_BURST_SIMPLE, "Simple" },
-	{ RTE_ETH_BURST_PER_QUEUE, "Per Queue" },
-};
-
 /**
  * The user application callback description.
  *
@@ -4284,22 +4265,6 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
 		       dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode));
 }
 
-const char *
-rte_eth_burst_mode_option_name(uint64_t option)
-{
-	const char *name = "";
-	unsigned int i;
-
-	for (i = 0; i < RTE_DIM(rte_burst_option_names); ++i) {
-		if (option == rte_burst_option_names[i].option) {
-			name = rte_burst_option_names[i].name;
-			break;
-		}
-	}
-
-	return name;
-}
-
 int
 rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct rte_ether_addr *mc_addr_set,
lib/librte_ethdev/rte_ethdev.h +10 -33
index c36c1b631..88c83c7aa 100644
@@ -1248,32 +1248,23 @@ struct rte_eth_txq_info {
 } __rte_cache_min_aligned;
 
 /**
- * Burst mode types, values can be ORed to define the burst mode of a driver.
+ * Generic Burst mode flag definition, values can be ORed.
+ */
+#define RTE_ETH_BURST_FLAG_PER_QUEUE     (1ULL << 0)
+/**< If the queues have different burst mode description, this bit will be set
+ * by PMD, then the application can iterate to retrieve burst description for
+ * all other queues.
  */
-enum rte_eth_burst_mode_option {
-	RTE_ETH_BURST_SCALAR = (1 << 0),
-	RTE_ETH_BURST_VECTOR = (1 << 1),
-
-	/**< bits[15:2] are reserved for each vector type */
-	RTE_ETH_BURST_ALTIVEC = (1 << 2),
-	RTE_ETH_BURST_NEON = (1 << 3),
-	RTE_ETH_BURST_SSE = (1 << 4),
-	RTE_ETH_BURST_AVX2 = (1 << 5),
-	RTE_ETH_BURST_AVX512 = (1 << 6),
-
-	RTE_ETH_BURST_SCATTERED = (1 << 16), /**< Support scattered packets */
-	RTE_ETH_BURST_BULK_ALLOC = (1 << 17), /**< Support mbuf bulk alloc */
-	RTE_ETH_BURST_SIMPLE = (1 << 18),
-
-	RTE_ETH_BURST_PER_QUEUE = (1 << 19), /**< Support per queue burst */
-};
 
 /**
  * Ethernet device RX/TX queue packet burst mode information structure.
  * Used to retrieve information about packet burst mode setting.
  */
 struct rte_eth_burst_mode {
-	uint64_t options;
+	uint64_t flags; /**< The ORed values of RTE_ETH_BURST_FLAG_xxx */
+
+#define RTE_ETH_BURST_MODE_INFO_SIZE 1024 /**< Maximum size for information */
+	char info[RTE_ETH_BURST_MODE_INFO_SIZE]; /**< burst mode information */
 };
 
 /** Maximum name length for extended statistics counters */
@@ -3706,20 +3697,6 @@ __rte_experimental
 int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_burst_mode *mode);
 
-/**
- * Retrieve name about burst mode option.
- *
- * @param option
- *   The burst mode option of type *rte_eth_burst_mode_option*.
- *
- * @return
- *   - "": Not found
- *   - "xxx": name of the mode option.
- */
-__rte_experimental
-const char *
-rte_eth_burst_mode_option_name(uint64_t option);
-
 /**
  * Retrieve device registers and register attributes (number of registers and
  * register size)
lib/librte_ethdev/rte_ethdev_version.map +0 -0
index e59d51648..5b00b9a40 100644

lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL { · line 290

Quoted 5 lines
lib/librte_ethdev/rte_ethdev_version.map +0 -1
@@ -287,5 +287,4 @@ EXPERIMENTAL {
 	# added in 19.11
 	rte_eth_rx_burst_mode_get;
 	rte_eth_tx_burst_mode_get;
-	rte_eth_burst_mode_option_name;
 };
#2 lore raw
In reply to Haiyue Wang

04/11/2019 11:39, Haiyue Wang:

Quoted 7 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

---

v2: - Drop the bit field for burst mode information handling.

Please use --in-reply-to, so the versions of a patch can be in the same thread.

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1257

Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +6 -1
 /**
- * Burst mode types, values can be ORed to define the burst mode of a driver.
+ * Generic Burst mode flag definition, values can be ORed.
+ */
+#define RTE_ETH_BURST_FLAG_PER_QUEUE     (1ULL << 0)
+/**< If the queues have different burst mode description, this bit will be set
+ * by PMD, then the application can iterate to retrieve burst description for
+ * all other queues.
  */

I am not sure you can have a doxygen comment before and after the same item.

Quoted 7 lines
lib/librte_ethdev/rte_ethdev.h +0 -7
-enum rte_eth_burst_mode_option {
-	RTE_ETH_BURST_SCALAR = (1 << 0),
-	RTE_ETH_BURST_VECTOR = (1 << 1),
-
-	/**< bits[15:2] are reserved for each vector type */
-	RTE_ETH_BURST_ALTIVEC = (1 << 2),
-	RTE_ETH_BURST_NEON = (1 << 3),

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1269

Quoted 10 lines
lib/librte_ethdev/rte_ethdev.h +0 -10
-	RTE_ETH_BURST_SSE = (1 << 4),
-	RTE_ETH_BURST_AVX2 = (1 << 5),
-	RTE_ETH_BURST_AVX512 = (1 << 6),
-
-	RTE_ETH_BURST_SCATTERED = (1 << 16), /**< Support scattered packets */
-	RTE_ETH_BURST_BULK_ALLOC = (1 << 17), /**< Support mbuf bulk alloc */
-	RTE_ETH_BURST_SIMPLE = (1 << 18),
-
-	RTE_ETH_BURST_PER_QUEUE = (1 << 19), /**< Support per queue burst */
-};

Thank you

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1268

Quoted 11 lines

/**
* Ethernet device RX/TX queue packet burst mode information structure.
* Used to retrieve information about packet burst mode setting. */
struct rte_eth_burst_mode {

lib/librte_ethdev/rte_ethdev.h +4 -1
-	uint64_t options;
+	uint64_t flags; /**< The ORed values of RTE_ETH_BURST_FLAG_xxx */
+
+#define RTE_ETH_BURST_MODE_INFO_SIZE 1024 /**< Maximum size for information */
+	char info[RTE_ETH_BURST_MODE_INFO_SIZE]; /**< burst mode information */
 };

I think the API can be simpler by passing the flags as function parameter.

In my understanding the burst mode name is fixed per Rx/Tx function, so it can be a constant string referenced with a simple char*.

This is the current API:

int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,

    struct rte_eth_burst_mode *mode);

I wonder what do you think of such API? (just a proposal for comments):

char *rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, uint64_t flags);

Or is there some cases where you want to build the string with snprintf? (I cannot think about a case, given it should mapped to a C-function)

#3 lore raw

Hi Thomas,

Quoted 14 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 6, 2019 08:34
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; Ye, Xiaolong <[email protected]>; Sun, Chenmin <[email protected]>; Kinsella, Ray <[email protected]>; Liu, Yu Y <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: enhance the API for getting burst mode information

04/11/2019 11:39, Haiyue Wang:

Quoted 3 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

Quoted 7 lines
Quoted 4 lines

---

v2: - Drop the bit field for burst mode information handling.

Please use --in-reply-to, so the versions of a patch can be in the same thread.

Will take care next time.

Quoted 5 lines
Quoted 5 lines
lib/librte_ethdev/rte_ethdev.h +1 -1
 /**
- * Burst mode types, values can be ORed to define the burst mode of a driver.
+ * Generic Burst mode flag definition, values can be ORed.
Quoted 9 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1257

Quoted 6 lines

+ */

lib/librte_ethdev/rte_ethdev.h +4 -0
+#define RTE_ETH_BURST_FLAG_PER_QUEUE     (1ULL << 0)
+/**< If the queues have different burst mode description, this bit will be set
+ * by PMD, then the application can iterate to retrieve burst description for
+ * all other queues.
  */

I am not sure you can have a doxygen comment before and after the same item.

The first is for all flags, but only one now, so looks like for the same item. The second is just for RTE_ETH_BURST_FLAG_PER_QUEUE flag.

Quoted 40 lines
Quoted 7 lines
lib/librte_ethdev/rte_ethdev.h +0 -7
-enum rte_eth_burst_mode_option {
-	RTE_ETH_BURST_SCALAR = (1 << 0),
-	RTE_ETH_BURST_VECTOR = (1 << 1),
-
-	/**< bits[15:2] are reserved for each vector type */
-	RTE_ETH_BURST_ALTIVEC = (1 << 2),
-	RTE_ETH_BURST_NEON = (1 << 3),

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1269

Quoted 10 lines
lib/librte_ethdev/rte_ethdev.h +0 -10
-	RTE_ETH_BURST_SSE = (1 << 4),
-	RTE_ETH_BURST_AVX2 = (1 << 5),
-	RTE_ETH_BURST_AVX512 = (1 << 6),
-
-	RTE_ETH_BURST_SCATTERED = (1 << 16), /**< Support scattered packets */
-	RTE_ETH_BURST_BULK_ALLOC = (1 << 17), /**< Support mbuf bulk alloc */
-	RTE_ETH_BURST_SIMPLE = (1 << 18),
-
-	RTE_ETH_BURST_PER_QUEUE = (1 << 19), /**< Support per queue burst */
-};

Thank you

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1268

Quoted 11 lines

/**
* Ethernet device RX/TX queue packet burst mode information structure.
* Used to retrieve information about packet burst mode setting. */
struct rte_eth_burst_mode {

lib/librte_ethdev/rte_ethdev.h +4 -1
-	uint64_t options;
+	uint64_t flags; /**< The ORed values of RTE_ETH_BURST_FLAG_xxx */
+
+#define RTE_ETH_BURST_MODE_INFO_SIZE 1024 /**< Maximum size for information */
+	char info[RTE_ETH_BURST_MODE_INFO_SIZE]; /**< burst mode information */
 };

I think the API can be simpler by passing the flags as function parameter.

In my understanding the burst mode name is fixed per Rx/Tx function, so it can be a constant string referenced with a simple char*.

This is the current API:

int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,

Quoted 9 lines
    struct rte_eth_burst_mode *mode);

I wonder what do you think of such API? (just a proposal for comments):

char *rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, uint64_t flags);

Or is there some cases where you want to build the string with snprintf? (I cannot think about a case, given it should mapped to a C-function)

1. 'a constant string' is hard for PMD expanding if it wants to make the string dynamic according to the setting, like: http://patchwork.dpdk.org/patch/62352/
(although based on bit options design).

2. And for dynamic string, if it is *return type*, then the PMD needs to handle the memory allocation, and the application frees it. And 'uint64_t flags' is output parameter, so it should be like 'uint64_t *flags', but this needs the application to declare it or not, and needs PMDs to check whether it is passed or not, then set it.

So for making things easy, the 'struct rte_eth_burst_mode' may be nice, then the application just declares one line : 'struct rte_eth_burst_mode mode', then all things are filled by PMD in one place.

Quoted 1 line
#4 lore raw
Quoted 48 lines

-----Original Message-----
From: Wang, Haiyue
Sent: Wednesday, November 6, 2019 09:22
To: Thomas Monjalon <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; Ye, Xiaolong <[email protected]>; Sun, Chenmin <[email protected]>; Kinsella, Ray <[email protected]>; Liu, Yu Y <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] ethdev: enhance the API for getting burst mode information

Hi Thomas,

Quoted 7 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 6, 2019 08:34
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; Ye, Xiaolong <[email protected]>; Sun, Chenmin <[email protected]>; Kinsella, Ray

<[email protected]>;

Quoted 13 lines

Liu, Yu Y <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: enhance the API for getting burst mode information

04/11/2019 11:39, Haiyue Wang:

Quoted 7 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

---

v2: - Drop the bit field for burst mode information handling.

Quoted 14 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1257

Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +6 -1
 /**
- * Burst mode types, values can be ORed to define the burst mode of a driver.
+ * Generic Burst mode flag definition, values can be ORed.
+ */
+#define RTE_ETH_BURST_FLAG_PER_QUEUE     (1ULL << 0)
+/**< If the queues have different burst mode description, this bit will be set
+ * by PMD, then the application can iterate to retrieve burst description for
+ * all other queues.
  */

I am not sure you can have a doxygen comment before and after the same item.

Quoted 3 lines

The first is for all flags, but only one now, so looks like for the same item. The second is just for RTE_ETH_BURST_FLAG_PER_QUEUE flag.

Yes, you are right. I misunderstand the doxygen's grammar. Its output is two comments together.

RTE_ETH_BURST_FLAG_PER_QUEUE
#define RTE_ETH_BURST_FLAG_PER_QUEUE (1ULL << 0)
Generic Burst mode flag definition, values can be ORed. If the queues have different burst mode description, this bit will be set by PMD, then the application can iterate to retrieve burst description for all other queues.

Definition at line 1253 of file rte_ethdev.h.

I submit a new patch, change the first line to C comment. Now the output is:

RTE_ETH_BURST_FLAG_PER_QUEUE
#define RTE_ETH_BURST_FLAG_PER_QUEUE (1ULL << 0)
If the queues have different burst mode description, this bit will be set by PMD, then the application can iterate to retrieve burst description for all other queues.

Definition at line 1257 of file rte_ethdev.h.

Quoted 2 lines
Quoted 2 lines
#5 lore raw
In reply to Wang, Haiyue

06/11/2019 02:21, Wang, Haiyue:

Quoted 28 lines

From: Thomas Monjalon <[email protected]>

Quoted 27 lines

04/11/2019 11:39, Haiyue Wang:

lib/librte_ethdev/rte_ethdev.h struct rte_eth_txq_info { · line 1268

Quoted 11 lines

/**
* Ethernet device RX/TX queue packet burst mode information structure.
* Used to retrieve information about packet burst mode setting. */
struct rte_eth_burst_mode {

lib/librte_ethdev/rte_ethdev.h +4 -1
-	uint64_t options;
+	uint64_t flags; /**< The ORed values of RTE_ETH_BURST_FLAG_xxx */
+
+#define RTE_ETH_BURST_MODE_INFO_SIZE 1024 /**< Maximum size for information */
+	char info[RTE_ETH_BURST_MODE_INFO_SIZE]; /**< burst mode information */
 };

I think the API can be simpler by passing the flags as function parameter.

In my understanding the burst mode name is fixed per Rx/Tx function, so it can be a constant string referenced with a simple char*.

This is the current API:

int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,

    struct rte_eth_burst_mode *mode);

I wonder what do you think of such API? (just a proposal for comments):

char *rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, uint64_t flags);

Quoted 7 lines
Quoted 3 lines

Or is there some cases where you want to build the string with snprintf? (I cannot think about a case, given it should mapped to a C-function)

1. 'a constant string' is hard for PMD expanding if it wants to make the string dynamic according to the setting, like: http://patchwork.dpdk.org/patch/62352/
(although based on bit options design).

Yes, constant string is less flexible in the PMD implementation.

Quoted 9 lines

2. And for dynamic string, if it is *return type*, then the PMD needs to handle the memory allocation, and the application frees it. And 'uint64_t flags' is output parameter, so it should be like 'uint64_t *flags', but this needs the application to declare it or not, and needs PMDs to check whether it is passed or not, then set it.

So for making things easy, the 'struct rte_eth_burst_mode' may be nice, then the application just declares one line : 'struct rte_eth_burst_mode mode', then all things are filled by PMD in one place.

I agree it is a lot simpler to use a struct.

#6 lore raw

PATCH v3 1/1 ethdev: enhance the API for getting burst mode information

In reply to Haiyue Wang

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

---
v3: - Fix one doxygen issue.

v2: - http://patchwork.dpdk.org/patch/62368/
- Drop the bit field for burst mode information handling.

v1: - http://patchwork.dpdk.org/patch/62289/
- http://patchwork.dpdk.org/patch/62290/
- http://patchwork.dpdk.org/patch/62291/

 app/test-pmd/config.c                    |  33 ++-----
 doc/guides/nics/features.rst             |   3 +-
 doc/guides/rel_notes/release_19_11.rst   |   2 -
 drivers/net/i40e/i40e_rxtx.c             | 121 ++++++++++++-----------
 drivers/net/ice/ice_rxtx.c               |  89 +++++++++--------
 lib/librte_ethdev/rte_ethdev.c           |  35 -------
 lib/librte_ethdev/rte_ethdev.h           |  43 ++------
 lib/librte_ethdev/rte_ethdev_version.map |   1 -
 8 files changed, 131 insertions(+), 196 deletions(-)
app/test-pmd/config.c +10 -23
index efe2812a8..b6039749c 100644
@@ -350,21 +350,6 @@ 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)
 {
@@ -397,10 +382,11 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
@@ -433,10 +419,11 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(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);
-	}
+	if (rte_eth_tx_burst_mode_get(port_id, queue_id, &mode) == 0)
+		printf("\nBurst mode: %s%s",
+		       mode.info,
+		       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+				" (per queue)" : "");
 
 	printf("\n");
 }
doc/guides/nics/features.rst +1 -2
index d96696801..7a31cf7c8 100644
@@ -879,8 +879,7 @@ Burst mode info
 Supports to get Rx/Tx packet burst mode information.
 
 * **[implements] eth_dev_ops**: ``rx_burst_mode_get``, ``tx_burst_mode_get``.
-* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``,
-  ``rte_eth_burst_mode_option_name()``.
+* **[related] API**: ``rte_eth_rx_burst_mode_get()``, ``rte_eth_tx_burst_mode_get()``.
 
 .. _nic_features_other:
 
doc/guides/rel_notes/release_19_11.rst +0 -2
index a009bc068..9da094ec7 100644
@@ -114,8 +114,6 @@ New Features
   ``rte_eth_tx_burst_mode_get`` that allow an application
   to retrieve the mode information about RX/TX packet burst
   such as Scalar or Vector, and Vector technology like AVX2.
-  Another new function ``rte_eth_burst_mode_option_name`` is
-  provided for burst mode options stringification.
 
 * **Updated the Intel ice driver.**
 
drivers/net/i40e/i40e_rxtx.c +61 -60

145 lines not on this page · raw message

drivers/net/ice/ice_rxtx.c +49 -40

115 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev.c +0 -35
index 7743205d3..208362971 100644
@@ -166,25 +166,6 @@ static const struct {
 
 #undef RTE_TX_OFFLOAD_BIT2STR
 
-static const struct {
-	uint64_t option;
-	const char *name;
-} rte_burst_option_names[] = {
-	{ RTE_ETH_BURST_SCALAR, "Scalar" },
-	{ RTE_ETH_BURST_VECTOR, "Vector" },
-
-	{ RTE_ETH_BURST_ALTIVEC, "AltiVec" },
-	{ RTE_ETH_BURST_NEON, "Neon" },
-	{ RTE_ETH_BURST_SSE, "SSE" },
-	{ RTE_ETH_BURST_AVX2, "AVX2" },
-	{ RTE_ETH_BURST_AVX512, "AVX512" },
-
-	{ RTE_ETH_BURST_SCATTERED, "Scattered" },
-	{ RTE_ETH_BURST_BULK_ALLOC, "Bulk Alloc" },
-	{ RTE_ETH_BURST_SIMPLE, "Simple" },
-	{ RTE_ETH_BURST_PER_QUEUE, "Per Queue" },
-};
-
 /**
  * The user application callback description.
  *
@@ -4284,22 +4265,6 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
 		       dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode));
 }
 
-const char *
-rte_eth_burst_mode_option_name(uint64_t option)
-{
-	const char *name = "";
-	unsigned int i;
-
-	for (i = 0; i < RTE_DIM(rte_burst_option_names); ++i) {
-		if (option == rte_burst_option_names[i].option) {
-			name = rte_burst_option_names[i].name;
-			break;
-		}
-	}
-
-	return name;
-}
-
 int
 rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct rte_ether_addr *mc_addr_set,
lib/librte_ethdev/rte_ethdev.h +10 -33

63 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_version.map +0 -1
index e59d51648..5b00b9a40 100644
@@ -287,5 +287,4 @@ EXPERIMENTAL {
 	# added in 19.11
 	rte_eth_rx_burst_mode_get;
 	rte_eth_tx_burst_mode_get;
-	rte_eth_burst_mode_option_name;
 };
Signature · 1 line
2.17.1
#8 lore raw
Quoted 14 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 6, 2019 17:20
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; Ye, Xiaolong <[email protected]>; Sun, Chenmin <[email protected]>; Kinsella, Ray <[email protected]>; Liu, Yu Y <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] ethdev: enhance the API for getting burst mode information

06/11/2019 02:30, Haiyue Wang:

Quoted 3 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

Quoted 7 lines
Quoted 2 lines

Thank you for accepting my comments which came late.

Thanks for sharing the good programming practice and your patience to listen and reply.

BR,
Haiyue

Applied
#9 lore raw
Quoted 14 lines · Haiyue
Quoted 14 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 6, 2019 17:20
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; Ye, Xiaolong <[email protected]>; Sun, Chenmin <[email protected]>; Kinsella, Ray <[email protected]>; Liu, Yu Y <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] ethdev: enhance the API for getting burst mode information

06/11/2019 02:30, Haiyue Wang:

Quoted 3 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

Thank you for accepting my comments which came late.

Applied to dpdk-next-net/master, thanks.

Acked-by on v3 1/1
#10 lore raw
In reply to Haiyue Wang
Quoted 12 lines

-----Original Message-----
From: Haiyue Wang <[email protected]>
Sent: Wednesday, November 6, 2019 3:30
To: [email protected]; Thomas Monjalon <[email protected]>; [email protected]; [email protected]; [email protected]; Slava Ovsiienko <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Haiyue Wang <[email protected]>
Subject: [PATCH v3] ethdev: enhance the API for getting burst mode information

Quoted 5 lines

Change the type of burst mode information from bit field to free string data, so that each PMD can describe the Rx/Tx busrt functions flexibly.