bnxt_en: Restructure cp_ring_arr in struct bnxt_cp_ring_info
authorMichael Chan <michael.chan@broadcom.com>
Tue, 14 Nov 2023 00:16:11 +0000 (16:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Nov 2023 10:07:39 +0000 (10:07 +0000)
commitd1eec614100c25b96b672b50d3125ba3d120b682
treedbd66ff04fee01c3c5a6bdd9bb2ce7e9ebbb4768
parent7f0a168b0441ef7fd6b46563efb2706c58ac2a4c
bnxt_en: Restructure cp_ring_arr in struct bnxt_cp_ring_info

The cp_ring_arr is currently a fixed array of 2 pointers for the
TX and RX completion rings.  These pointers are allocated during
ring initialization.  Currntly, we support up to 2 completion rings
for each MSIX.  In order to support more completion rings, we change
this fixed array to a pointer and allocate the required entries
during ring initialization.  This patch keeps the current scheme of
allocating only 2 entries when needed.  Later patches will expand
and allocate more entries when required.

Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c