DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] ConnectX4 100GbE - Compilation problem
@ 2016-08-18 15:41 george.dit
  2016-08-18 16:05 ` Adrien Mazarguil
  0 siblings, 1 reply; 8+ messages in thread
From: george.dit @ 2016-08-18 15:41 UTC (permalink / raw)
  To: dev

Hi,

I have a single port Mellanox ConnectX 4 100GbE NIC and I want to test its
Rx/Tx capabilites  using DPDK.
My system runs a Linux kernel 4.4 compiled from sources.

I found the PMD driver for this NIC as provided by Mellanox here
<http://www.mellanox.com/page/products_dyn?product_family=209&mtag=pmd_for_dpdk>
.
Following this
<http://www.mellanox.com/related-docs/prod_software/MLNX_DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
guideline, I put my NIC in Ethernet mode, configured the 3 options
regarding mlx5 in the config/common_linuxapp file and applied 'make install
T=x86_64-native-linuxapp-gcc'.

Then, I stumbled upon a compilation problem in the mlx4 module.
The compiler's output is as follows:

== Build drivers/net/mlx4
  CC mlx4.o
In file included from /usr/include/linux/if.h:31:0,
                 from /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:57:
/usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared here
(not in a function)
  char master[IFNAMSIZ]; /* Name of master FRAD device */
              ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: ‘struct
ifreq’ declared inside parameter list [-Werror]
 priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
                                                     ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its scope is
only this definition or declaration, which is probably not what you want
[-Werror]
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘priv_ifreq’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error: dereferencing
pointer to incomplete type ‘struct ifreq’
  if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
                                ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘rxq_setup’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error: unused
parameter ‘inactive’ [-Werror=unused-parameter]
    unsigned int socket, int inactive, const struct rte_eth_rxconf *conf,
                             ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
‘mlx4_link_update_unlocked’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: storage size
of ‘ifr’ isn’t known
  struct ifreq ifr;
               ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
undeclared (first use in this function)
  dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
                                           ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
undeclared identifier is reported only once for each function it appears in
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
‘IFF_RUNNING’ undeclared (first use in this function)
     (ifr.ifr_flags & IFF_RUNNING));
                      ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: unused
variable ‘ifr’ [-Werror=unused-variable]
  struct ifreq ifr;
               ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
‘mlx4_dev_get_flow_ctrl’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: storage size
of ‘ifr’ isn’t known
  struct ifreq ifr;
               ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: unused
variable ‘ifr’ [-Werror=unused-variable]
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
‘mlx4_dev_set_flow_ctrl’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: storage size
of ‘ifr’ isn’t known
  struct ifreq ifr;
               ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: unused
variable ‘ifr’ [-Werror=unused-variable]
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘priv_get_mac’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: storage size
of ‘request’ isn’t known
  struct ifreq request;
               ^
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: unused
variable ‘request’ [-Werror=unused-variable]
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
‘mlx4_pci_devinit’:
/opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
undeclared (first use in this function)
   priv_set_flags(priv, ~IFF_UP, IFF_UP);
                         ^
cc1: all warnings being treated as errors
/opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe for
target 'mlx4.o' failed

Iwould appreciate any suggestions and guidance.

Best regards,
Georgios Katsikas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-08-18 15:41 [dpdk-dev] ConnectX4 100GbE - Compilation problem george.dit
@ 2016-08-18 16:05 ` Adrien Mazarguil
  2016-08-18 17:35   ` george.dit
  0 siblings, 1 reply; 8+ messages in thread
From: Adrien Mazarguil @ 2016-08-18 16:05 UTC (permalink / raw)
  To: george.dit; +Cc: dev

Hi George,

On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
> Hi,
> 
> I have a single port Mellanox ConnectX 4 100GbE NIC and I want to test its
> Rx/Tx capabilites  using DPDK.
> My system runs a Linux kernel 4.4 compiled from sources.
> 
> I found the PMD driver for this NIC as provided by Mellanox here
> <http://www.mellanox.com/page/products_dyn?product_family=209&mtag=pmd_for_dpdk>
> .
> Following this
> <http://www.mellanox.com/related-docs/prod_software/MLNX_DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
> guideline, I put my NIC in Ethernet mode, configured the 3 options
> regarding mlx5 in the config/common_linuxapp file and applied 'make install
> T=x86_64-native-linuxapp-gcc'.

Please note this is a third party package maintained by Mellanox, therefore
this mailing list is not the right place to discuss related errors, unless
they can be reproduced with a version downloaded from dpdk.org.

> Then, I stumbled upon a compilation problem in the mlx4 module.
> The compiler's output is as follows:
> 
> == Build drivers/net/mlx4
>   CC mlx4.o
> In file included from /usr/include/linux/if.h:31:0,
>                  from /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:57:
> /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared here
> (not in a function)
>   char master[IFNAMSIZ]; /* Name of master FRAD device */
>               ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: ‘struct
> ifreq’ declared inside parameter list [-Werror]
>  priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
>                                                      ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its scope is
> only this definition or declaration, which is probably not what you want
> [-Werror]
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘priv_ifreq’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error: dereferencing
> pointer to incomplete type ‘struct ifreq’
>   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
>                                 ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘rxq_setup’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error: unused
> parameter ‘inactive’ [-Werror=unused-parameter]
>     unsigned int socket, int inactive, const struct rte_eth_rxconf *conf,
>                              ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘mlx4_link_update_unlocked’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: storage size
> of ‘ifr’ isn’t known
>   struct ifreq ifr;
>                ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
> undeclared (first use in this function)
>   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
>                                            ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
> undeclared identifier is reported only once for each function it appears in
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
> ‘IFF_RUNNING’ undeclared (first use in this function)
>      (ifr.ifr_flags & IFF_RUNNING));
>                       ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: unused
> variable ‘ifr’ [-Werror=unused-variable]
>   struct ifreq ifr;
>                ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘mlx4_dev_get_flow_ctrl’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: storage size
> of ‘ifr’ isn’t known
>   struct ifreq ifr;
>                ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: unused
> variable ‘ifr’ [-Werror=unused-variable]
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘mlx4_dev_set_flow_ctrl’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: storage size
> of ‘ifr’ isn’t known
>   struct ifreq ifr;
>                ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: unused
> variable ‘ifr’ [-Werror=unused-variable]
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘priv_get_mac’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: storage size
> of ‘request’ isn’t known
>   struct ifreq request;
>                ^
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: unused
> variable ‘request’ [-Werror=unused-variable]
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘mlx4_pci_devinit’:
> /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
> undeclared (first use in this function)
>    priv_set_flags(priv, ~IFF_UP, IFF_UP);
>                          ^
> cc1: all warnings being treated as errors
> /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe for
> target 'mlx4.o' failed
> 
> Iwould appreciate any suggestions and guidance.

Well fortunately these errors are also present in v2.2.0 and should have
been addressed since v16.07 by the following commit:

 http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a693b3fece68a93ae4369

You can either upgrade to v16.07, back-port this commit yourself or wait for
an update from Mellanox.

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-08-18 16:05 ` Adrien Mazarguil
@ 2016-08-18 17:35   ` george.dit
  2016-12-16 14:45     ` george.dit
  0 siblings, 1 reply; 8+ messages in thread
