net/bnxt: fix clear port stats
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 28 Jun 2018 20:15:27 +0000 (13:15 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
commita15fd8c005e75022140b5d83d15f0b10100b94f2
treee97e1b1507fdc0ef05aed89768174b8ecf68d227
parent70815c9ecadd780af101810119d385009cb0eb2d
net/bnxt: fix clear port stats

PORT_CLR_STATS is not allowed for VFs, NPAR, MultiHost functions
or when SR-IOV is enabled.
Don't send the HWRM command in such cases.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_hwrm.c