Bug 1384 - PCAP PMD reconfiguration failure
Summary: PCAP PMD reconfiguration failure
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 22.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2024-02-26 10:15 CET by Matias Elo
Modified: 2024-02-26 10:15 CET (History)
0 users



Attachments
l2fwd patch to demonstrate issue (1.53 KB, application/mbox)
2024-02-26 10:15 CET, Matias Elo
Details

Description Matias Elo 2024-02-26 10:15:01 CET
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

Note You need to log in before you can comment on or make changes to this bug.