net/bnxt: fix structure variable initialization
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fri, 28 Aug 2020 05:01:09 +0000 (10:31 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
commitce41561d1b998d9e15f74f9c3a6aff78e0f99871
tree2ef1a03641c34b94945403e7b6bbe8e88252bf8d
parent349355141cfe5823cd60d75e5e2f8b2acf3f8b17
net/bnxt: fix structure variable initialization

During port start if bnxt_alloc_all_hwrm_stat_ctxs() fails,
in the cleanup path we do see errors like below:

bnxt_hwrm_ring_free(): hwrm_ring_free cp failed. rc:2
bnxt_hwrm_ring_free(): hwrm_ring_free rx failed. rc:2

The reason for this is in bnxt_free_all_hwrm_rings(), the check
is made against "ring->fw_ring_id != INVALID_HW_RING_ID" which
always return true as ring->fw_ring_id is not set to INVALID_HW_RING_ID
while initialising the ring structs.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ring.c
drivers/net/bnxt/bnxt_rxr.c
drivers/net/bnxt/bnxt_txr.c