bnxt_en: Support dynamic MSIX
authorMichael Chan <michael.chan@broadcom.com>
Wed, 28 Aug 2024 18:32:35 +0000 (11:32 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Aug 2024 22:33:25 +0000 (15:33 -0700)
commite68256c8a73cafacc7976bb80359511ee0d0ab91
treea1c000e18c67f5de7e835ae5af78bbd2440478ee
parentf049d699aeee219ca33d08b48b7e14d7d86aebd5
bnxt_en: Support dynamic MSIX

A range of MSIX vectors are allocated at initialization for the number
needed for RocE and L2.  During run-time, if the user increases or
decreases the number of L2 rings, all the MSIX vectors have to be
freed and a new range has to be allocated.  This is not optimal and
causes disruptions to RoCE traffic every time there is a change in L2
MSIX.

If the system supports dynamic MSIX allocations, use dynamic
allocation to add new L2 MSIX vectors or free unneeded L2 MSIX
vectors.  RoCE traffic is not affected using this scheme.

Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20240828183235.128948-10-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c