[PATCH v3 06/26] bpf: use separate Rx and Tx queue limits

Bruce Richardson bruce.richardson at intel.com
Wed Aug 14 12:49:12 CEST 2024


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 at intel.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 lib/bpf/bpf_pkt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)
-- 
2.43.0



More information about the dev mailing list