[v3,16/26] net/sfc: use separate Rx and Tx queue limits

Message ID 20240814104933.14062-17-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series add meson config options for queues per port |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Aug. 14, 2024, 10:49 a.m. UTC
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@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/sfc/sfc_sw_stats.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Patch

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;