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

Message ID 20240813160003.423935-25-bruce.richards@intel.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series add meson config options for queues per port |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Bruce Richardson Aug. 13, 2024, 4 p.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>
---
 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;
 };