bnxt_en: Use firmware provided maximum filter counts.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 5 Feb 2024 22:31:50 +0000 (14:31 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Feb 2024 20:37:40 +0000 (12:37 -0800)
commitf42822f22b1c5f72c7e3497d9683f379ab0c5fe4
tree0aec411bc9703332014731f50c56ea7b257cac51
parentf51470c5c4a08d3e69f7c7891633b960aa6fe678
bnxt_en: Use firmware provided maximum filter counts.

While individual filter structures are allocated as needed, there is an
array to keep track of the software filter IDs that we allocate ahead
of time.  Rather than relying on a fixed maximum filter count to
allocate this array, get the maximum from the firmware when available.

Move these filter related maximum counts queried from the firmware to the
bnxt_hw_resc struct.  If the firmware is not providing these maximum
counts, fall back to the hard-coded constant.

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://lore.kernel.org/r/20240205223202.25341-2-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c