net/mlx5: fix extended statistics
authorShahaf Shuler <shahafs@mellanox.com>
Tue, 21 Feb 2017 14:37:24 +0000 (16:37 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:50 +0000 (15:52 +0200)
commite62bc9e70608b90cf639209127501c33e4f12342
tree39932bd70425e16142479f41395c040724e146b9
parentcd89f22a1e9770d312cac03c10705d48e5e36b4b
net/mlx5: fix extended statistics

The number of extended statistics counters is queried through ETHTOOL.
ETHTOOL provides a different number when the link is up or down.
Since extended statistics query occurs at device start,
segmentation fault might happen when changing the link state before and
after the device start.

this commit address this issue, and query the number of statistics
before every call to ETHTOOL.

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