net/mlx5: fix clang build
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Wed, 30 Aug 2017 14:47:06 +0000 (16:47 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
commit90260d577b61685365b7cf1a6151b9ed6b108f2d
tree1b604705112572cce4d3b46b84889b086f5f508e
parent45ea1d8b2e49fa31718ca401881c1c43b26e0d06
net/mlx5: fix clang build

On redhat 7.2 clang reports the following error:
   CC mlx5_rxmode.o
 /drivers/net/mlx5/mlx5_ethdev.c:820:32: error: field 'edata' with
 variable sized type 'struct ethtool_link_settings' not at the end
 of a struct or class is a GNU extension
 [-Werror,-Wgnu-variable-sized-type-not-at-end]
      struct ethtool_link_settings edata;

Use alternative approach to reserve buffer space on the stack.

Fixes: ef09a7fc7620 ("net/mlx5: fix inconsistent link status query")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_ethdev.c