Created attachment 275[details]
l2fwd patch to demonstrate issue
When a PCAP PMD Ethernet device is first configured, the selected number of RX
and TX queues overrides the max values initially returned by
rte_eth_dev_info_get() (max_rx_queues, max_tx_queues). Now, if one tries to
reconfigure the device with a larger queue count(s), rte_eth_dev_configure()
will fail to an internal capability check. Reconfiguring devices this way is
useful for example in CI usage.
The issue can be reproduced with the attached simple patch to l2fwd example.
Example output from patched l2fwd (v22.11.4):
$ sudo ./examples/dpdk-l2fwd --no-pci --vdev net_pcap0,iface=lo -- -p 0x1
EAL: Detected CPU lcores: 48
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
MAC updating enabled
Notice: odd number of ports in portmask.
Lcore 0: RX port 0 TX port 0
Initializing port 0...
orig. max_rx_queues: 1
orig. max_tx_queues: 1
after conf max_rx_queues: 0
after conf max_tx_queues: 1
Ethdev port_id=0 nb_rx_queues=1 > 0
EAL: Error - exiting with code: 1
Cause: Cannot configure device: err=-22, port=0
Created attachment 275 [details] l2fwd patch to demonstrate issue When a PCAP PMD Ethernet device is first configured, the selected number of RX and TX queues overrides the max values initially returned by rte_eth_dev_info_get() (max_rx_queues, max_tx_queues). Now, if one tries to reconfigure the device with a larger queue count(s), rte_eth_dev_configure() will fail to an internal capability check. Reconfiguring devices this way is useful for example in CI usage. The issue can be reproduced with the attached simple patch to l2fwd example. Example output from patched l2fwd (v22.11.4): $ sudo ./examples/dpdk-l2fwd --no-pci --vdev net_pcap0,iface=lo -- -p 0x1 EAL: Detected CPU lcores: 48 EAL: Detected NUMA nodes: 1 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: VFIO support initialized TELEMETRY: No legacy callbacks, legacy socket not created MAC updating enabled Notice: odd number of ports in portmask. Lcore 0: RX port 0 TX port 0 Initializing port 0... orig. max_rx_queues: 1 orig. max_tx_queues: 1 after conf max_rx_queues: 0 after conf max_tx_queues: 1 Ethdev port_id=0 nb_rx_queues=1 > 0 EAL: Error - exiting with code: 1 Cause: Cannot configure device: err=-22, port=0