Skip to content

Commit ebdf7fe

Browse files
Michael Chankuba-moo
authored andcommitted
bnxt_en: Set NPAR 1.2 support when registering with firmware
NPAR (Network interface card partitioning)[1] 1.2 adds a transparent VLAN tag for all packets between the NIC and the switch. Because of that, RX VLAN acceleration cannot be supported for any additional host configured VLANs. The driver has to acknowledge that it can support no RX VLAN acceleration and set the NPAR 1.2 supported flag when registering with the FW. Otherwise, the FW call will fail and the driver will abort on these NPAR 1.2 NICs with this error: bnxt_en 0000:26:00.0 (unnamed net_device) (uninitialized): hwrm req_type 0x1d seq id 0xb error 0x2 [1] https://techdocs.broadcom.com/us/en/storage-and-ethernet-connectivity/ethernet-nic-controllers/bcm957xxx/adapters/introduction/features/network-partitioning-npar.html Reviewed-by: Somnath Kotur <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Signed-off-by: Michael Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4a6f18f commit ebdf7fe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5565,6 +5565,8 @@ int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size,
55655565
if (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)
55665566
flags |= FUNC_DRV_RGTR_REQ_FLAGS_ERROR_RECOVERY_SUPPORT |
55675567
FUNC_DRV_RGTR_REQ_FLAGS_MASTER_SUPPORT;
5568+
if (bp->fw_cap & BNXT_FW_CAP_NPAR_1_2)
5569+
flags |= FUNC_DRV_RGTR_REQ_FLAGS_NPAR_1_2_SUPPORT;
55685570
req->flags = cpu_to_le32(flags);
55695571
req->ver_maj_8b = DRV_VER_MAJ;
55705572
req->ver_min_8b = DRV_VER_MIN;
@@ -8365,6 +8367,7 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
83658367

83668368
switch (resp->port_partition_type) {
83678369
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0:
8370+
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_2:
83688371
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5:
83698372
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR2_0:
83708373
bp->port_partition_type = resp->port_partition_type;
@@ -9529,6 +9532,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
95299532
bp->fw_cap |= BNXT_FW_CAP_HOT_RESET_IF;
95309533
if (BNXT_PF(bp) && (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_FW_LIVEPATCH_SUPPORTED))
95319534
bp->fw_cap |= BNXT_FW_CAP_LIVEPATCH;
9535+
if (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_NPAR_1_2_SUPPORTED)
9536+
bp->fw_cap |= BNXT_FW_CAP_NPAR_1_2;
95329537
if (BNXT_PF(bp) && (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_DFLT_VLAN_TPID_PCP_SUPPORTED))
95339538
bp->fw_cap |= BNXT_FW_CAP_DFLT_VLAN_TPID_PCP;
95349539
if (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_BS_V2_SUPPORTED)

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,7 @@ struct bnxt {
24922492
#define BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX_V3 BIT_ULL(39)
24932493
#define BNXT_FW_CAP_VNIC_RE_FLUSH BIT_ULL(40)
24942494
#define BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS BIT_ULL(41)
2495+
#define BNXT_FW_CAP_NPAR_1_2 BIT_ULL(42)
24952496

24962497
u32 fw_dbg_cap;
24972498

0 commit comments

Comments
 (0)