[RFC,v2,06/26] bpf: use separate Rx and Tx queue limits

Message ID 20240813160003.423935-7-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, 3:59 p.m. UTC
Update library 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>
---
 lib/bpf/bpf_pkt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c
index aaca935f2d..2c6b0e18f7 100644
--- a/lib/bpf/bpf_pkt.c
+++ b/lib/bpf/bpf_pkt.c
@@ -503,7 +503,8 @@  bpf_eth_elf_load(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue,
 	ftx = NULL;
 
 	if (prm == NULL || rte_eth_dev_is_valid_port(port) == 0 ||
-			queue >= RTE_MAX_QUEUES_PER_PORT)
+			queue >= (cbh->type == BPF_ETH_RX ?
+				RTE_MAX_ETHPORT_RX_QUEUES : RTE_MAX_ETHPORT_TX_QUEUES))
 		return -EINVAL;
 
 	if (cbh->type == BPF_ETH_RX)