[dpdk-users] Compilation problems in Ubuntu 16.04 with MLX5 options

Andrés Pozo Muñoz andres.pozom at gmail.com
Wed Apr 18 20:15:28 CEST 2018


Hi all,

I'm trying to build DPDK (tried with 17.11 and 18.02) on Ubuntu 16.04,
with MLX5 support and I'm getting some compilation errors.

The sequence of commands I follow:

root at olnmalp026Bn001:/usr/src# uname -a
Linux olnmalp026Bn001 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18
12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root at olnmalp026Bn001:/usr/src# wget
http://dpdk.org/browse/dpdk/snapshot/dpdk-18.02-rc4.tar.gz
--2018-04-18 20:04:17--
http://dpdk.org/browse/dpdk/snapshot/dpdk-18.02-rc4.tar.gz
Resolving dpdk.org (dpdk.org)... 92.243.14.124
Connecting to dpdk.org (dpdk.org)|92.243.14.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘dpdk-18.02-rc4.tar.gz’

dpdk-18.02-rc4.tar.gz                           [              <=>

]  12.45M  4.20MB/s    in 3.0s

2018-04-18 20:04:20 (4.20 MB/s) - ‘dpdk-18.02-rc4.tar.gz’ saved [13059456]

root at olnmalp026Bn001:/usr/src# tar xvfz dpdk-18.02-rc4.tar.gz
....

root at olnmalp026Bn001:/usr/src# export DPDK_DIR=/usr/src/dpdk-18.02-rc4
root at olnmalp026Bn001:/usr/src# cd $DPDK_DIR
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# export
DPDK_TARGET=x86_64-native-linuxapp-gcc
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# export
DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# sed -i
's/\(CONFIG_RTE_LIBRTE_MLX5_PMD=\)n/\1y/g'
$DPDK_DIR/config/common_base
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# sed -i
's/\(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS=\)n/\1y/g'
$DPDK_DIR/config/common_base
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# grep MLX5
$DPDK_DIR/config/common_base
# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD
CONFIG_RTE_LIBRTE_MLX5_PMD=y
CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS=y
CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8
root at olnmalp026Bn001:/usr/src/dpdk-18.02-rc4# make -j install
T=$DPDK_TARGET DESTDIR=install
Configuration done using x86_64-native-linuxapp-gcc
== Build lib
== Build lib/librte_compat
== Build lib/librte_eal
== Build lib/librte_cfgfile
== Build lib/librte_eal/common
  SYMLINK-FILE include/rte_compat.h
In file included from /usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:42:0:
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:64:11: warning:
‘struct ibv_rwq_ind_table_init_attr’ declared inside parameter list
    struct ibv_rwq_ind_table_init_attr *init_attr);
           ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:64:11: warning:
its scope is only this definition or declaration, which is probably
not what you want
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:67:16: warning:
‘struct ibv_wq_init_attr’ declared inside parameter list
         struct ibv_wq_init_attr *wq_init_attr);
                ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:69:45: warning:
‘struct ibv_wq_attr’ declared inside parameter list
  int (*modify_wq)(struct ibv_wq *wq, struct ibv_wq_attr *wq_attr);
                                             ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:98:39: warning:
‘struct ibv_cq_ex’ declared inside parameter list
  struct ibv_cq *(*cq_ex_to_cq)(struct ibv_cq_ex *cq);
                                       ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:102:11: warning:
‘struct mlx5dv_cq_init_attr’ declared inside parameter list
    struct mlx5dv_cq_init_attr *mlx5_cq_attr);
           ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:102:11: warning:
‘struct ibv_cq_init_attr_ex’ declared inside parameter list
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5_glue.h:107:8: warning:
‘enum mlx5dv_set_ctx_attr_type’ declared inside parameter list
        void *attr);
        ^
  AR librte_pmd_ring.a
  LD rte_eth_vhost.o
  LD cxgbe_ethdev.o
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c: In function ‘mlx5_pci_probe’:
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:836:37: error: ‘struct
ibv_device_attr_ex’ has no member named ‘device_cap_flags_ex’
   config.hw_csum = !!(device_attr_ex.device_cap_flags_ex &
                                     ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:837:9: error:
‘IBV_DEVICE_RAW_IP_CSUM’ undeclared (first use in this function)
         IBV_DEVICE_RAW_IP_CSUM);
         ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:837:9: note: each
undeclared identifier is reported only once for each function it
appears in
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:857:18: error: ‘struct
ibv_device_attr_ex’ has no member named ‘rss_caps’
    device_attr_ex.rss_caps.max_rwq_indirection_table_size;
                  ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:865:43: error: ‘struct
ibv_device_attr_ex’ has no member named ‘raw_packet_caps’
   config.hw_vlan_strip = !!(device_attr_ex.raw_packet_caps &
                                           ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:866:7: error:
‘IBV_RAW_PACKET_CAP_CVLAN_STRIPPING’ undeclared (first use in this
function)
       IBV_RAW_PACKET_CAP_CVLAN_STRIPPING);
       ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:870:42: error: ‘struct
ibv_device_attr_ex’ has no member named ‘raw_packet_caps’
   config.hw_fcs_strip = !!(device_attr_ex.raw_packet_caps &
                                          ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:871:7: error:
‘IBV_RAW_PACKET_CAP_SCATTER_FCS’ undeclared (first use in this
function)
       IBV_RAW_PACKET_CAP_SCATTER_FCS);
       ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:883:32: error: ‘struct
ibv_device_attr_ex’ has no member named ‘tso_caps’
   config.tso = ((device_attr_ex.tso_caps.max_tso > 0) &&
                                ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:884:25: error: ‘struct
ibv_device_attr_ex’ has no member named ‘tso_caps’
          (device_attr_ex.tso_caps.supported_qpts &
                         ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:888:20: error: ‘struct
ibv_device_attr_ex’ has no member named ‘tso_caps’
      device_attr_ex.tso_caps.max_tso;
                    ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:956:10: error:
variable ‘alctr’ has initializer but incomplete type
   struct mlx5dv_ctx_allocators alctr = {
          ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:957:4: error: unknown
field ‘alloc’ specified in initializer
    .alloc = &mlx5_alloc_verbs_buf,
    ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:957:13: warning:
excess elements in struct initializer
    .alloc = &mlx5_alloc_verbs_buf,
             ^
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:957:13: note: (near
initialization for ‘alctr’)
/usr/src/dpdk-18.02-rc4/drivers/net/mlx5/mlx5.c:958:4: error: unknown
field ‘free’ specified in initializer
    .free = &mlx5_free_verbs_buf,



Complete log here -> https://pastebin.com/5gSuV3PV

Is there any problem with those DPDK versions in Ubuntu 16.04?
Has anyone experienced similar problems?


Thank you very much in advance!
Regards,
Andrés


More information about the users mailing list