From: george.dit @ 2016-08-18 17:35 UTC (permalink / raw)
  To: Georgios Katsikas, dev

Hi Adrien,

Thanks for the prompt reply!
You are right, I didn't go via the DPDK route, in the hope that Mellanox
will provide the exact source and configuration.
DPDK 16.07 from dpdk.org works like a charm and my NIC is in PMD mode,
thanks a lot for your guidance!

Best regards,
Georgios

On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil <
adrien.mazarguil@6wind.com> wrote:

> Hi George,
>
> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
> > Hi,
> >
> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to test
> its
> > Rx/Tx capabilites  using DPDK.
> > My system runs a Linux kernel 4.4 compiled from sources.
> >
> > I found the PMD driver for this NIC as provided by Mellanox here
> > <http://www.mellanox.com/page/products_dyn?product_family=
> 209&mtag=pmd_for_dpdk>
> > .
> > Following this
> > <http://www.mellanox.com/related-docs/prod_software/
> MLNX_DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
> > guideline, I put my NIC in Ethernet mode, configured the 3 options
> > regarding mlx5 in the config/common_linuxapp file and applied 'make
> install
> > T=x86_64-native-linuxapp-gcc'.
>
> Please note this is a third party package maintained by Mellanox, therefore
> this mailing list is not the right place to discuss related errors, unless
> they can be reproduced with a version downloaded from dpdk.org.
>
> > Then, I stumbled upon a compilation problem in the mlx4 module.
> > The compiler's output is as follows:
> >
> > == Build drivers/net/mlx4
> >   CC mlx4.o
> > In file included from /usr/include/linux/if.h:31:0,
> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:57:
> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared here
> > (not in a function)
> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
> >               ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: ‘struct
> > ifreq’ declared inside parameter list [-Werror]
> >  priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
> >                                                      ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its scope
> is
> > only this definition or declaration, which is probably not what you want
> > [-Werror]
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘priv_ifreq’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
> dereferencing
> > pointer to incomplete type ‘struct ifreq’
> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
> >                                 ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function ‘rxq_setup’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error: unused
> > parameter ‘inactive’ [-Werror=unused-parameter]
> >     unsigned int socket, int inactive, const struct rte_eth_rxconf *conf,
> >                              ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> > ‘mlx4_link_update_unlocked’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: storage
> size
> > of ‘ifr’ isn’t known
> >   struct ifreq ifr;
> >                ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
> > undeclared (first use in this function)
> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
> >                                            ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
> > undeclared identifier is reported only once for each function it appears
> in
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
> > ‘IFF_RUNNING’ undeclared (first use in this function)
> >      (ifr.ifr_flags & IFF_RUNNING));
> >                       ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: unused
> > variable ‘ifr’ [-Werror=unused-variable]
> >   struct ifreq ifr;
> >                ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> > ‘mlx4_dev_get_flow_ctrl’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: storage
> size
> > of ‘ifr’ isn’t known
> >   struct ifreq ifr;
> >                ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: unused
> > variable ‘ifr’ [-Werror=unused-variable]
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> > ‘mlx4_dev_set_flow_ctrl’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: storage
> size
> > of ‘ifr’ isn’t known
> >   struct ifreq ifr;
> >                ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: unused
> > variable ‘ifr’ [-Werror=unused-variable]
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> ‘priv_get_mac’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: storage
> size
> > of ‘request’ isn’t known
> >   struct ifreq request;
> >                ^
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: unused
> > variable ‘request’ [-Werror=unused-variable]
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> > ‘mlx4_pci_devinit’:
> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
> > undeclared (first use in this function)
> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
> >                          ^
> > cc1: all warnings being treated as errors
> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe for
> > target 'mlx4.o' failed
> >
> > Iwould appreciate any suggestions and guidance.
>
> Well fortunately these errors are also present in v2.2.0 and should have
> been addressed since v16.07 by the following commit:
>
>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a693b3fece6
> 8a93ae4369
>
> You can either upgrade to v16.07, back-port this commit yourself or wait
> for
> an update from Mellanox.
>
> --
> Adrien Mazarguil
> 6WIND
>



-- 
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
   *Web Site:*  http://www.di.uoa.gr/~katsikas/
