When initializing l3fwd, the offload configuration is not checked, leading to requesting offloads from the device that might not be supported. This is easily verified by attempting to use a pcap vdev in l3fwd.
Hi Anatoly, could you please provide your reproduce steps, environment, expect results and actual results in detail? Thanks.
Like i said, just trying to use pcap PMD in l3fwd will cause that issue: ``` xxxx@xxxx:~/build/DPDK$ sudo examples/dpdk-l3fwd -l 1,2 --vdev="net_pcap0,iface=enp8s0f0" -- -p 1 --config="(0,0,2)" EAL: Detected 64 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 2048 kB hugepages reported EAL: Probing VFIO support... EAL: VFIO support initialized EAL: No legacy callbacks, legacy socket not created LPM or EM none selected, default LPM on Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=2... Port 0 modified RSS hash function based on hardware support,requested:0xa38c configured:0 Ethdev port_id=0 nb_tx_queues=2 > 1 EAL: Error - exiting with code: 1 Cause: Cannot configure device: err=-22, port=0 ```
Robin, Do you plan to take a look at this? Thanks
Apologies, the above log is a little bit incorrect. Here's the correct log: ``` xxxx@xxxx:~/build/DPDK$ sudo examples/dpdk-l3fwd -l 1 --vdev="net_pcap0,iface=enp8s0f0" -- -p 1 --config="(0,0,1)" EAL: Detected 64 lcore(s) EAL: Detected 2 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 2048 kB hugepages reported EAL: Probing VFIO support... EAL: VFIO support initialized LPM or EM none selected, default LPM on Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=1... Port 0 modified RSS hash function based on hardware support,requested:0xa38c configured:0 Ethdev port_id=0 requested Rx offloads 0xe doesn't match Rx offloads capabilities 0x0 in rte_eth_dev_configure() EAL: Error - exiting with code: 1 Cause: Cannot configure device: err=-22, port=0 ``` As can be seen from above log, the offloads requested and offloads supported don't match in case of pcap driver, because DPDK apparently attempts to request unsupported offloads unconditionally. If this is intended behavior (i.e. if l3fwd is not meant to be working without certain offloads), perhaps the error message should be more descriptive?