net/bnxt: fix xstats query
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 4 Jan 2022 08:38:23 +0000 (14:08 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 12 Jan 2022 02:07:26 +0000 (03:07 +0100)
commitc05c22f9b8032c2974de7042ba8c38fb42ed7c82
tree822509c64479fde950e73827f310da9cf10210ee
parent79fc1c531e0ae8a1f750639c82f7272d3117a220
net/bnxt: fix xstats query

Fix incorrect memset in bnxt_dev_xstats_get_op.
In bnxt_dev_xstats_get_op(), the PMD is not zeroing the whole
buffer supplied by the application. This can end up passing
junk statistics values to the application when the FW does not
support extended stats on a function.
Fixed to call memset() with correct size.

Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_stats.c