net/bnxt: update ring group after ring stop start
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 2 Aug 2021 04:44:30 +0000 (21:44 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 19 Aug 2021 04:39:23 +0000 (06:39 +0200)
commited0ae3502fc91adbf6eebe7047da887353844230
treecd76157f49eb57bba0e76756f48de90d484d077f
parent12d42b248c6a5eec17830b4163b0edaf5ec7bdb0
net/bnxt: update ring group after ring stop start

A Rx ring stop start sequence may result in the FW returning
a different set of Rx ring and AGG ring IDs. If the ring group
is not updated with the new IDs, the HW sees the host driver using
incorrect BD types for the Rx ring and AGG ring. This can cause
the chip to go into a bad state or encounter RE_flush issue
or leak mbufs in the HW.

Fix this by issuing a bnxt_hwrm_ring_grp_free() and an
bnxt_hwrm_ring_grp_alloc() to refresh the ring group information.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_ring.c