【问题标题】:DPDK MLX5 PMD driver probe issueDPDK MLX5 PMD 驱动程序探测问题
【发布时间】:2019-08-24 10:11:08
【问题描述】:

我无法将 mlx5 pmd 驱动程序与我在服务器上安装的一些 Mellanox NIC 一起使用。我在 EAL 初始化期间收到的错误是:

et_mlx5: 没有 Verbs 设备与 PCI 设备 0000:03:00.0 匹配,是否加载了内核驱动程序?

我目前使用的DPDK版本是:DPDK-STABLE-18.11

我已经安装了 OFED 最新版本:

mlnx-en-4.5-1.0.1.0-ubuntu16.04-x86_64

我已经执行了 ib_uverbs 内核模块的 modprobe

这是我正在使用的内核版本

moragalu@server:~$ uname -r
4.4.0-143-generic

以下是 NIC 型号:

moragalu@server:~$ lspci | grep Mell
03:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]
03:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]
06:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]
06:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]

网卡使用的固件版本:

moragalu@eridium03:~$ ethtool -i eridium25-03
driver: mlx5_core
version: 4.5-1.0.1
firmware-version: 14.24.1000 (MT_2420110034)
expansion-rom-version: 
bus-info: 0000:06:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

eal 初始化的完整输出是:

EAL: Detected 16 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 15b3:1015 net_mlx5
net_mlx5: no Verbs device matches PCI device 0000:03:00.0, are kernel drivers loaded?
EAL: Requested device 0000:03:00.0 cannot be used
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 15b3:1015 net_mlx5
net_mlx5: no Verbs device matches PCI device 0000:03:00.1, are kernel drivers loaded?
EAL: Requested device 0000:03:00.1 cannot be used
EAL: PCI device 0000:06:00.0 on NUMA socket 0
EAL:   probe driver: 15b3:1015 net_mlx5
net_mlx5: no Verbs device matches PCI device 0000:06:00.0, are kernel drivers loaded?
EAL: Requested device 0000:06:00.0 cannot be used
EAL: PCI device 0000:06:00.1 on NUMA socket 0
EAL:   probe driver: 15b3:1015 net_mlx5
net_mlx5: no Verbs device matches PCI device 0000:06:00.1, are kernel drivers loaded?
EAL: Requested device 0000:06:00.1 cannot be used
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 15b3:1015 net_mlx5
net_mlx5: no Verbs device matches PCI device 0000:03:00.1, are kernel drivers loaded?
EAL: Driver cannot attach the device (03:00.1)
EAL: Failed to attach device on primary process

内核中加载的当前模块:

moragalu@eridium03:~$ lsmod | grep ib
mlx5_ib                16384  0
mlx_compat             24576  4 mlx4_en,mlx5_ib,mlx4_core,mlx5_core
ib_uverbs              61440  0
ib_iser                49152  0
rdma_cm                49152  1 ib_iser
ib_cm                  49152  1 rdma_cm
ib_sa                  36864  2 rdma_cm,ib_cm
ib_mad                 49152  2 ib_cm,ib_sa
ib_core               106496  7 rdma_cm,ib_cm,ib_sa,iw_cm,ib_mad,ib_iser,ib_uverbs
ib_addr                20480  2 rdma_cm,ib_core

【问题讨论】:

    标签: networking linux-device-driver dpdk


    【解决方案1】:

    在将 RDMA 核心库用于 ibverbs 依赖项时,我遇到了同样的问题。过去我设法在 mlx5_core.c 中找到了一个错误(在探测函数中将队列数硬编码为 8 并且它神奇地起作用了),但我不确定这对你来说是同一个问题。

    不管怎样,当我安装最新的Mellanox OFED Drivers 后问题就消失了,所以尝试一下是个好主意。请记住使用以下命令安装它:

    mlnxofedinstall --dpdk --upstream-libs
    

    编辑:刚刚注意到您已经安装了驱动程序 - 请确保您按照上述方式进行了安装。你还可以做一件事:检查这个的输出(用-libverbs编译):

    #include <infiniband/verbs.h>
    #include <stdio.h>
    #include <errno.h>
    #include <string.h>
    int main() {
            struct ibv_device ** devices;
            int num;
            struct ibv_context * ctx;
            devices = ibv_get_device_list(&num);
            int i;
            if(devices[0] == NULL)
                    printf("devices is null\n");
            printf("got %d devices\n", num);
            for (i=0;i<num;i++) {
                    printf(ibv_get_device_name(devices[i]));
                    printf("\n");
                    ctx = ibv_open_device(devices[i]);
                    if (ctx == NULL)
                            printf("ctx is null \n");
                    else
                            printf("device opened\n");
            }
            if (errno)
                    printf("ERROR: %s\n", strerror(errno));
            ibv_free_device_list(devices);
    return 0;
    }
    

    如果它没有列出任何设备,至少您会知道这是动词驱动程序的问题,而不是 DPDK 本身的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-14
      • 1970-01-01
      • 1970-01-01
      • 2013-09-25
      • 2015-01-23
      • 1970-01-01
      • 1970-01-01
      • 2011-11-04
      相关资源
      最近更新 更多