<http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-08-18 17:35   ` george.dit
@ 2016-12-16 14:45     ` george.dit
  2016-12-17 21:26       ` Olga Shern
  0 siblings, 1 reply; 8+ messages in thread
From: george.dit @ 2016-12-16 14:45 UTC (permalink / raw)
  To: Georgios Katsikas, dev

Hi all,

I am coming back to you regarding the Mellanox Connectx4 100Gbps DPDK
driver.
We exchanged some e-mails last summer and I managed to compile the
DPDK-based Mellanox driver using DPDK 16.07 on top of Ubuntu server
16.04.01.

A few days ago, I installed a fresh Ubuntu server 16.04.1 on my machine and
attempted to re-install DPDK.
This time, DPDK does not compile because of the following error:
\== Build drivers/net/mlx5
  CC mlx5.o
In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:67:0,
                 from /opt/dpdk/drivers/net/mlx5/mlx5.c:66:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.h:46:32: fatal error:
infiniband/mlx5_hw.h: No such file or directory
compilation terminated.
/opt/dpdk/mk/internal/rte.compile-pre.mk:138: recipe for target 'mlx5.o'
failed
make[6]: *** [mlx5.o] Error 1
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'mlx5' failed
make[5]: *** [mlx5] Error 2
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'net' failed
make[4]: *** [net] Error 2
/opt/dpdk/mk/rte.sdkbuild.mk:78: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:126: recipe for target 'all' failed
make[2]: *** [all] Error 2
/opt/dpdk/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:101: recipe for target 'install' failed
make: *** [install] Error 2
[ ERROR] [      CheckStatus] Command make install failed

I tried 2 different kernels (4.4 and 4.8) both compiled from sources and I
also tried 3 different DPDk versions (16.04/07/11) but they all get stuck
to this point.
The way I configure DPDK is via config/common_base, where I set
CONFIG_RTE_LIBRTE_MLX5_PMD=y.
The file infiniband/mlx5_hw.h does not exist in my system although I have
installed libmlx5.

Do you know why does this happen now?

Thanks in advance and best regards,
Georgios

On Thu, Aug 18, 2016 at 7:35 PM, <george.dit@gmail.com> wrote:

> Hi Adrien,
>
> Thanks for the prompt reply!
> You are right, I didn't go via the DPDK route, in the hope that Mellanox
> will provide the exact source and configuration.
> DPDK 16.07 from dpdk.org works like a charm and my NIC is in PMD mode,
> thanks a lot for your guidance!
>
> Best regards,
> Georgios
>
> On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil <
> adrien.mazarguil@6wind.com> wrote:
>
>> Hi George,
>>
>> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
>> > Hi,
>> >
>> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to test
>> its
>> > Rx/Tx capabilites  using DPDK.
>> > My system runs a Linux kernel 4.4 compiled from sources.
>> >
>> > I found the PMD driver for this NIC as provided by Mellanox here
>> > <http://www.mellanox.com/page/products_dyn?product_family=20
>> 9&mtag=pmd_for_dpdk>
>> > .
>> > Following this
>> > <http://www.mellanox.com/related-docs/prod_software/MLNX_
>> DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
>> > guideline, I put my NIC in Ethernet mode, configured the 3 options
>> > regarding mlx5 in the config/common_linuxapp file and applied 'make
>> install
>> > T=x86_64-native-linuxapp-gcc'.
>>
>> Please note this is a third party package maintained by Mellanox,
>> therefore
>> this mailing list is not the right place to discuss related errors, unless
>> they can be reproduced with a version downloaded from dpdk.org.
>>
>> > Then, I stumbled upon a compilation problem in the mlx4 module.
>> > The compiler's output is as follows:
>> >
>> > == Build drivers/net/mlx4
>> >   CC mlx4.o
>> > In file included from /usr/include/linux/if.h:31:0,
>> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers
>> /net/mlx4/mlx4.c:57:
>> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared
>> here
>> > (not in a function)
>> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
>> >               ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: ‘struct
>> > ifreq’ declared inside parameter list [-Werror]
>> >  priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
>> >                                                      ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its
>> scope is
>> > only this definition or declaration, which is probably not what you want
>> > [-Werror]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_ifreq’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
>> dereferencing
>> > pointer to incomplete type ‘struct ifreq’
>> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
>> >                                 ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘rxq_setup’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error: unused
>> > parameter ‘inactive’ [-Werror=unused-parameter]
>> >     unsigned int socket, int inactive, const struct rte_eth_rxconf
>> *conf,
>> >                              ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_link_update_unlocked’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
>> >                                            ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
>> > undeclared identifier is reported only once for each function it
>> appears in
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
>> > ‘IFF_RUNNING’ undeclared (first use in this function)
>> >      (ifr.ifr_flags & IFF_RUNNING));
>> >                       ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: unused
>> > variable ‘ifr’ [-Werror=unused-variable]
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_get_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: unused
>> > variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_set_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: unused
>> > variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_get_mac’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: storage
>> size
>> > of ‘request’ isn’t known
>> >   struct ifreq request;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: unused
>> > variable ‘request’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_pci_devinit’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
>> >                          ^
>> > cc1: all warnings being treated as errors
>> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe for
>> > target 'mlx4.o' failed
>> >
>> > Iwould appreciate any suggestions and guidance.
>>
>> Well fortunately these errors are also present in v2.2.0 and should have
>> been addressed since v16.07 by the following commit:
>>
>>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a
>> 693b3fece68a93ae4369
>>
>> You can either upgrade to v16.07, back-port this commit yourself or wait
>> for
>> an update from Mellanox.
>>
>> --
>> Adrien Mazarguil
>> 6WIND
>>
>
>
>
> --
>    Georgios Katsikas
>    Ph.D. Student and Research Assistant
>    Network Systems Lab (NSL)
>
>
>
>        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>    *Web Site:*  http://www.di.uoa.gr/~katsikas/
> <http://people.networks.imdea.org/~george_katsikas/index.html>
>



-- 
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
   *Web Site:*  http://www.di.uoa.gr/~katsikas/
<http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-12-16 14:45     ` george.dit
@ 2016-12-17 21:26       ` Olga Shern
  2016-12-18  7:58         ` george.dit
  0 siblings, 1 reply; 8+ messages in thread
From: Olga Shern @ 2016-12-17 21:26 UTC (permalink / raw)
  To: george.dit, dev

Hi Georgios,

Did you install MLNX_OFED?
You probably missing libmlx5-devel package

Best Regards,
Olga

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of george.dit@gmail.com
Sent: Friday, December 16, 2016 4:46 PM
To: Georgios Katsikas <george.dit@gmail.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem

Hi all,

I am coming back to you regarding the Mellanox Connectx4 100Gbps DPDK driver.
We exchanged some e-mails last summer and I managed to compile the DPDK-based Mellanox driver using DPDK 16.07 on top of Ubuntu server 16.04.01.

A few days ago, I installed a fresh Ubuntu server 16.04.1 on my machine and attempted to re-install DPDK.
This time, DPDK does not compile because of the following error:
\== Build drivers/net/mlx5
  CC mlx5.o
In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:67:0,
                 from /opt/dpdk/drivers/net/mlx5/mlx5.c:66:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.h:46:32: fatal error:
infiniband/mlx5_hw.h: No such file or directory compilation terminated.
/opt/dpdk/mk/internal/rte.compile-pre.mk:138: recipe for target 'mlx5.o'
failed
make[6]: *** [mlx5.o] Error 1
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'mlx5' failed
make[5]: *** [mlx5] Error 2
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'net' failed
make[4]: *** [net] Error 2
/opt/dpdk/mk/rte.sdkbuild.mk:78: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:126: recipe for target 'all' failed
make[2]: *** [all] Error 2
/opt/dpdk/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:101: recipe for target 'install' failed
make: *** [install] Error 2
[ ERROR] [      CheckStatus] Command make install failed

I tried 2 different kernels (4.4 and 4.8) both compiled from sources and I also tried 3 different DPDk versions (16.04/07/11) but they all get stuck to this point.
The way I configure DPDK is via config/common_base, where I set CONFIG_RTE_LIBRTE_MLX5_PMD=y.
The file infiniband/mlx5_hw.h does not exist in my system although I have installed libmlx5.

Do you know why does this happen now?

Thanks in advance and best regards,
Georgios

On Thu, Aug 18, 2016 at 7:35 PM, <george.dit@gmail.com> wrote:

