首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DPDK MLX5 PMD驱动程序探测问题

DPDK MLX5 PMD驱动程序探测问题
EN

Stack Overflow用户
提问于 2019-04-03 09:22:09
回答 1查看 2.5K关注 0票数 2

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

et_mlx5:没有谓词设备与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

下面是我使用的内核版本

代码语言:javascript
复制
moragalu@server:~$ uname -r
4.4.0-143-generic

以下是NIC型号:

代码语言:javascript
复制
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]

NIC正在使用的固件版本:

代码语言:javascript
复制
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初始化的完整输出为:

代码语言:javascript
复制
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

当前在内核中加载的模块:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2019-04-03 15:28:03

在对ibverbs依赖项使用RDMA-core库时,我也遇到了同样的问题。在过去,我设法在mlx5_core.c中找到了一个bug (在探测函数中将队列数硬编码为8,它神奇地工作了),但我不确定这对您来说是否也是同样的问题。

不管怎样,当我安装了最新的Mellanox OFED Drivers后,这个问题就解决了,所以尝试一下是个好主意。只需记住使用以下命令进行安装:

代码语言:javascript
复制
mlnxofedinstall --dpdk --upstream-libs

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

代码语言:javascript
复制
#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本身的问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55485698

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档