[v3,18/26] net/vhost: use separate Rx and Tx queue limits

Message ID 20240814104933.14062-19-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 warning coding style issues

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/vhost/rte_eth_vhost.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Patch

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 21bbb008e0..78bc755109 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -117,8 +117,8 @@  static struct rte_eth_link pmd_link = {
 struct rte_vhost_vring_state {
 	rte_spinlock_t lock;
 
-	bool cur[RTE_MAX_QUEUES_PER_PORT * 2];
-	bool seen[RTE_MAX_QUEUES_PER_PORT * 2];
+	bool cur[RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES];
+	bool seen[RTE_MAX_ETHPORT_RX_QUEUES + RTE_MAX_ETHPORT_TX_QUEUES];
 	unsigned int index;
 	unsigned int max_vring;
 };
@@ -1648,7 +1648,8 @@  rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 	if (rte_kvargs_count(kvlist, ETH_VHOST_QUEUES_ARG) == 1) {
 		ret = rte_kvargs_process(kvlist, ETH_VHOST_QUEUES_ARG,
 					 &open_int, &queues);
-		if (ret < 0 || queues > RTE_MAX_QUEUES_PER_PORT)
+		if (ret < 0 || queues > RTE_MAX_ETHPORT_RX_QUEUES
+			    || queues > RTE_MAX_ETHPORT_TX_QUEUES)
 			goto out_free;
 
 	} else