> Hi Adrien,
>
> Thanks for the prompt reply!
> You are right, I didn't go via the DPDK route, in the hope that 
> Mellanox will provide the exact source and configuration.
> DPDK 16.07 from dpdk.org works like a charm and my NIC is in PMD mode, 
> thanks a lot for your guidance!
>
> Best regards,
> Georgios
>
> On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil < 
> adrien.mazarguil@6wind.com> wrote:
>
>> Hi George,
>>
>> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
>> > Hi,
>> >
>> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to 
>> > test
>> its
>> > Rx/Tx capabilites  using DPDK.
>> > My system runs a Linux kernel 4.4 compiled from sources.
>> >
>> > I found the PMD driver for this NIC as provided by Mellanox here
>> > <http://www.mellanox.com/page/products_dyn?product_family=20
>> 9&mtag=pmd_for_dpdk>
>> > .
>> > Following this
>> > <http://www.mellanox.com/related-docs/prod_software/MLNX_
>> DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
>> > guideline, I put my NIC in Ethernet mode, configured the 3 options 
>> > regarding mlx5 in the config/common_linuxapp file and applied 'make
>> install
>> > T=x86_64-native-linuxapp-gcc'.
>>
>> Please note this is a third party package maintained by Mellanox, 
>> therefore this mailing list is not the right place to discuss related 
>> errors, unless they can be reproduced with a version downloaded from 
>> dpdk.org.
>>
>> > Then, I stumbled upon a compilation problem in the mlx4 module.
>> > The compiler's output is as follows:
>> >
>> > == Build drivers/net/mlx4
>> >   CC mlx4.o
>> > In file included from /usr/include/linux/if.h:31:0,
>> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers
>> /net/mlx4/mlx4.c:57:
>> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared
>> here
>> > (not in a function)
>> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
>> >               ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: 
>> > ‘struct ifreq’ declared inside parameter list [-Werror]  
>> > priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
>> >                                                      ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its
>> scope is
>> > only this definition or declaration, which is probably not what you 
>> > want [-Werror]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_ifreq’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
>> dereferencing
>> > pointer to incomplete type ‘struct ifreq’
>> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
>> >                                 ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘rxq_setup’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error: 
>> > unused parameter ‘inactive’ [-Werror=unused-parameter]
>> >     unsigned int socket, int inactive, const struct rte_eth_rxconf
>> *conf,
>> >                              ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_link_update_unlocked’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: 
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
>> >                                            ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each 
>> > undeclared identifier is reported only once for each function it
>> appears in
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
>> > ‘IFF_RUNNING’ undeclared (first use in this function)
>> >      (ifr.ifr_flags & IFF_RUNNING));
>> >                       ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error: 
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_get_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: 
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error: 
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_set_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: 
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error: 
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_get_mac’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: 
>> > storage
>> size
>> > of ‘request’ isn’t known
>> >   struct ifreq request;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error: 
>> > unused variable ‘request’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_pci_devinit’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
>> >                          ^
>> > cc1: all warnings being treated as errors
>> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe 
>> > for target 'mlx4.o' failed
>> >
>> > Iwould appreciate any suggestions and guidance.
>>
>> Well fortunately these errors are also present in v2.2.0 and should 
>> have been addressed since v16.07 by the following commit:
>>
>>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a
>> 693b3fece68a93ae4369
>>
>> You can either upgrade to v16.07, back-port this commit yourself or 
>> wait for an update from Mellanox.
>>
>> --
>> Adrien Mazarguil
>> 6WIND
>>
>
>
>
> --
>    Georgios Katsikas
>    Ph.D. Student and Research Assistant
>    Network Systems Lab (NSL)
>
>
>
>        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>    *Web Site:*  http://www.di.uoa.gr/~katsikas/ 
> <http://people.networks.imdea.org/~george_katsikas/index.html>
>



-- 
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
   *Web Site:*  http://www.di.uoa.gr/~katsikas/ <http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-12-17 21:26       ` Olga Shern
@ 2016-12-18  7:58         ` george.dit
  2016-12-18 16:06           ` george.dit
  0 siblings, 1 reply; 8+ messages in thread
From: george.dit @ 2016-12-18  7:58 UTC (permalink / raw)
  To: Olga Shern; +Cc: dev

Hi Olga,

That was the issue indeed, thank you very much!

Best regards,
Georgios

On Sat, Dec 17, 2016 at 10:26 PM, Olga Shern <olgas@mellanox.com> wrote:

> Hi Georgios,
>
> Did you install MLNX_OFED?
> You probably missing libmlx5-devel package
>
> Best Regards,
> Olga
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of george.dit@gmail.com
> Sent: Friday, December 16, 2016 4:46 PM
> To: Georgios Katsikas <george.dit@gmail.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
>
> Hi all,
>
> I am coming back to you regarding the Mellanox Connectx4 100Gbps DPDK
> driver.
> We exchanged some e-mails last summer and I managed to compile the
> DPDK-based Mellanox driver using DPDK 16.07 on top of Ubuntu server
> 16.04.01.
>
> A few days ago, I installed a fresh Ubuntu server 16.04.1 on my machine
> and attempted to re-install DPDK.
> This time, DPDK does not compile because of the following error:
> \== Build drivers/net/mlx5
>   CC mlx5.o
> In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:67:0,
>                  from /opt/dpdk/drivers/net/mlx5/mlx5.c:66:
> /opt/dpdk/drivers/net/mlx5/mlx5_rxtx.h:46:32: fatal error:
> infiniband/mlx5_hw.h: No such file or directory compilation terminated.
> /opt/dpdk/mk/internal/rte.compile-pre.mk:138: recipe for target 'mlx5.o'
> failed
> make[6]: *** [mlx5.o] Error 1
> /opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'mlx5' failed
> make[5]: *** [mlx5] Error 2
> /opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'net' failed
> make[4]: *** [net] Error 2
> /opt/dpdk/mk/rte.sdkbuild.mk:78: recipe for target 'drivers' failed
> make[3]: *** [drivers] Error 2
> /opt/dpdk/mk/rte.sdkroot.mk:126: recipe for target 'all' failed
> make[2]: *** [all] Error 2
> /opt/dpdk/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
> make[1]: *** [pre_install] Error 2
> /opt/dpdk/mk/rte.sdkroot.mk:101: recipe for target 'install' failed
> make: *** [install] Error 2
> [ ERROR] [      CheckStatus] Command make install failed
>
> I tried 2 different kernels (4.4 and 4.8) both compiled from sources and I
> also tried 3 different DPDk versions (16.04/07/11) but they all get stuck
> to this point.
> The way I configure DPDK is via config/common_base, where I set
> CONFIG_RTE_LIBRTE_MLX5_PMD=y.
> The file infiniband/mlx5_hw.h does not exist in my system although I have
> installed libmlx5.
>
> Do you know why does this happen now?
>
> Thanks in advance and best regards,
> Georgios
>
> On Thu, Aug 18, 2016 at 7:35 PM, <george.dit@gmail.com> wrote:
>
> > Hi Adrien,
> >
> > Thanks for the prompt reply!
> > You are right, I didn't go via the DPDK route, in the hope that
> > Mellanox will provide the exact source and configuration.
> > DPDK 16.07 from dpdk.org works like a charm and my NIC is in PMD mode,
> > thanks a lot for your guidance!
> >
> > Best regards,
> > Georgios
> >
> > On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil <
> > adrien.mazarguil@6wind.com> wrote:
> >
> >> Hi George,
> >>
> >> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
> >> > Hi,
> >> >
> >> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to
> >> > test
> >> its
> >> > Rx/Tx capabilites  using DPDK.
> >> > My system runs a Linux kernel 4.4 compiled from sources.
> >> >
> >> > I found the PMD driver for this NIC as provided by Mellanox here
> >> > <http://www.mellanox.com/page/products_dyn?product_family=20
> >> 9&mtag=pmd_for_dpdk>
> >> > .
> >> > Following this
> >> > <http://www.mellanox.com/related-docs/prod_software/MLNX_
> >> DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
> >> > guideline, I put my NIC in Ethernet mode, configured the 3 options
> >> > regarding mlx5 in the config/common_linuxapp file and applied 'make
> >> install
> >> > T=x86_64-native-linuxapp-gcc'.
> >>
> >> Please note this is a third party package maintained by Mellanox,
> >> therefore this mailing list is not the right place to discuss related
> >> errors, unless they can be reproduced with a version downloaded from
> >> dpdk.org.
> >>
> >> > Then, I stumbled upon a compilation problem in the mlx4 module.
> >> > The compiler's output is as follows:
> >> >
> >> > == Build drivers/net/mlx4
> >> >   CC mlx4.o
> >> > In file included from /usr/include/linux/if.h:31:0,
> >> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers
> >> /net/mlx4/mlx4.c:57:
> >> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared
> >> here
> >> > (not in a function)
> >> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
> >> >               ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error:
> >> > ‘struct ifreq’ declared inside parameter list [-Werror]
> >> > priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
> >> >                                                      ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its
> >> scope is
> >> > only this definition or declaration, which is probably not what you
> >> > want [-Werror]
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> ‘priv_ifreq’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
> >> dereferencing
> >> > pointer to incomplete type ‘struct ifreq’
> >> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
> >> >                                 ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> ‘rxq_setup’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error:
> >> > unused parameter ‘inactive’ [-Werror=unused-parameter]
> >> >     unsigned int socket, int inactive, const struct rte_eth_rxconf
> >> *conf,
> >> >                              ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> > ‘mlx4_link_update_unlocked’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
> >> > storage
> >> size
> >> > of ‘ifr’ isn’t known
> >> >   struct ifreq ifr;
> >> >                ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error:
> ‘IFF_UP’
> >> > undeclared (first use in this function)
> >> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
> >> >                                            ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
> >> > undeclared identifier is reported only once for each function it
> >> appears in
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
> >> > ‘IFF_RUNNING’ undeclared (first use in this function)
> >> >      (ifr.ifr_flags & IFF_RUNNING));
> >> >                       ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
> >> > unused variable ‘ifr’ [-Werror=unused-variable]
> >> >   struct ifreq ifr;
> >> >                ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> > ‘mlx4_dev_get_flow_ctrl’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
> >> > storage
> >> size
> >> > of ‘ifr’ isn’t known
> >> >   struct ifreq ifr;
> >> >                ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
> >> > unused variable ‘ifr’ [-Werror=unused-variable]
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> > ‘mlx4_dev_set_flow_ctrl’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
> >> > storage
> >> size
> >> > of ‘ifr’ isn’t known
> >> >   struct ifreq ifr;
> >> >                ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
> >> > unused variable ‘ifr’ [-Werror=unused-variable]
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> ‘priv_get_mac’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
> >> > storage
> >> size
> >> > of ‘request’ isn’t known
> >> >   struct ifreq request;
> >> >                ^
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
> >> > unused variable ‘request’ [-Werror=unused-variable]
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
> >> > ‘mlx4_pci_devinit’:
> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error:
> ‘IFF_UP’
> >> > undeclared (first use in this function)
> >> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
> >> >                          ^
> >> > cc1: all warnings being treated as errors
> >> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe
> >> > for target 'mlx4.o' failed
> >> >
> >> > Iwould appreciate any suggestions and guidance.
> >>
> >> Well fortunately these errors are also present in v2.2.0 and should
> >> have been addressed since v16.07 by the following commit:
> >>
> >>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a
> >> 693b3fece68a93ae4369
> >>
> >> You can either upgrade to v16.07, back-port this commit yourself or
> >> wait for an update from Mellanox.
> >>
> >> --
> >> Adrien Mazarguil
> >> 6WIND
> >>
> >
> >
> >
> > --
> >    Georgios Katsikas
> >    Ph.D. Student and Research Assistant
> >    Network Systems Lab (NSL)
> >
> >
> >
> >        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
> >    *Web Site:*  http://www.di.uoa.gr/~katsikas/
> > <http://people.networks.imdea.org/~george_katsikas/index.html>
> >
>
>
>
> --
>    Georgios Katsikas
>    Ph.D. Student and Research Assistant
>    Network Systems Lab (NSL)
>
>
>
>        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>    *Web Site:*  http://www.di.uoa.gr/~katsikas/ <
> http://people.networks.imdea.org/~george_katsikas/index.html>
>



