bnxt_en: Refactor ring reservation functions
authorMichael Chan <michael.chan@broadcom.com>
Tue, 20 Feb 2024 23:03:08 +0000 (15:03 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 22 Feb 2024 14:31:22 +0000 (15:31 +0100)
commit257bbf45af81bac9b0e38be530a554e2cff92700
treeb94c7928cd903317d4e0c2d0fde76e48deac0af8
parente7b83f2fa445290f4ce906367ccfc8d184a98249
bnxt_en: Refactor ring reservation functions

The current functions to reserve hardware rings pass in 6 different ring
or resource types as parameters.  Add a structure bnxt_hw_rings to
consolidate all these parameters and pass the structure pointer instead
to these functions.  Add 2 related helper functions also.  This makes
the code cleaner and makes it easier to add new resources to be
reserved.

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h