DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/1] app/testpmd: add valid check to verify multi mempool feature
@ 2022-11-17 11:30 Hanumanth Pothula
  2022-11-17 12:55 ` [PATCH v2 " Hanumanth Pothula
  0 siblings, 1 reply; 27+ messages in thread
From: Hanumanth Pothula @ 2022-11-17 11:30 UTC (permalink / raw)
  To: Aman Singh, Yuying Zhang
  Cc: dev, andrew.rybchenko, thomas, yux.jiang, jerinj, ndabilpuram,
	gakhil, hpothula

Validate ethdev parameter 'max_rx_mempools' to know wheater device
supports multi-mempool feature or not.

Bugzilla ID: 1128

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 app/test-pmd/testpmd.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 78ea19fcbb..79c0951b62 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2648,16 +2648,22 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 {
 	union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {};
 	struct rte_mempool *rx_mempool[MAX_MEMPOOL] = {};
+	struct rte_eth_dev_info dev_info;
 	struct rte_mempool *mpx;
 	unsigned int i, mp_n;
 	int ret;
 
+	ret = rte_eth_dev_info_get(port_id, &dev_info);
+	if (ret != 0)
+		return ret;
+
 	/* Verify Rx queue configuration is single pool and segment or
 	 * multiple pool/segment.
+	 * @see rte_eth_dev_info::max_rx_mempools
 	 * @see rte_eth_rxconf::rx_mempools
 	 * @see rte_eth_rxconf::rx_seg
 	 */
-	if (!(mbuf_data_size_n > 1) && !(rx_pkt_nb_segs > 1 ||
+	if (!(dev_info.max_rx_mempools != 0) && !(rx_pkt_nb_segs > 1 ||
 	    ((rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) != 0))) {
 		/* Single pool/segment configuration */
 		rx_conf->rx_seg = NULL;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-11-22  8:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 11:30 [PATCH v1 1/1] app/testpmd: add valid check to verify multi mempool feature Hanumanth Pothula
2022-11-17 12:55 ` [PATCH v2 " Hanumanth Pothula
2022-11-17 15:00   ` Singh, Aman Deep
2022-11-17 15:58     ` [EXT] " Hanumanth Reddy Pothula
2022-11-17 16:03   ` [PATCH v3 " Hanumanth Pothula
2022-11-17 23:36     ` Ferruh Yigit
2022-11-18  6:51       ` Han, YingyaX
2022-11-18 11:37         ` Hanumanth Reddy Pothula
2022-11-18 11:13   ` Hanumanth Pothula
2022-11-18 14:13     ` [PATCH v4 " Hanumanth Pothula
2022-11-18 20:56       ` Ferruh Yigit
2022-11-19  0:00         ` [EXT] " Hanumanth Reddy Pothula
2022-11-21 10:08           ` Ferruh Yigit
2022-11-21 10:44             ` Hanumanth Reddy Pothula
2022-11-21 12:45       ` [PATCH v5 " Hanumanth Pothula
2022-11-21 13:22         ` Ferruh Yigit
2022-11-21 13:36           ` [EXT] " Hanumanth Reddy Pothula
2022-11-21 14:10             ` Ferruh Yigit
2022-11-21 14:33         ` [PATCH v6 " Hanumanth Pothula
2022-11-21 17:31           ` Ferruh Yigit
2022-11-21 17:45             ` [EXT] " Hanumanth Reddy Pothula
2022-11-21 18:05               ` Ferruh Yigit
2022-11-21 18:07           ` [PATCH v7 " Hanumanth Pothula
2022-11-21 18:40             ` Ferruh Yigit
2022-11-22  6:42             ` Han, YingyaX
2022-11-22  6:52               ` Tang, Yaqi
2022-11-22  8:33                 ` Ferruh Yigit

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).