net/mlx5: cleanup allocation of ethtool stats
authorThierry Herbelot <thierry.herbelot@6wind.com>
Fri, 17 Nov 2017 13:51:34 +0000 (14:51 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commit25b73ba6f3ea0894bf3cfc64e999f71a7e4f6787
treefd8c825cf50636cd35be5c8725e8bd8f368583d9
parent37a725d66da55d51382b8c44b97e715ff20ea4b9
net/mlx5: cleanup allocation of ethtool stats

Simplify the computation for the needed size:
- exact size for the structure header,
- exact size for a number of 64-bit counters.

Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_stats.c