How to install ofed sw for dpdk

Hi,

I want to step into the mellanox dpdk topic. I follow the steps from 21. MLX5 poll mode driver — Data Plane Development Kit 17.11.2 documentation 21. MLX5 poll mode driver — Data Plane Development Kit 17.11.10 documentation

So I downloaded the OFED software version 4.2-1.2.0.0 for ubuntu16.04-x86_64 (found here http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux ) and installed it with:

  • ./mlnxofedinstall --upstream-libs --dpdk

This allows me to compile DPDK successfully.

Then the link above tells me to use the command “ibv_devinfo” and also the command “mlxconfig”. But both are not installed.

What did I wrong ?

Thank you!

Hi,

The problem occurs when I build DPDK itself. Compilation of the mellanox DPDK Driver (drivers/net/mlx5) brings the error.

If I compile DPDK with

  • make LDFLAGS=-libverbs

The error is:

“ld: cannot find -libverbs”

Martin

Hi,

Can you try to build your application with LDFLAGS=-libverbs

Because I don’t know your testapp, I assume you built it with make once you configured it.

So try:

make LDFLAGS=-libverbs

BR

Marc

I also tried following steps

  1. ./mlnxofedinstall --dpdk --upstream-libs

  2. build dpdk + test app

  3. ./mlnxofedinstall --all

  4. start testapp

But got this error:

/build/app# ./testapp

./testapp: /usr/lib/libmlx5.so.1: no version information available (required by ./testapp)

./testapp /usr/lib/libmlx5.so.1: no version information available (required by ./testapp)

./testapp: /usr/lib/libmlx5.so.1: no version information available (required by ./testapp)

EAL: Detected 96 lcore(s)

EAL: Probing VFIO support…

EAL: PCI device 0000:d8:00.0 on NUMA socket 1

EAL: probe driver: 15b3:1019 net_mlx5

PMD: net_mlx5: PCI information matches, using device “mlx5_0” (SR-IOV: false)

PMD: net_mlx5: 1 port(s) detected

PMD: net_mlx5: MPS is disabled

PMD: net_mlx5: port 1 MAC address is 50:6b:4b:xy:00:11

./testapp: relocation error: ./testapp: symbol mlx5dv_set_context_attr, version MLX5_1.2 not defined in file libmlx5.so.1 with link time reference

Hi,

Can you check two things:

rpm -qa | grep rdma

and check that the rdma-core package is installed as --upstream-libs must do it.

/etc/init.d/openibd status

Check that the driver is started correctly.

I would suggest to install the driver w/o any option to see that it works correctly, because the options you used installs the minimum required to run dpdk.

Regards

Marc

Hi Marc,

If I do the installation with only “./mlnxofedinstall” (without any option) I can not compile DPDK:

== Build drivers/net/mlx5

CC mlx5.o

/root/dpdk-stable/drivers/net/mlx5/mlx5.c: In function ‘mlx5_pci_probe’:

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:796:21: error: ‘struct ibv_device_attr_ex’ has no member named ‘device_cap_flags_ex’

!!(device_attr_ex.device_cap_flags_ex &

^

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:797:7: error: ‘IBV_DEVICE_RAW_IP_CSUM’ undeclared (first use in this function)

IBV_DEVICE_RAW_IP_CSUM);

^

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:797:7: note: each undeclared identifier is reported only once for each function it appears in

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:816:18: error: ‘struct ibv_device_attr_ex’ has no member named ‘rss_caps’

device_attr_ex.rss_caps.max_rwq_indirection_table_size;

Hi,

Please check if rdma-core package is installed.

apt list --installed | grep rdma-core

If this package is not installed, installed it by

apt-get install rdma-core

Thanks

Marc

Hi,

Any progress ?

You can open a support case support@mellanox.com mailto:support@mellanox.com

Marc

Thank you for your reply.

After the command

  • ./mlnxofedinstall --all

I also installed:

→ same error as above

  • rdma-core (rdma-core_42mlnx2-1.42120_amd64.deb) from mlnx ofed 4.2 installation

→ same error as above

== Build drivers/net/mlx5

CC mlx5.o

/root/dpdk-stable/drivers/net/mlx5/mlx5.c: In function ‘mlx5_pci_probe’:

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:796:21: error: ‘struct ibv_device_attr_ex’ has no member named ‘device_cap_flags_ex’

!!(device_attr_ex.device_cap_flags_ex &

^

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:797:7: error: ‘IBV_DEVICE_RAW_IP_CSUM’ undeclared (first use in this function)

IBV_DEVICE_RAW_IP_CSUM);

^

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:797:7: note: each undeclared identifier is reported only once for each function it appears in

/root/dpdk-stable/drivers/net/mlx5/mlx5.c:816:18: error: ‘struct ibv_device_attr_ex’ has no member named ‘rss_caps’

device_attr_ex.rss_caps.max_rwq_indirection_table_size;

Hi,

I renew my invitation to open a case support@mellanox.com mailto:support@mellanox.com

The issue you see now is not related to the linker (-libverbs option) but to missing headers files.

BR

Marc