Hi,
I am using DPDK on a Connectx-5 to generate packets at very high bandwidth.
Because I only need to send packets, I am using one or more TX queues, but no RX queues. This worked fine using up to DPDK 21.08, but does not work anymore after updating to DPDK 21.11. I am getting the error mlx5_net: port 0 cannot allocate rxq private data
when calling rte_eth_dev_configure
.
After debugging, I found that the commit 4cda06c3c35e004a333e98f83786ef3a16260ad4 of DPDK introduced my issue (drivers/net/mlx5/mlx5_ethdev.c:108), by trying to allocate private memory for RX queues even if rxqs_n (the number of RX queues requested) equals 0. Allocating 0 bytes of memory obviously returns a NULL pointer, triggering the error.
Q: Should it be allowed to allocate only TX queues on a Mellanox NIC ? If yes, I could provide a simple code path for the case where rxqs_n==0. But I fear breaking more code…
I want to know if this is a bug or expected behaviour, and what is the best way to fix / best workaround.
I know that I can allocate an unused RX queue, but this would cost the mempool, and the flow API, so a bigger footprint and complexity to this simple application.
I attached a MWE triggering the error on DPDK 21.11 but working fine with DPDK 21.08.
I run it with # ./no_rx_queue -a 84:00.0
. Here is my PCI configuration:
lspci | grep nox
05:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
0c:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
84:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
8b:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
Thanks for any help,
Julien
no_rx_queue.c (1 KB)