0

While upgrading DPDK from version 17.02 to 21.11 rte_eth_dev_configure is failing with return code -22. Due to that, my application is not working.

PFB the details about the system.

  1. Using Intel Corporation Ethernet Connection X722.

lspci | grep "Ethernet" 3d:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 09) 3d:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 09) af:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection

  1. Driver used :

ethtool -i eth0 driver: i40e version: 2.7.29 firmware-version: 3.31 0x80000d31 1.1767.0 expansion-rom-version: bus-info: 0000:3d:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes

  1. Number of RX queues : 4

  2. enabled log using --log-level=pmd,8 , PFB the dpdk.log output.

"[Wed Jan 11 04:00:34 2023][ms_dpi: 1150] Starting DPDK logging session EAL: Detected CPU lcores: 40 EAL: Detected NUMA nodes: 1 EAL: Static memory layout is selected, amount of reserved memory can be adjusted with -m or --socket-mem EAL: Detected shared linkage of DPDK EAL: Trace dir: /root/dpdk-traces/rte-2023-01-11-AM-04-00-34 EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: NUMA support not available consider that all memory is in socket_id 0 EAL: Probe PCI driver: net_i40e (8086:37d2) device: 0000:3d:00.1 (socket 0) eth_i40e_dev_init(): >> i40e_pf_reset(): Core and Global modules ready 0 i40e_init_shared_code(): i40e_init_shared_code i40e_set_mac_type(): i40e_set_mac_type

i40e_set_mac_type(): i40e_set_mac_type found mac: 3, returns: 0 i40e_init_nvm(): i40e_init_nvm i40e_allocate_dma_mem_d(): memzone i40e_dma_0 allocated with physical address: 65496862720"

The application was working fine with DPDK version 17.02. Is there any change with respect to the i40e driver which is causing this issue? All libraries needed to build the application are present in the system like -Wl,-lrte_net_enic -Wl,-lrte_net_i40e.

Did anybody face the same issue with provided configuration?

I am not able to figure out the root cause of this error. Any help is appreciated. Thanks

  • For DPDK 21.11 the supported driver is `2.17.4` with firmware `8.30`. I have seen couple of times when firmware is low and DPDK version higher it does not init the device. Looks like you are running into similar issue. Can you update and re-run the simple testpmd., l2fwd? – Vipin Varghese Jan 16 '23 at 16:40
  • I tried updating the firmware and driver versions. I was able to upgrade the firmware but ran into compilation issues (beyond version: 2.11.21) when upgrading the i40e driver to a dpdk supported version. It could be a problem with the kernel version. My kernel is 4.9.309 (uname -r 4.9.309-1.11.10.0.x86_64). The firmware version after the upgrade is 5.30 0x80002a31 1.2926.0 and the driver version is 2.11.21. – shiv chittora Jan 17 '23 at 04:28
  • 'EAL: Detected CPU lcores: 40 EAL: Detected NUMA nodes: 1 EAL: Selected IOVA mode 'PA' EAL: Probe PCI driver: net_i40e (8086:37d2) device: 0000:3d:00.1 (socket 0) testpmd: create a new mbuf pool : n=427456, size=2176, socket=0 Configuring Port 0 (socket 0) Port 0: A4:BF:01:86:A5:A0 - Forward statistics for port 0 - RX-packets: 8 RX-dropped: 0 RX-total: 8 TX-packets: 7 TX-dropped: 0 TX-total: 7 ` – shiv chittora Jan 17 '23 at 04:48
  • after the firmware update `RX-packets: 8 RX-dropped: 0 RX-total: 8 TX-packets: 7`, si this for dpdk 21.11? – Vipin Varghese Jan 17 '23 at 13:49
  • after the firmware update the coutners for rx and tx are updated for dpdk 21.11? – Vipin Varghese Jan 17 '23 at 13:49
  • It's been a few days since I upgraded the firmware version. As far as I know, Testpmd was working fine earlier also. My application which is using dpdk is not coming up. It's failing at rte_eth_dev_configure with error code -22. The number of Tx and Rx queues is the same as TestPmd. I am suspecting something is changed with respect to the i40 driver which is causing this. – shiv chittora Jan 18 '23 at 06:44

1 Answers1

0

Issue has been resolved. Application code was earlier using eth_config.rx_adv_conf.rss_conf.rss_hf = 260 (RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_IPV6).

After running the testpmd with same configuration (rx queues = 4 and tx queue = 1) got to know the supported RSS offload attributes.

Output of the testpmd command shows supported offload flags.

testpmd> show port 0 rss-hash
RSS functions:
 ipv4-frag ipv4-other ipv6-frag ipv6-other
testpmd> quit

Supported offload attributes by i40e driver.

    #define I40E_RSS_OFFLOAD_ALL ( \
            RTE_ETH_RSS_FRAG_IPV4 | \
            RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
            RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
            RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
            RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
            RTE_ETH_RSS_FRAG_IPV6 | \
            RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
            RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
            RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
            RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
            RTE_ETH_RSS_L2_PAYLOAD)
    
eth_config.rx_adv_conf.rss_conf.rss_hf = 840 (RTE_ETH_RSS_FRAG_IPV4| RTE_ETH_RSS_NONFRAG_IPV4_OTHER|RTE_ETH_RSS_FRAG_IPV6 |RTE_ETH_RSS_NONFRAG_IPV6_OTHER) 

After providing the right hash value. Application started running fine.