[v3,24/26] examples/vhost: use separate Rx and Tx queue limits

Message ID 20240814104933.14062-25-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 example app 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>
---
 examples/vhost/main.c | 2 +-
 examples/vhost/main.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 4391d88c3d..9c2f3a02eb 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1891,7 +1891,7 @@  reset_dma(void)
 	for (i = 0; i < RTE_MAX_VHOST_DEVICE; i++) {
 		int j;
 
-		for (j = 0; j < RTE_MAX_QUEUES_PER_PORT * 2; j++) {
+		for (j = 0; j < RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES; j++) {
 			dma_bind[i].dmas[j].dev_id = INVALID_DMA_ID;
 			dma_bind[i].dmas[j].async_enabled = false;
 		}
diff --git a/examples/vhost/main.h b/examples/vhost/main.h
index c986cbc5a9..374ba30ec6 100644
--- a/examples/vhost/main.h
+++ b/examples/vhost/main.h
@@ -99,7 +99,7 @@  struct dma_info {
 };
 
 struct dma_for_vhost {
-	struct dma_info dmas[RTE_MAX_QUEUES_PER_PORT * 2];
+	struct dma_info dmas[RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES];
 	uint32_t async_flag;
 };