Hi Sirshak,

Can you please take a look at this thread:
https://lists.fd.io/g/vpp-dev/message/8219

Also, take a look at http://dpdk.org/doc/guides/nics/mlx5.html for detailed
explanations and steps for DPDK to work with Mellanox NICs...

Likely, it's a kernel issue: for Mellanox latest PMD drivers (DPDK 17.11 and
above) you're required to have 4.15.x whilst I see you're running 4.10.x

Hope this helps.


Cheers,
Marco

On Thu, 2018-03-01 at 18:02 -0600, Sirshak Das wrote:
> Hi all,
> 
> I am facing an issue with building VPP with DPDK (Mellanox Drivers
> enabled) on aarch64.
> 
> The OFED version installed:
> $ ofed_info -s
> MLNX_OFED_LINUX-4.2-1.2.0.0:
> 
> Kernel Version:
> $ uname -r
> 4.10.0-28-generic
> 
> Operating System Version:
> Ubuntu 16.04.4 LTS (GNU/Linux 4.10.0-28-generic aarch64)
> 
> gcc version:
> gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
> 
> Target Machine:
> Qualcomm Centriq
> 
> lspci:
> 0004:01:00.0 Ethernet controller: Mellanox Technologies MT27700 Family
> [ConnectX-4]
> 
> Steps I followed:
> 
> $ git clone ssh://<my-user-id>@gerrit.fd.io:29418/vpp.git
> $ cd vpp/
> $ sed -i '/vpp_uses_dpdk_mlx5_pmd/s/^# //g' build-data/platforms/vpp.mk
> $ make dpdk-install-dev DPDK_MLX5_PMD=y
> 
> <INSTALL DIR>/vpp/dpdk/deb/_build/dpdk-
> 18.02/drivers/net/mlx5/mlx5_flow.c:38:8: error: redefinition of ‘struct
> ibv_flow_spec_counter_action’
>  struct ibv_flow_spec_counter_action {
>         ^
> In file included from <INSTALL DIR>/vpp/dpdk/deb/_build/dpdk-
> 18.02/drivers/net/mlx5/mlx5_flow.c:14:0:
> /usr/include/infiniband/verbs.h:1360:8: note: originally defined here
>  struct ibv_flow_spec_counter_action {
> 
> 
> By looking at this file:
> <INSTALL
> DIR>/vpp/dpdk/deb/_build/dpdk-18.02/arm64-armv8a-linuxapp-
> gcc/build/drivers/net/mlx5/mlx5_autoconf.h
> 
> Which looks like this:
> 
> /* HAVE_IBV_DEVICE_VXLAN_SUPPORT is not defined.
> */
>                                                                               
>     
>                                                                               
>                                                                               
>
> /* HAVE_IBV_WQ_FLAG_RX_END_PADDING is not defined.
> */
>                                                                               
>   
>                                                                               
>                                                                               
>
> /* HAVE_IBV_MLX5_MOD_MPW is not defined.
> */
>                                                                               
>             
>                                                                               
>                                                                               
>
> /* HAVE_IBV_MLX5_MOD_CQE_128B_COMP is not defined.
> */
>                                                                               
>   
>                                                                               
>                                                                               
>
> /* HAVE_ETHTOOL_LINK_MODE_25G is not defined. */
> 
> /* HAVE_ETHTOOL_LINK_MODE_50G is not defined.
> */
>                                                                               
>
>                                                                               
>                                                                               
>
> /* HAVE_ETHTOOL_LINK_MODE_100G is not defined.
> */
>                                                                               
>       
>                                                                               
>                                                                               
>
> /* HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT is not defined. */ 
> 
> So I moved my attentions to this file:
> <INSTALL DIR>/vpp/dpdk/deb/_build/dpdk-18.02/drivers/net/mlx5/Makefile
> This whole section fails:
> mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-
> h.sh
>                                                                         
>         $Q $(RM) -f --
> '$@'
>                                                                               
>
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_IBV_DEVICE_VXLAN_SUPPORT
> \                                                                             
>                                                                               
>       
>                 infiniband/verbs.h
> \                                                                             
>                                                                               
>
>                 enum IBV_DEVICE_VXLAN_SUPPORT
> \                                                                             
>                                                                               
>       
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_IBV_WQ_FLAG_RX_END_PADDING
> \                                                                             
>                                                                               
>     
>                 infiniband/verbs.h
> \                                                                             
>                                                                               
>
>                 enum IBV_WQ_FLAG_RX_END_PADDING
> \                                                                             
>                                                                               
>     
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_IBV_MLX5_MOD_MPW
> \                                                                             
>                                                                               
>               
>                 infiniband/mlx5dv.h
> \                                                                             
>                                                                               
>                 
>                 enum MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED
> \                                                                             
>                                                                             
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_IBV_MLX5_MOD_CQE_128B_COMP
> \                                                                             
>                                                                               
>     
>                 infiniband/mlx5dv.h
> \                                                                             
>                                                                               
>                 
>                 enum MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP
> \                                                                             
>                                                                           
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_ETHTOOL_LINK_MODE_25G
> \                                                                             
>                                                                               
>
>                 /usr/include/linux/ethtool.h
> \                                                                             
>                                                                               
>
>                 enum ETHTOOL_LINK_MODE_25000baseCR_Full_BIT
> \                                                                             
>                                                                       
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_ETHTOOL_LINK_MODE_50G
> \                                                                             
>                                                                               
>
>                 /usr/include/linux/ethtool.h
> \                                                                             
>                                                                               
>
>                 enum ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT
> \                                                                             
>
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_ETHTOOL_LINK_MODE_100G
> \                                                                             
>                                                                               
>         
>                 /usr/include/linux/ethtool.h
> \                                                                             
>                                                                               
>
>                 enum ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT
> \                                                                             
>                                                                     
>                 $(AUTOCONF_OUTPUT)
>                                                                               
>                                                     
>         $Q sh -- '$<' '$@'
> \                                                                             
>                                                                               
>
>                 HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
> \                                                                             
>                                                                         
>                 infiniband/verbs.h
> \                                                                             
>                                                                               
>
>                 enum IBV_FLOW_SPEC_ACTION_COUNT
> \                                                                             
>                                                                               
>     
>                 $(AUTOCONF_OUTPUT)
> 
> Which ideally shouldnt because all these files exist:
> 
> $ ls -l /usr/include/infiniband/
> total 156
> -rw-r--r-- 1 root root  1939 Nov 25 12:17 arch.h
> -rw-r--r-- 1 root root  2897 Nov 25 12:17 ib.h
> -rw-r--r-- 1 root root 27353 Nov 25 12:17 kern-abi.h
> -rw-r--r-- 1 root root 12895 Nov 25 12:17 mlx4dv.h
> -rw-r--r-- 1 root root 17121 Nov 25 12:17 mlx5dv.h
> -rw-r--r-- 1 root root  5694 Nov 25 12:17 opcode.h
> -rw-r--r-- 1 root root  4074 Nov 25 12:17 sa.h
> -rw-r--r-- 1 root root  1622 Nov 25 12:17 sa-kern-abi.h
> -rw-r--r-- 1 root root 67777 Nov 25 12:17 verbs.h
> 
> $ ls -l /usr/include/linux/ethtool.h 
> -rw-r--r-- 1 root root 65636 Feb 12 17:44 /usr/include/linux/ethtool.h
> 
> 
> Finally what is strange is if I copy dpdk-18.02.tar.gz to seperate
> location and turn MLx5 config and build this builds fine.
> 
> Build drivers/net/mlx5
>   CC mlx5.o
>   PMDINFO mlx5.o.pmd.c
>   CC mlx5.o.pmd.o
>   LD mlx5.o
>   CC mlx5_glue.o
>   CC mlx5_rxq.o
>   CC mlx5_txq.o
>   CC mlx5_rxtx.o
>   CC mlx5_rxtx_vec.o
>   CC mlx5_trigger.o
>   CC mlx5_ethdev.o
>   CC mlx5_mac.o
>   CC mlx5_rxmode.o
>   CC mlx5_vlan.o
>   CC mlx5_stats.o
>   CC mlx5_rss.o
>   CC mlx5_mr.o
>   CC mlx5_flow.o
>   CC mlx5_socket.o
>   AR librte_pmd_mlx5.a
>   INSTALL-LIB librte_pmd_mlx5.a
> 
> I feel I am missing some trivial step in vpp build process please help
> me out I am new to vpp. Let me know if you need any more infor to debug
> this issue.
> 
> Thank you
> Sirshak Das
> 
> 
> 
-- 
Marco V

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

-=-=-=-=-=-=-=-=-=-=-=-
Links:

You receive all messages sent to this group.

View/Reply Online (#8387): https://lists.fd.io/g/vpp-dev/message/8387
View All Messages In Topic (2): https://lists.fd.io/g/vpp-dev/topic/13284116
Mute This Topic: https://lists.fd.io/mt/13284116/21656
New Topic: https://lists.fd.io/g/vpp-dev/post

Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656
Group Home: https://lists.fd.io/g/vpp-dev
Contact Group Owner: vpp-dev+ow...@lists.fd.io
Terms of Service: https://lists.fd.io/static/tos
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to