-- 
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
   *Web Site:*  http://www.di.uoa.gr/~katsikas/
<http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-12-18  7:58         ` george.dit
@ 2016-12-18 16:06           ` george.dit
  2016-12-18 21:00             ` Olga Shern
  0 siblings, 1 reply; 8+ messages in thread
From: george.dit @ 2016-12-18 16:06 UTC (permalink / raw)
  To: Olga Shern; +Cc: dev

Hi again,

I have a follow up question. I noticed that when I compile DPDK with
CONFIG_RTE_LIBRTE_MLX5_PMD=y, the compilation fate depends upon the OFED
version that I have.
To become more clear, with DPDK 16.11 and OFED 3.4-2.0.0.0 it compiles, but
DPDK 16.07 and the same OFED fails with:

== Build drivers/net/mlx5
  CC mlx5.o
  PMDINFO mlx5.o.pmd.c
  CC mlx5.o.pmd.o
  LD mlx5.o
  CC mlx5_rxq.o
  CC mlx5_txq.o
  CC mlx5_rxtx.o
In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:41:0,
                 from /opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:65:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c: In function ‘mlx5_mpw_new’:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:911:9: error: ‘MLX5_OPCODE_LSO_MPW’
undeclared (first use in this function)
         MLX5_OPCODE_LSO_MPW);
         ^
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:911:9: note: each undeclared
identifier is reported only once for each function it appears in
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c: In function ‘mlx5_mpw_inline_new’:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1110:13: error:
‘MLX5_OPCODE_LSO_MPW’ undeclared (first use in this function)
             MLX5_OPCODE_LSO_MPW);
             ^
/opt/dpdk/mk/internal/rte.compile-pre.mk:138: recipe for target
'mlx5_rxtx.o' failed
make[6]: *** [mlx5_rxtx.o] Error 1
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'mlx5' failed
make[5]: *** [mlx5] Error 2
/opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'net' failed
make[4]: *** [net] Error 2
/opt/dpdk/mk/rte.sdkbuild.mk:78: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:123: recipe for target 'all' failed
make[2]: *** [all] Error 2
/opt/dpdk/mk/rte.sdkinstall.mk:84: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:98: recipe for target 'install' failed
make: *** [install] Error 2

Is there a way to have DPDK compiled with MLX5 support across a variety of
DPDK versions (i.e, from 2.2.0 up to 16.11)?

Thanks in advance and best regards,
Georgios




On Sun, Dec 18, 2016 at 8:58 AM, <george.dit@gmail.com> wrote:

> Hi Olga,
>
> That was the issue indeed, thank you very much!
>
> Best regards,
> Georgios
>
> On Sat, Dec 17, 2016 at 10:26 PM, Olga Shern <olgas@mellanox.com> wrote:
>
>> Hi Georgios,
>>
>> Did you install MLNX_OFED?
>> You probably missing libmlx5-devel package
>>
>> Best Regards,
>> Olga
>>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of george.dit@gmail.com
>> Sent: Friday, December 16, 2016 4:46 PM
>> To: Georgios Katsikas <george.dit@gmail.com>; dev@dpdk.org
>> Subject: Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
>>
>> Hi all,
>>
>> I am coming back to you regarding the Mellanox Connectx4 100Gbps DPDK
>> driver.
>> We exchanged some e-mails last summer and I managed to compile the
>> DPDK-based Mellanox driver using DPDK 16.07 on top of Ubuntu server
>> 16.04.01.
>>
>> A few days ago, I installed a fresh Ubuntu server 16.04.1 on my machine
>> and attempted to re-install DPDK.
>> This time, DPDK does not compile because of the following error:
>> \== Build drivers/net/mlx5
>>   CC mlx5.o
>> In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:67:0,
>>                  from /opt/dpdk/drivers/net/mlx5/mlx5.c:66:
>> /opt/dpdk/drivers/net/mlx5/mlx5_rxtx.h:46:32: fatal error:
>> infiniband/mlx5_hw.h: No such file or directory compilation terminated.
>> /opt/dpdk/mk/internal/rte.compile-pre.mk:138: recipe for target 'mlx5.o'
>> failed
>> make[6]: *** [mlx5.o] Error 1
>> /opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'mlx5' failed
>> make[5]: *** [mlx5] Error 2
>> /opt/dpdk/mk/rte.subdir.mk:61: recipe for target 'net' failed
>> make[4]: *** [net] Error 2
>> /opt/dpdk/mk/rte.sdkbuild.mk:78: recipe for target 'drivers' failed
>> make[3]: *** [drivers] Error 2
>> /opt/dpdk/mk/rte.sdkroot.mk:126: recipe for target 'all' failed
>> make[2]: *** [all] Error 2
>> /opt/dpdk/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
>> make[1]: *** [pre_install] Error 2
>> /opt/dpdk/mk/rte.sdkroot.mk:101: recipe for target 'install' failed
>> make: *** [install] Error 2
>> [ ERROR] [      CheckStatus] Command make install failed
>>
>> I tried 2 different kernels (4.4 and 4.8) both compiled from sources and
>> I also tried 3 different DPDk versions (16.04/07/11) but they all get stuck
>> to this point.
>> The way I configure DPDK is via config/common_base, where I set
>> CONFIG_RTE_LIBRTE_MLX5_PMD=y.
>> The file infiniband/mlx5_hw.h does not exist in my system although I have
>> installed libmlx5.
>>
>> Do you know why does this happen now?
>>
>> Thanks in advance and best regards,
>> Georgios
>>
>> On Thu, Aug 18, 2016 at 7:35 PM, <george.dit@gmail.com> wrote:
>>
>> > Hi Adrien,
>> >
>> > Thanks for the prompt reply!
>> > You are right, I didn't go via the DPDK route, in the hope that
>> > Mellanox will provide the exact source and configuration.
>> > DPDK 16.07 from dpdk.org works like a charm and my NIC is in PMD mode,
>> > thanks a lot for your guidance!
>> >
>> > Best regards,
>> > Georgios
>> >
>> > On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil <
>> > adrien.mazarguil@6wind.com> wrote:
>> >
>> >> Hi George,
>> >>
>> >> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com wrote:
>> >> > Hi,
>> >> >
>> >> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to
>> >> > test
>> >> its
>> >> > Rx/Tx capabilites  using DPDK.
>> >> > My system runs a Linux kernel 4.4 compiled from sources.
>> >> >
>> >> > I found the PMD driver for this NIC as provided by Mellanox here
>> >> > <http://www.mellanox.com/page/products_dyn?product_family=20
>> >> 9&mtag=pmd_for_dpdk>
>> >> > .
>> >> > Following this
>> >> > <http://www.mellanox.com/related-docs/prod_software/MLNX_
>> >> DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
>> >> > guideline, I put my NIC in Ethernet mode, configured the 3 options
>> >> > regarding mlx5 in the config/common_linuxapp file and applied 'make
>> >> install
>> >> > T=x86_64-native-linuxapp-gcc'.
>> >>
>> >> Please note this is a third party package maintained by Mellanox,
>> >> therefore this mailing list is not the right place to discuss related
>> >> errors, unless they can be reproduced with a version downloaded from
>> >> dpdk.org.
>> >>
>> >> > Then, I stumbled upon a compilation problem in the mlx4 module.
>> >> > The compiler's output is as follows:
>> >> >
>> >> > == Build drivers/net/mlx4
>> >> >   CC mlx4.o
>> >> > In file included from /usr/include/linux/if.h:31:0,
>> >> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers
>> >> /net/mlx4/mlx4.c:57:
>> >> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared
>> >> here
>> >> > (not in a function)
>> >> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
>> >> >               ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error:
>> >> > ‘struct ifreq’ declared inside parameter list [-Werror]
>> >> > priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
>> >> >                                                      ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its
>> >> scope is
>> >> > only this definition or declaration, which is probably not what you
>> >> > want [-Werror]
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> ‘priv_ifreq’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
>> >> dereferencing
>> >> > pointer to incomplete type ‘struct ifreq’
>> >> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
>> >> >                                 ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> ‘rxq_setup’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error:
>> >> > unused parameter ‘inactive’ [-Werror=unused-parameter]
>> >> >     unsigned int socket, int inactive, const struct rte_eth_rxconf
>> >> *conf,
>> >> >                              ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> > ‘mlx4_link_update_unlocked’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
>> >> > storage
>> >> size
>> >> > of ‘ifr’ isn’t known
>> >> >   struct ifreq ifr;
>> >> >                ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error:
>> ‘IFF_UP’
>> >> > undeclared (first use in this function)
>> >> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
>> >> >                                            ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
>> >> > undeclared identifier is reported only once for each function it
>> >> appears in
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
>> >> > ‘IFF_RUNNING’ undeclared (first use in this function)
>> >> >      (ifr.ifr_flags & IFF_RUNNING));
>> >> >                       ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
>> >> > unused variable ‘ifr’ [-Werror=unused-variable]
>> >> >   struct ifreq ifr;
>> >> >                ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> > ‘mlx4_dev_get_flow_ctrl’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
>> >> > storage
>> >> size
>> >> > of ‘ifr’ isn’t known
>> >> >   struct ifreq ifr;
>> >> >                ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
>> >> > unused variable ‘ifr’ [-Werror=unused-variable]
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> > ‘mlx4_dev_set_flow_ctrl’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
>> >> > storage
>> >> size
>> >> > of ‘ifr’ isn’t known
>> >> >   struct ifreq ifr;
>> >> >                ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
>> >> > unused variable ‘ifr’ [-Werror=unused-variable]
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> ‘priv_get_mac’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
>> >> > storage
>> >> size
>> >> > of ‘request’ isn’t known
>> >> >   struct ifreq request;
>> >> >                ^
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
>> >> > unused variable ‘request’ [-Werror=unused-variable]
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> >> > ‘mlx4_pci_devinit’:
>> >> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error:
>> ‘IFF_UP’
>> >> > undeclared (first use in this function)
>> >> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
>> >> >                          ^
>> >> > cc1: all warnings being treated as errors
>> >> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126: recipe
>> >> > for target 'mlx4.o' failed
>> >> >
>> >> > Iwould appreciate any suggestions and guidance.
>> >>
>> >> Well fortunately these errors are also present in v2.2.0 and should
>> >> have been addressed since v16.07 by the following commit:
>> >>
>> >>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a
>> >> 693b3fece68a93ae4369
>> >>
>> >> You can either upgrade to v16.07, back-port this commit yourself or
>> >> wait for an update from Mellanox.
>> >>
>> >> --
>> >> Adrien Mazarguil
>> >> 6WIND
>> >>
>> >
>> >
>> >
>> > --
>> >    Georgios Katsikas
>> >    Ph.D. Student and Research Assistant
>> >    Network Systems Lab (NSL)
>> >
>> >
>> >
>> >        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>> >    *Web Site:*  http://www.di.uoa.gr/~katsikas/
>> > <http://people.networks.imdea.org/~george_katsikas/index.html>
>> >
>>
>>
>>
>> --
>>    Georgios Katsikas
>>    Ph.D. Student and Research Assistant
>>    Network Systems Lab (NSL)
>>
>>
>>
>>        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>>    *Web Site:*  http://www.di.uoa.gr/~katsikas/ <
>> http://people.networks.imdea.org/~george_katsikas/index.html>
>>
>
>
>
> --
>    Georgios Katsikas
>    Ph.D. Student and Research Assistant
>    Network Systems Lab (NSL)
>
>
>
>        *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
>    *Web Site:*  http://www.di.uoa.gr/~katsikas/
> <http://people.networks.imdea.org/~george_katsikas/index.html>
>



-- 
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org>.dit@gmail.com
   *Web Site:*  http://www.di.uoa.gr/~katsikas/
<http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem
  2016-12-18 16:06           ` george.dit
