ANLAB-KAIST / rust-dpdk

BSD 3-Clause "New" or "Revised" License
81 stars 14 forks source link

DPDK initialization failure #72

Open marinosi opened 6 months ago

marinosi commented 6 months ago

Hi,

Using the latest commit 77788ed603671a8e50fb7a84512f24a530d0b93d DPDK fails to be initialize the appropriate driver (mlx5_net):

EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 0
EAL: request: mp_malloc_sync
EAL: Heap on socket 0 was expanded by 2MB
EAL: PCI device da7a:00:02.0 on NUMA socket 0
EAL:   probe driver: 15b3:1016 mlx5_pci
EAL: Probe PCI driver: mlx5_pci (15b3:1016) device: da7a:00:02.0 (socket 0)
EAL: Mem event callback 'MLX5_MEM_EVENT_CB:(nil)' registered
mlx5_net: No available register for sampler.
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 0
EAL: Calling mem event callback 'MLX5_MEM_EVENT_CB:(nil)'
EAL: request: mp_malloc_sync
EAL: Heap on socket 0 was expanded by 4MB
EAL: memzone_reserve_aligned_thread_unsafe(): memzone <mlx5_pmd_shared_data> already exists
mlx5_net: Cannot allocate mlx5 shared data
mlx5_net: Unable to init PMD global data: File exists
mlx5_common: Failed to load driver mlx5_eth
EAL: Calling mem event callback 'MLX5_MEM_EVENT_CB:(nil)'

It looks like it tries to create a memzone with the same name twice and it fails on the second time. When using dpdk-testpmd from the same DPDK installation (v22.11) the driver works and initialization completes. Same arguments are being used for rte_eal_init. I am running this code on an Azure F8sv2 VM, Ubuntu 22.04 and Mellanox CX4 NIC.

Have you seen such behavior before?

leeopop commented 3 months ago

I think this behavior is not related to this wrapper library. You might have missed some prerequisite of the mlx5 driver (https://doc.dpdk.org/guides/nics/mlx5.html). Some of DPDK PMDs have additional requirements along with the common requirements of DPDK.