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.
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
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
Number of RX queues : 4
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
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.
Related
Trying to get Intel adapter E810-XXVDA2 to work with VPP (using vfio-pci driver) and cannot figure out the error. When I use the adapter outside of VPP/DPDK, it works just fine (uses ice driver).
Adapter: Intel(R) Ethernet Network Adapter E810-XXVDA2, driver: vfio-pci
VPP: v22.02
Linux: kernel 5.13.0-40-generic, Ubuntu focal 20.04.3 LTS
When interface is specified in /etc/vpp/startup.conf and started with vppctl:
vpp# show hardware-interfaces TwentyFiveGigabitEthernet37/0/0
Name Idx Link Hardware
TwentyFiveGigabitEthernet37/0/0 1 up TwentyFiveGigabitEthernet37/0/0
...
rx bytes ok 2613819
rx missed 18468
Errors:
rte_eth_dev_start[port:0, errno:-5]: Unknown error -5
rte_eth_dev_start[port:0, errno:-5]: Unknown error -5
What does the -5 (EIO) from dpdk mean? Thanks in advance!
EDIT:
I was able to get past this error. Going by the suggestion from #VipinVarghese, I turned on logging (which for VPP users means adding log-level pmd,8 to dpdk section and default-log-level debug in logging section of /etc/vpp/startup.conf).
There I saw that there was a second error which needed me to update ice driver. I was at 1.3.4, I moved it to 1.8.8. After that, both errors got resolved.
The errors were:
2022/05/04 19:58:48:594 error dpdk Interface TwentyFiveGigabitEthernet37/0/0 error -5: Unknown error -5
2022/05/04 19:58:48:594 error interface sw_set_flags_helper: dpdk_interface_admin_up_down: Interface start failed
2022/05/04 19:58:48:595 notice dpdk ice_tx_queue_start(): >>
2022/05/04 19:58:48:595 notice dpdk ice_rx_queue_start(): >>
2022/05/04 19:58:48:595 notice dpdk ice_program_hw_rx_queue(): Port (0) - Rx queue (0) is set with RXDID : 22
2022/05/04 19:58:48:595 notice dpdk ice_program_hw_rx_queue(): currently package doesn't support RXDID (22)
2022/05/04 19:58:48:595 notice dpdk ice_rx_queue_start(): fail to program RX queue 0
2022/05/04 19:58:48:595 notice dpdk ice_dev_start(): fail to start Rx queue 0
RXDID #22 (ICE_RXDID_COMMS_OVS) was not supported until later versions.
DPDK ICE (columibaville E810) PMD can return EIO at 2 different places
HW or device reset - hw->resetting
Traffic Manager configuration - hw->tm_conf
Hence to nail down on the exact problem, always run it with DPDK EAL_INIT option --log-level=pmd,8. This will help to capture more details with respect to PMD. I highly recommend to use the appropriate driver and firmware version against the DPDK version as mentioned in section 25.3.
[Update] updating the linux driver (which in turn houses the DDP and firmware) has solved the issue for #schugcove.
I spent some time trying to figure out how to fix the "number of ports must be even" error. I've seen this answer which explains how to run DPDK inside a VM. I was wondering if there is a solution that does not require one.
My platform: Debian 10, Linux 5.8 (on a laptop) with an e1000e NIC driver
What I want to do: Make the skeleton (basicfwd) app work
My problem: rte_eth_dev_count_avail returns 0
What I did up until now: I followed the documentation and tried to setup a vfio_pci driver to my ethernet device.
Two things:
When I bind a device with the vfio_pci driver it loses its IP
interface
I can't create VF devices because I can't write in /sys/bus/pci/devices/ even when I su root
The skeleton program is not working with this so I tried using another driver.
I bound the device to the uio_pci_generic driver. It does bind to it but the app still doesn't work. Here is the dpdk-devbind.py --status output:
Network devices using DPDK-compatible driver
============================================
0000:00:1f.6 'Device 0d4f' drv=uio_pci_generic unused=e1000e
What happens when I launch the program:
$ sudo ./build/examples/dpdk-skeleton -l 0-3 -n 4 -a 0000:00:1f.6
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: No legacy callbacks, legacy socket not created
EAL: Error - exiting with code: 1
Cause: Error: number of ports must be even
Thanks for reading, any help is appreciated !
In VM I am able to get e1000 bind with the following steps
Start VM with 82540EM Gigabit Ethernet Controller
Download and build DPDK 21.02
insmod igb_uio or modprobe uio_pci_generic
bind with vfio-pci fails with vfio-pci: probe of 0000:00:08.0 failed with error -22
start the application with ./a.out -l 1 --log-level=pmd,8
build application: gcc basicfwd.c $(pkg-config --libs --cflags --static libdpdk
Logs:
e1000_null_phy_generic(): e1000_null_phy_generic
e1000_read_phy_reg_m88(): e1000_read_phy_reg_m88
e1000_null_ops_generic(): e1000_null_ops_generic
e1000_read_phy_reg_mdic(): e1000_read_phy_reg_mdic
e1000_null_phy_generic(): e1000_null_phy_generic
e1000_read_phy_reg_m88(): e1000_read_phy_reg_m88
e1000_null_ops_generic(): e1000_null_ops_generic
e1000_read_phy_reg_mdic(): e1000_read_phy_reg_mdic
e1000_null_phy_generic(): e1000_null_phy_generic
e1000_setup_copper_link_generic(): Unable to establish link!!!
e1000_setup_link_generic(): Initializing the Flow Control address, type and timer regs
e1000_set_fc_watermarks_generic(): e1000_set_fc_watermarks_generic
e1000_clear_hw_cntrs_82540(): e1000_clear_hw_cntrs_82540
e1000_clear_hw_cntrs_base_generic(): e1000_clear_hw_cntrs_base_generic
e1000_check_for_copper_link_generic(): e1000_check_for_copper_link
e1000_phy_has_link_generic(): e1000_phy_has_link_generic
e1000_read_phy_reg_m88(): e1000_read_phy_reg_m88
e1000_null_ops_generic(): e1000_null_ops_generic
e1000_read_phy_reg_mdic(): e1000_read_phy_reg_mdic
e1000_null_phy_generic(): e1000_null_phy_generic
e1000_read_phy_reg_m88(): e1000_read_phy_reg_m88
e1000_null_ops_generic(): e1000_null_ops_generic
e1000_read_phy_reg_mdic(): e1000_read_phy_reg_mdic
e1000_null_phy_generic(): e1000_null_phy_generic
e1000_null_ops_generic(): e1000_null_ops_generic
eth_em_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x100e
note: unmodified skeleton requires an even number of ports to work properly.
Hence there is no issue with e1000 and DPDK usability
[EDIT-1] had a live debug with Jeremy, the issue is now reproduced on a physical machine with physical NIC (an not emulated e1000). Checking the PCIe details the physical NIC is not in the list of supported Intel DPDK NIC. Requested to use a physical NIC recommend from DPDK.
On my Windows10, having stm32f407vg discovery boards I'm doing example: f4-blog-master
Then I got this error:
D:\Software\OpenOCD-20170821\bin\openocd.exe -c "tcl_port disabled" -s D:\Software\OpenOCD-20170821\share\openocd\scripts -f board/stm32f4discovery.cfg -c "program \"E:/EDA223_Real-Time-Systems/EDA223_CODE/STM32CubeMX/f4-blog-master/cmake-build-debug/f4-blog.elf\";reset init;"
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00404-g20463c28 (2018-0
1-23-12:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results mi
ght differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v29 API v2 SWIM v18 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 2.883666
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080004c8 msp: 0x20020000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x10076413
Info : flash size = 1024kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000046 msp: 0x20020000
wrote 16384 bytes from file E:/EDA223_Real-Time-Systems/EDA223_CODE/STM32CubeMX/
f4-blog-master/cmake-build-debug/f4-blog.elf in 0.788115s (20.302 KiB/s)
** Programming Finished **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080004c8 msp: 0x20020000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
Info : tcl server disabled
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Info : dropped 'gdb' connection
Code is uploaded, gdb get connection, but then debugger console says:
Truncated register 16 in remote 'g' packet
Debugger disconnected
How to fix it?
PS: My OpenOCD settings seems valid. Did not set anything in toolchain besides normal MinGW-w64. Cmake settings are default ones. In Debug config I target: UPLOAD, executable: f4-blog.elf.
When I do Tools-> Run OpenOCD, I got:
...
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
So OpenOCD seems fine, but gdb is crashing, why?
I had the same issue. To fix it, I first added a toolchain based on i686-w64-mingw32 (32-bit version of mingw-w64) in Settings > Build, Execution, Deployment > Toolchains like SapuSeven suggested, but it still did not work, so I also changed the "Debugger" of this toolchain to the arm-none-eabi-gdb.exe debugger of my ARM toolchain installation (C:\Program Files (x86)\GNU Tools ARM Embedded\7 2018-q2-update\bin\arm-none-eabi-gdb.exe on my computer) and it worked. Make sure to set this new toolchain as the default one by moving it up in the toolchains list.
Also I think that both the Target and Executable fields of the "OCD loop" run/debug configuration should be set to "< project_name >.elf" as shown in the CLion docs, rather than "UPLOAD".
Try installing the 32bit-version of MinGW. Don't forget to change the toolchain to this new version inside CLion - this helped in my case.
Windows7 64bit
With the Nucleo connected to USB port I was able to use ST-LINK Utility to download the hex file to the board successfully. But after execute the command:
..\bin\openocd.exe -f board\st_nucleo_f7.cfg
With st_nucleof7.cfg contains following lines:
source [find interface/stlink-v2-1.cfg]
transport select hla_swd
source [find target/stm32f7x.cfg]
reset_config srst_only
...and stlink-v2-1.cfg has:
interface hla
hla_layout stlink
hla_device_desc "ST-LINK/V2-1"
hla_vid_pid 0x0483 0x374b
...and Device Manager shows USB Device as "STLINK dongle" with Hardware lds Value as:
USB\VID_0483&PID_374B&REV_0100&MI_00
USB\VID_0483&PID_374B&MI_00
It seems all VID and PID are matched.
...but I got the following error. Could someone tell me what is wrong in my setup please?
GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-
18:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results mi
ght differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'
Thanks,
Brian
I found the answer here:
https://www.eevblog.com/forum/microcontrollers/openocd-fail-to-open-stm32-nucleo-board/
Evidently OpenOCD cannot connect to USB 3.0 port. I switched to another port and it worked!!!
Why no one at OpenOCD instructs that it doesn't work with usb 3.0? I have spent a few days on this problem.
I still don't know how to tell which port has 2.0 or 3.0 version looking at the Device Manager.
I have a Linux embedded device using Linux kernel 3.17 and a WiLink 8 wireless module as Bluetooth device (uses UART) (see Gumstix AirStorm-y). Also, I have Qt 5.3.2 and Bluez 4.101 installed on it.
My problem is when I execute my Qt app, I can't get information on my bluetooth device using QBluetoothLocalDevice. For example, QBluetoothLocalDevice::allDevices() always returns an empty list and QBluetoothLocalDevice::address() always returns "00:00:00:00:00:00". If I try to execute the chat example, I get the 'Cannot bind chat server to "00:00:00:00:00:00"' error.
I'm sure my bluetooth device is up and running:
hci0:
Type: BR/EDR Bus: UART
BD Address: 5C:31:3E:CE:C3:CE ACL MTU: 1021:6 SCO MTU: 180:4
UP RUNNING PSCAN
RX bytes:657 acl:0 sco:0 events:37 errors:0
TX bytes:979 acl:0 sco:0 commands:37 errors:0
I can also do scan using hcitools.
Dbus is also running correctly, when I do dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter I get:
method return sender=:1.5 -> dest=:1.12 reply_serial=2
object path "/org/bluez/1743/hci0"
In my app, everything else seems to work just fine (I a have a QTCPserver and file manager with QFileSystemWatcher), it's only the BLuetooth part I can't manage to make it worked.