@ 2016-12-18 21:00             ` Olga Shern
  0 siblings, 0 replies; 8+ messages in thread
From: Olga Shern @ 2016-12-18 21:00 UTC (permalink / raw)
  To: george.dit; +Cc: dev

Hi George,

You are right, this is the expected behavior.
Every new DPDK version that is released supported on top of latest available MLNX_OFED and this is documented  in the RN.
For DPDK 16.07 you will need to use MLNX_OFED 3.3

Best Regards,
Olga

From: george.dit@gmail.com [mailto:george.dit@gmail.com]
Sent: Sunday, December 18, 2016 6:06 PM
To: Olga Shern <olgas@mellanox.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem

Hi again,

I have a follow up question. I noticed that when I compile DPDK with CONFIG_RTE_LIBRTE_MLX5_PMD=y, the compilation fate depends upon the OFED version that I have.
To become more clear, with DPDK 16.11 and OFED 3.4-2.0.0.0 it compiles, but DPDK 16.07 and the same OFED fails with:

== Build drivers/net/mlx5
  CC mlx5.o
  PMDINFO mlx5.o.pmd.c
  CC mlx5.o.pmd.o
  LD mlx5.o
  CC mlx5_rxq.o
  CC mlx5_txq.o
  CC mlx5_rxtx.o
In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:41:0,
                 from /opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:65:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c: In function ‘mlx5_mpw_new’:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:911:9: error: ‘MLX5_OPCODE_LSO_MPW’ undeclared (first use in this function)
         MLX5_OPCODE_LSO_MPW);
         ^
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:911:9: note: each undeclared identifier is reported only once for each function it appears in
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c: In function ‘mlx5_mpw_inline_new’:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1110:13: error: ‘MLX5_OPCODE_LSO_MPW’ undeclared (first use in this function)
             MLX5_OPCODE_LSO_MPW);
             ^
/opt/dpdk/mk/internal/rte.compile-pre.mk:138<http://rte.compile-pre.mk:138>: recipe for target 'mlx5_rxtx.o' failed
make[6]: *** [mlx5_rxtx.o] Error 1
/opt/dpdk/mk/rte.subdir.mk:61<http://rte.subdir.mk:61>: recipe for target 'mlx5' failed
make[5]: *** [mlx5] Error 2
/opt/dpdk/mk/rte.subdir.mk:61<http://rte.subdir.mk:61>: recipe for target 'net' failed
make[4]: *** [net] Error 2
/opt/dpdk/mk/rte.sdkbuild.mk:78<http://rte.sdkbuild.mk:78>: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:123<http://rte.sdkroot.mk:123>: recipe for target 'all' failed
make[2]: *** [all] Error 2
/opt/dpdk/mk/rte.sdkinstall.mk:84<http://rte.sdkinstall.mk:84>: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:98<http://rte.sdkroot.mk:98>: recipe for target 'install' failed
make: *** [install] Error 2

Is there a way to have DPDK compiled with MLX5 support across a variety of DPDK versions (i.e, from 2.2.0 up to 16.11)?

Thanks in advance and best regards,
Georgios




On Sun, Dec 18, 2016 at 8:58 AM, <george.dit@gmail.com<mailto:george.dit@gmail.com>> wrote:
Hi Olga,

That was the issue indeed, thank you very much!

Best regards,
Georgios

On Sat, Dec 17, 2016 at 10:26 PM, Olga Shern <olgas@mellanox.com<mailto:olgas@mellanox.com>> wrote:
Hi Georgios,

Did you install MLNX_OFED?
You probably missing libmlx5-devel package

Best Regards,
Olga

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>] On Behalf Of george.dit@gmail.com<mailto:george.dit@gmail.com>
Sent: Friday, December 16, 2016 4:46 PM
To: Georgios Katsikas <george.dit@gmail.com<mailto:george.dit@gmail.com>>; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] ConnectX4 100GbE - Compilation problem

Hi all,

I am coming back to you regarding the Mellanox Connectx4 100Gbps DPDK driver.
We exchanged some e-mails last summer and I managed to compile the DPDK-based Mellanox driver using DPDK 16.07 on top of Ubuntu server 16.04.01.

A few days ago, I installed a fresh Ubuntu server 16.04.1 on my machine and attempted to re-install DPDK.
This time, DPDK does not compile because of the following error:
\== Build drivers/net/mlx5
  CC mlx5.o
In file included from /opt/dpdk/drivers/net/mlx5/mlx5.h:67:0,
                 from /opt/dpdk/drivers/net/mlx5/mlx5.c:66:
/opt/dpdk/drivers/net/mlx5/mlx5_rxtx.h:46:32: fatal error:
infiniband/mlx5_hw.h: No such file or directory compilation terminated.
/opt/dpdk/mk/internal/rte.compile-pre.mk:138<http://rte.compile-pre.mk:138>: recipe for target 'mlx5.o'
failed
make[6]: *** [mlx5.o] Error 1
/opt/dpdk/mk/rte.subdir.mk:61<http://rte.subdir.mk:61>: recipe for target 'mlx5' failed
make[5]: *** [mlx5] Error 2
/opt/dpdk/mk/rte.subdir.mk:61<http://rte.subdir.mk:61>: recipe for target 'net' failed
make[4]: *** [net] Error 2
/opt/dpdk/mk/rte.sdkbuild.mk:78<http://rte.sdkbuild.mk:78>: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:126<http://rte.sdkroot.mk:126>: recipe for target 'all' failed
make[2]: *** [all] Error 2
/opt/dpdk/mk/rte.sdkinstall.mk:85<http://rte.sdkinstall.mk:85>: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/opt/dpdk/mk/rte.sdkroot.mk:101<http://rte.sdkroot.mk:101>: recipe for target 'install' failed
make: *** [install] Error 2
[ ERROR] [      CheckStatus] Command make install failed

I tried 2 different kernels (4.4 and 4.8) both compiled from sources and I also tried 3 different DPDk versions (16.04/07/11) but they all get stuck to this point.
The way I configure DPDK is via config/common_base, where I set CONFIG_RTE_LIBRTE_MLX5_PMD=y.
The file infiniband/mlx5_hw.h does not exist in my system although I have installed libmlx5.

Do you know why does this happen now?

Thanks in advance and best regards,
Georgios

On Thu, Aug 18, 2016 at 7:35 PM, <george.dit@gmail.com<mailto:george.dit@gmail.com>> wrote:

> Hi Adrien,
>
> Thanks for the prompt reply!
> You are right, I didn't go via the DPDK route, in the hope that
> Mellanox will provide the exact source and configuration.
> DPDK 16.07 from dpdk.org<http://dpdk.org> works like a charm and my NIC is in PMD mode,
> thanks a lot for your guidance!
>
> Best regards,
> Georgios
>
> On Thu, Aug 18, 2016 at 6:05 PM, Adrien Mazarguil <
> adrien.mazarguil@6wind.com<mailto:adrien.mazarguil@6wind.com>> wrote:
>
>> Hi George,
>>
>> On Thu, Aug 18, 2016 at 05:41:38PM +0200, george.dit@gmail.com<mailto:george.dit@gmail.com> wrote:
>> > Hi,
>> >
>> > I have a single port Mellanox ConnectX 4 100GbE NIC and I want to
>> > test
>> its
>> > Rx/Tx capabilites  using DPDK.
>> > My system runs a Linux kernel 4.4 compiled from sources.
>> >
>> > I found the PMD driver for this NIC as provided by Mellanox here
>> > <http://www.mellanox.com/page/products_dyn?product_family=20
>> 9&mtag=pmd_for_dpdk>
>> > .
>> > Following this
>> > <http://www.mellanox.com/related-docs/prod_software/MLNX_
>> DPDK_Quick_Start_Guide_v2.2_2.7.pdf>
>> > guideline, I put my NIC in Ethernet mode, configured the 3 options
>> > regarding mlx5 in the config/common_linuxapp file and applied 'make
>> install
>> > T=x86_64-native-linuxapp-gcc'.
>>
>> Please note this is a third party package maintained by Mellanox,
>> therefore this mailing list is not the right place to discuss related
>> errors, unless they can be reproduced with a version downloaded from
>> dpdk.org<http://dpdk.org>.
>>
>> > Then, I stumbled upon a compilation problem in the mlx4 module.
>> > The compiler's output is as follows:
>> >
>> > == Build drivers/net/mlx4
>> >   CC mlx4.o
>> > In file included from /usr/include/linux/if.h:31:0,
>> >                  from /opt/MLNX_DPDK_2.2_2.7/drivers
>> /net/mlx4/mlx4.c:57:
>> > /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared
>> here
>> > (not in a function)
>> >   char master[IFNAMSIZ]; /* Name of master FRAD device */
>> >               ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error:
>> > ‘struct ifreq’ declared inside parameter list [-Werror]
>> > priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
>> >                                                      ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:612:53: error: its
>> scope is
>> > only this definition or declaration, which is probably not what you
>> > want [-Werror]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_ifreq’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:619:32: error:
>> dereferencing
>> > pointer to incomplete type ‘struct ifreq’
>> >   if (priv_get_ifname(priv, &ifr->ifr_name) == 0)
>> >                                 ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘rxq_setup’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:3735:29: error:
>> > unused parameter ‘inactive’ [-Werror=unused-parameter]
>> >     unsigned int socket, int inactive, const struct rte_eth_rxconf
>> *conf,
>> >                              ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_link_update_unlocked’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >   dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
>> >                                            ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4724:43: note: each
>> > undeclared identifier is reported only once for each function it
>> appears in
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4725:22: error:
>> > ‘IFF_RUNNING’ undeclared (first use in this function)
>> >      (ifr.ifr_flags & IFF_RUNNING));
>> >                       ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4712:15: error:
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_get_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4880:15: error:
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_dev_set_flow_ctrl’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
>> > storage
>> size
>> > of ‘ifr’ isn’t known
>> >   struct ifreq ifr;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:4930:15: error:
>> > unused variable ‘ifr’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> ‘priv_get_mac’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
>> > storage
>> size
>> > of ‘request’ isn’t known
>> >   struct ifreq request;
>> >                ^
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5184:15: error:
>> > unused variable ‘request’ [-Werror=unused-variable]
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c: In function
>> > ‘mlx4_pci_devinit’:
>> > /opt/MLNX_DPDK_2.2_2.7/drivers/net/mlx4/mlx4.c:5725:25: error: ‘IFF_UP’
>> > undeclared (first use in this function)
>> >    priv_set_flags(priv, ~IFF_UP, IFF_UP);
>> >                          ^
>> > cc1: all warnings being treated as errors
>> > /opt/MLNX_DPDK_2.2_2.7/mk/internal/rte.compile-pre.mk:126<http://rte.compile-pre.mk:126>: recipe
>> > for target 'mlx4.o' failed
>> >
>> > Iwould appreciate any suggestions and guidance.
>>
>> Well fortunately these errors are also present in v2.2.0 and should
>> have been addressed since v16.07 by the following commit:
>>
>>  http://dpdk.org/browse/dpdk/commit/?id=d06c608c013c36711e7a
>> 693b3fece68a93ae4369
>>
>> You can either upgrade to v16.07, back-port this commit yourself or
>> wait for an update from Mellanox.
>>
>> --
>> Adrien Mazarguil
>> 6WIND
>>
>
>
>
> --
>    Georgios Katsikas
>    Ph.D. Student and Research Assistant
>    Network Systems Lab (NSL)
>
>
>
>        *E-Mail:*  george <george.katsikas@imdea.org<mailto:george.katsikas@imdea.org>>.dit@gmail.com<mailto:dit@gmail.com>
>    *Web Site:*  http://www.di.uoa.gr/~katsikas/
> <http://people.networks.imdea.org/~george_katsikas/index.html>
>



--
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)



       *E-Mail:*  george <george.katsikas@imdea.org<mailto:george.katsikas@imdea.org>>.dit@gmail.com<mailto:dit@gmail.com>
   *Web Site:*  http://www.di.uoa.gr/~katsikas/ <http://people.networks.imdea.org/~george_katsikas/index.html>



--
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)

   [http://www.kth.se/polopoly_fs/1.77259!/image/logo-main-2013.png]

       E-Mail:  george<mailto:george.katsikas@imdea.org>.dit@gmail.com<mailto:dit@gmail.com>
   Web Site:  http://www.di.uoa.gr/~katsikas/<http://people.networks.imdea.org/~george_katsikas/index.html>



--
   Georgios Katsikas
   Ph.D. Student and Research Assistant
   Network Systems Lab (NSL)

   [http://www.kth.se/polopoly_fs/1.77259!/image/logo-main-2013.png]

       E-Mail:  george<mailto:george.katsikas@imdea.org>.dit@gmail.com<mailto:dit@gmail.com>
   Web Site:  http://www.di.uoa.gr/~katsikas/<http://people.networks.imdea.org/~george_katsikas/index.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-18 21:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-18 15:41 [dpdk-dev] ConnectX4 100GbE - Compilation problem george.dit
2016-08-18 16:05 ` Adrien Mazarguil
2016-08-18 17:35   ` george.dit
2016-12-16 14:45     ` george.dit
2016-12-17 21:26       ` Olga Shern
2016-12-18  7:58         ` george.dit
2016-12-18 16:06           ` george.dit
2016-12-18 21:00             ` Olga Shern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).