DPDK-L3FWD PROX Compilation Error :: mlx5_mr.c:39:30: fatal error: infiniband/verbs.h: No such file or directory


I am trying to compile DPDK PROX L3FWD application for the mlx4 driver and is running into following compilation issues. I have followed the steps from following link as reference.

http://www.mellanox.com/related-docs/prod_software/MLNX_DPDK_Quick_Start_Guide_v2.2_4.2.pdf http://www.mellanox.com/related-docs/prod_software/MLNX_DPDK_Quick_Start_Guide_v2.2_4.2.pdf

CC mlx5_ethdev.o

CC mlx5_mac.o

CC mlx5_rxq.o

CC mlx5_vlan.o

CC mlx5_rxmode.o

CC mlx5_mr.o

CC mlx5_rss.o

CC mlx5_fdir.o

CC mlx5_stats.o

/usr/src/dpdk/drivers/net/mlx5/mlx5_mr.c:39:30: fatal error: infiniband/verbs.h: No such file or directory

#include <infiniband/verbs.h>


compilation terminated.

make[6]: *** [mlx5_mr.o] Error 1

make[6]: *** Waiting for unfinished jobs…

/usr/src/dpdk/mk/internal/rte.compile-pre.mk:126: recipe for target ‘mlx5_mr.o’ failed

CC mlx4.o

I do have the following file and is accessible. There is no other verbs.h in the system.

root@root# ls /usr/include/infiniband/verbs.h


root@tbserver15:/usr# find . -name verbs.h



MLNX_OFED_LINUX-3.4- is installed in my system.

And firmware version is as below.

root@root:/usr# ibstat

CA ‘mlx4_0’

CA type: MT4103

Number of ports: 2

Firmware version: 2.37.7190

Hardware version: 0

I have extracted the DPDK package from www.mellanox.com/downloads/Drivers/MLNX_DPDK_2.2_4.2.tar.gz

I am using following Docker file to generate docker image.

FROM ubuntu:vivid

*RUN apt-get update && apt-get install -y --no-install-recommends *

*gcc build-essential make curl git liblua5.2-dev libedit-dev libpcap-dev libncurses5-dev libncursesw5-dev pkg-config vim *

&& apt-get clean && rm -rf /var/lib/apt/lists/*


*RTE_SDK=/usr/src/dpdk *

*RTE_TARGET=x86_64-native-linuxapp-gcc *

*PROX_COMMIT=a52953c4a92ecfcfdd06fc01fce42b57f998cb10 *


*RUN curl -sSL www.mellanox.com/downloads/Drivers/MLNX_DPDK_2.2_4.2.tar.gz | tar -xz; *

mv MLNX_DPDK_2.2_4.2 ${RTE_SDK}

# don’t build kernel modules

*RUN sed -i s/CONFIG_RTE_EAL_IGB_UIO=y/CONFIG_RTE_EAL_IGB_UIO=n/ ${RTE_SDK}/config/common_linuxapp *

*&& sed -i s/CONFIG_RTE_LIBRTE_KNI=y/CONFIG_RTE_LIBRTE_KNI=n/ ${RTE_SDK}/config/common_linuxapp *

*&& sed -i s/CONFIG_RTE_LIBRTE_MLX4_PMD=n/CONFIG_RTE_LIBRTE_MLX4_PMD=y/ ${RTE_SDK}/config/common_linuxapp *

&& sed -i s/CONFIG_RTE_KNI_KMOD=y/CONFIG_RTE_KNI_KMOD=n/ ${RTE_SDK}/config/common_linuxapp

# don’t build unnecessary stuff

*RUN sed -i s/CONFIG_RTE_APP_TEST=y/CONFIG_RTE_APP_TEST=n/ ${RTE_SDK}/config/common_linuxapp *

&& sed -i s/CONFIG_RTE_TEST_PMD=y/CONFIG_RTE_TEST_PMD=n/ ${RTE_SDK}/config/common_linuxapp

*RUN cd ${RTE_SDK} *

&& make install T=${RTE_TARGET} DESTDIR=install -j

RUN git config --global http.sslVerify false

# clone PROX from the repository

_RUN git clone http://github.com/nvf-crucio/PROX.git http://github.com/nvf-crucio/PROX.git _

*&& cd PROX *

*&& git checkout ${PROX_COMMIT} *

*&& cd … *

&& mv PROX ${PROX_DIR}

# build PROX

*RUN cd ${PROX_DIR} *

&& make


Can some one let me know how to proceed further?

Hi Praveen,

If you are trying to compile it for the mlx4 driver, meaning for connectX-3 cards, you do not need the mlx5 packages.

You should set to No all the mlx5 parameters before starting the compilation.



Hi Praveen,

If you’ll still encounter any issue even after removing the mlx5 parameters, I suggest to open a new case to Mellanox support.

You can open a new support ticket by sending an email to support@mellanox.com mailto:support@mellanox.com



Hi Viki,

Thanks for the support.

With the changes suggested by you, I have disabled the mlx5 pmd in the config file and tried to compile the code, but encountered many errors. Please find below a snippet of the same.

I have changed the value of CONFIG_RTE_LIBRTE_MLX5_PMD=n in config/common_linuxapp to ensure that the MLX5 package is not taken while compiling.

Can you please guide me to proceed further?


/usr/src/dpdk/drivers/net/mlx4/mlx4.c:3749:33: error: unused variable ‘status’ [-Werror=unused-variable]

enum ibv_exp_query_intf_status status;


/usr/src/dpdk/drivers/net/mlx4/mlx4.c:3748:4: error: variable ‘attr’ set but not used [-Werror=unused-but-set-variable]

} attr;


/usr/src/dpdk/drivers/net/mlx4/mlx4.c:3743:25: error: unused variable ‘mod’ [-Werror=unused-variable]

struct ibv_exp_qp_attr mod;


/usr/src/dpdk/drivers/net/mlx4/mlx4.c:3734:29: error: unused parameter ‘inactive’ [-Werror=unused-parameter]

unsigned int socket, int inactive, const struct rte_eth_rxconf *conf,


/usr/src/dpdk/drivers/net/mlx4/mlx4.c: In function ‘rxq_setup_qp’:

/usr/src/dpdk/drivers/net/mlx4/mlx4.c:3438:1: error: control reaches end of non-void function [-Werror=return-type]



cc1: all warnings being treated as errors

/usr/src/dpdk/mk/internal/rte.compile-pre.mk:126: recipe for target ‘mlx4.o’ failed

make[6]: *** [mlx4.o] Error 1

/usr/src/dpdk/mk/rte.subdir.mk:61: recipe for target ‘mlx4’ failed

make[5]: *** [mlx4] Error 2

/usr/src/dpdk/mk/rte.subdir.mk:61: recipe for target ‘net’ failed

make[4]: *** [net] Error 2

/usr/src/dpdk/mk/rte.sdkbuild.mk:77: recipe for target ‘drivers’ failed

make[3]: *** [drivers] Error 2

/usr/src/dpdk/mk/rte.sdkroot.mk:123: recipe for target ‘all’ failed

make[2]: *** [all] Error 2

/usr/src/dpdk/mk/rte.sdkinstall.mk:84: recipe for target ‘pre_install’ failed

make[1]: *** [pre_install] Error 2

/usr/src/dpdk/mk/rte.sdkroot.mk:98: recipe for target ‘install’ failed