EttusResearch / uhd

The USRP™ Hardware Driver Repository
http://uhd.ettus.com
Other
1k stars 666 forks source link

uhd installation issue when DPDK=ON #754

Closed houshangaziziaccelleran closed 1 month ago

houshangaziziaccelleran commented 5 months ago

Hello Can you please help with the attached uhd installation issue? Thanks Houshang uhd_installation.txt

NI-LAm commented 5 months ago

Looks like you miss some DPDK packages. Did you installed them?

sudo apt install dpdk dpdk-dev

This is the UHD issue tracker. Questions like this are better asked in the mailing list (more readers, quicker response time). https://kb.ettus.com/Mailing_Lists#usrp-users.

houshangaziziaccelleran commented 5 months ago

Hello It did not help. Please see the new screenshot attached. Thanks uhd-error.txt

houshangaziziaccelleran commented 5 months ago

in line 270 on uhd/host/lib/transport/uhd-dpdk/dpdk_io_service.cpp removed:

rte_thread_setname(pthread_self(), name);

and added below instead

#if (RTE_VER_YEAR >= 23)
        rte_thread_set_name(rte_thread_self(), name);
#else
            rte_thread_setname(pthread_self(), name);
#endif
houshangaziziaccelleran commented 5 months ago

Hello Please see below. As you can see, when use_dpdk argument is there, benchmark_rate fails no matter if it is 0 or 1.


ad@bm-super11-intel:/usr/local/lib/uhd/examples$ sudo ./benchmark_rate --rx_rate 125e6 --rx_subdev "A:0 B:0" --rx_channels 0,1 --tx_rate 125e6 --tx_subdev "A:0 B:0" --tx_channels 0,1 --args "addr=10.10.1.100,second_addr=10.10.2.100,mgmt_addr=10.10.0.100,master_clock_rate=125e6,use_dpdk=1"

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; DPDK_23.11; UHD_4.6.0.HEAD-0-g50fa3baa
EAL: Detected CPU lcores: 64
EAL: Detected NUMA nodes: 1
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 4 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
[ERROR] [DPDK] No available DPDK devices (ports) found!
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [UHD] Device discovery error: RuntimeError: No available DPDK devices (ports) found!
[ERROR] [X300] X300 Network discovery error RuntimeError: Error with EAL initialization
[00:00:00.000238] Creating the usrp device with: addr=10.10.1.100,second_addr=10.10.2.100,mgmt_addr=10.10.0.100,master_clock_rate=125e6,use_dpdk=1...
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [UHD] Device discovery error: RuntimeError: Error with EAL initialization
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [X300] X300 Network discovery error RuntimeError: Error with EAL initialization
Error: LookupError: KeyError: No devices found for ----->
Device Address:
    addr: 10.10.1.100
    second_addr: 10.10.2.100
    mgmt_addr: 10.10.0.100
    master_clock_rate: 125e6
    use_dpdk: 1

ad@bm-super11-intel:/usr/local/lib/uhd/examples$ sudo ./benchmark_rate --rx_rate 125e6 --rx_subdev "A:0 B:0" --rx_channels 0,1 --tx_rate 125e6 --tx_subdev "A:0 B:0" --tx_channels 0,1 --args "addr=10.10.1.100,second_addr=10.10.2.100,mgmt_addr=10.10.0.100,master_clock_rate=125e6,use_dpdk=0"

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; DPDK_23.11; UHD_4.6.0.HEAD-0-g50fa3baa
EAL: Detected CPU lcores: 64
EAL: Detected NUMA nodes: 1
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 4 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
[ERROR] [DPDK] No available DPDK devices (ports) found!
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [UHD] Device discovery error: RuntimeError: No available DPDK devices (ports) found!
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [X300] X300 Network discovery error RuntimeError: Error with EAL initialization
[00:00:00.000312] Creating the usrp device with: addr=10.10.1.100,second_addr=10.10.2.100,mgmt_addr=10.10.0.100,master_clock_rate=125e6,use_dpdk=0...
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [UHD] Device discovery error: RuntimeError: Error with EAL initialization
EAL: FATAL: already called initialization.
EAL: already called initialization.
[ERROR] [DPDK] Error with EAL initialization
[ERROR] [X300] X300 Network discovery error RuntimeError: Error with EAL initialization
Error: LookupError: KeyError: No devices found for ----->
Device Address:
    addr: 10.10.1.100
    second_addr: 10.10.2.100
    mgmt_addr: 10.10.0.100
    master_clock_rate: 125e6
    use_dpdk: 0

ad@bm-super11-intel:/usr/local/lib/uhd/examples$ 
joergho commented 1 month ago

Hi @houshangaziziaccelleran,

When using the UHD-4.6 branch, please cherry-pick 85e4b53a0d0715500a74db1f9b9cc234e5c6f4ef to fix the compile issue you are seeing. In the UHD-4.7 branch, the fix is already included.

However, for certain network cards, UHD 4.6 and 4.7 has an incompatibility with DPDK >= 22.11. In case you see the following error when initializing the device

[ERROR] [UHD] Device discovery error: vector::_M_range_check: __n (which is 4294967295) >= this->size() (which is 1)

then you additionally need to cherry-pick 8305d925176fed1fd7f375e3ae8d9de0b72b04d4. This fix was added to the master branch recently.

joergho commented 1 month ago

If you still have issues, please carefully check your configuration files, see https://uhd.readthedocs.io/en/latest/page_dpdk.html

For extended logging, I suggest the following:

mbr0wn commented 1 month ago

Closing this issue unless further bugs are found.