summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt.h
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2023-11-13 16:16:11 -0800
committerDavid S. Miller <davem@davemloft.net>2023-11-15 10:07:39 +0000
commitd1eec614100c25b96b672b50d3125ba3d120b682 (patch)
treedbd66ff04fee01c3c5a6bdd9bb2ce7e9ebbb4768 /drivers/net/ethernet/broadcom/bnxt/bnxt.h
parent7f0a168b0441ef7fd6b46563efb2706c58ac2a4c (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index cf22aae91f70..429df1cf4a6a 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1019,7 +1019,8 @@ struct bnxt_cp_ring_info {
struct bnxt_ring_struct cp_ring_struct;
- struct bnxt_cp_ring_info *cp_ring_arr[2];
+ int cp_ring_count;
+ struct bnxt_cp_ring_info *cp_ring_arr;
#define BNXT_RX_HDL 0
#define BNXT_TX_HDL 1
};