net/bnxt: fix double allocation of ring groups
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 1 Sep 2021 04:00:01 +0000 (09:30 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 2 Sep 2021 00:39:45 +0000 (02:39 +0200)
commit36a97cd23fc916ac475a0b827074b5645fff0cfe
tree728188162405a3f92f9ff7e2f3d06692a0a53367
parent8269a4e8af5fa7632578fc1f4fa7d44711440e4f
net/bnxt: fix double allocation of ring groups

After commit "d68249f88266", driver allocates ring groups in
bnxt_alloc_hwrm_rx_ring(). But during port start, driver invokes
bnxt_alloc_hwrm_rx_ring() followed by bnxt_alloc_all_hwrm_ring_grps().
This will cause the FW command failure in bnxt_alloc_all_hwrm_ring_grps()

To fix this, just don't create the ring group if it is already created.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c