net/bnxt: fix extended port counter statistics
authorSantoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Thu, 25 Jul 2019 04:59:46 +0000 (10:29 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 25 Jul 2019 15:54:57 +0000 (17:54 +0200)
commitb02a39ba3ba043827fb91c175900aed0eddf0d2d
tree7fae68e3a629178aa5197c1bd2a1a23dd1dd69e7
parentbd0a14c99f6588ea4c60a234e9e053fd2b329964
net/bnxt: fix extended port counter statistics

We were trying to fill in more rx extended stats than the size allocated
for stats causing segfault. Fixed this by adding an explicit check.
Rearranged the code to return statistic values in xstats_get as per the
names returned in xstats_get_names.

Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_stats.c