bnxt_en: Simplify bnxt_rfs_capable()
authorMichael Chan <michael.chan@broadcom.com>
Mon, 25 Mar 2024 22:28:57 +0000 (15:28 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 05:34:40 +0000 (22:34 -0700)
commitb09353437b28ff8786e60aa9bd560a4474facfc0
tree8579db7d747c37368838a7cd92f2aee1543057bf
parentecb342bb6098fa13f2719f8baaab4475e404f784
bnxt_en: Simplify bnxt_rfs_capable()

bnxt_rfs_capable() determines the number of VNICs and RSS_CTXs
required to support aRFS and then reserves the resources.  We already
have functions bnxt_get_total_vnics() and bnxt_get_total_rss_ctxs()
to do that.  Simplify the code by calling these functions.  It is
also more correct to do the resource reservation after
bnxt_can_reserve_rings() returns true.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20240325222902.220712-8-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c