[RFC PATCH v2 16/26] net/sfc: use separate Rx and Tx queue limits

Bruce Richardson bruce.richards at intel.com
Tue Aug 13 17:59:53 CEST 2024


Update driver to use the new defines RTE_MAX_ETHPORT_TX_QUEUES and
RTE_MAX_ETHPORT_RX_QUEUES rather than the old define
RTE_MAX_QUEUES_PER_PORT.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/sfc/sfc_sw_stats.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 3ae5023b6f..27892e7d4f 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -825,9 +825,11 @@ sfc_sw_xstats_alloc_queues_bitmap(struct sfc_adapter *sa)
 	struct rte_bitmap **queues_bitmap = &sa->sw_stats.queues_bitmap;
 	void **queues_bitmap_mem = &sa->sw_stats.queues_bitmap_mem;
 	uint32_t bmp_size;
+	uint32_t max_queues = RTE_MAX(RTE_MAX_ETHPORT_RX_QUEUES,
+				      RTE_MAX_ETHPORT_TX_QUEUES);
 	int rc;
 
-	bmp_size = rte_bitmap_get_memory_footprint(RTE_MAX_QUEUES_PER_PORT);
+	bmp_size = rte_bitmap_get_memory_footprint(max_queues);
 	*queues_bitmap_mem = NULL;
 	*queues_bitmap = NULL;
 
@@ -836,7 +838,7 @@ sfc_sw_xstats_alloc_queues_bitmap(struct sfc_adapter *sa)
 	if (*queues_bitmap_mem == NULL)
 		return ENOMEM;
 
-	*queues_bitmap = rte_bitmap_init(RTE_MAX_QUEUES_PER_PORT,
+	*queues_bitmap = rte_bitmap_init(max_queues,
 					 *queues_bitmap_mem, bmp_size);
 	if (*queues_bitmap == NULL) {
 		rc = EINVAL;
-- 
2.43.0



More information about the dev mailing list