bnxt_en: Refactor VNIC alloc and cfg functions
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Mon, 25 Mar 2024 22:28:54 +0000 (15:28 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 05:34:40 +0000 (22:34 -0700)
commita4c11166a69619f1fd0118a0790c46872836240a
tree184c4c5650ee0a38ba54bcfdee94a88b92362290
parent1dcd70ba2437b52d18f3ad4cc65931a74bdcb353
bnxt_en: Refactor VNIC alloc and cfg functions

The current VNIC structures are stored in an array bp->vnic_info[].
The index of the array (vnic_id) is passed to all the functions that
need to reference the VNIC.

This patch changes the scheme to pass the VNIC pointer instead of the
vnic index.  Subsequent patches will create additional VNICs that
will not be stored in the bp->vnic_info[] array.  Using the VNIC
pointer will work for all the VNICs.

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20240325222902.220712-5-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_ulp.c