bnxt_en: Add bnxt_setup_ctxm_pg_tbls() helper function
authorMichael Chan <michael.chan@broadcom.com>
Mon, 20 Nov 2023 23:43:58 +0000 (15:43 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 22 Nov 2023 01:32:48 +0000 (17:32 -0800)
commitb098dc5a3357e5791dd397716737cd8bdfd9a8f5
tree7d8954bbb92a886e64ffdbebb2253049d2aefdc3
parent2ad67aea11f256c7ad7bdc66c0521d7ff71dd8da
bnxt_en: Add bnxt_setup_ctxm_pg_tbls() helper function

In bnxt_alloc_ctx_mem(), the logic to set up the context memory entries
and to allocate the context memory tables is done repetitively.  Add
a helper function to simplify the code.

The setup of the Fast Path TQM entries relies on some information from
the Slow Path TQM entries.  Copy the SP_TQM entries to the FP_TQM
entries to simplify the logic.

Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231120234405.194542-7-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c