Skip to content

Commit 1a9e4f5

Browse files
skotur-brcmPaolo Abeni
authored andcommitted
bnxt_en: Query default VLAN before VNIC setup on a VF
We need to call bnxt_hwrm_func_qcfg() on a VF to query the default VLAN that may be setup by the PF. If a default VLAN is enabled, the VF cannot support VLAN acceleration on the receive side and the VNIC must be setup to strip out the default VLAN tag. If a default VLAN is not enabled, the VF can support VLAN acceleration on the receive side. The VNIC should be set up to strip or not strip the VLAN based on the RX VLAN acceleration setting. Without this call to determine the default VLAN before calling bnxt_setup_vnic(), the VNIC may not be set up correctly. For example, bnxt_setup_vnic() may set up to strip the VLAN tag based on stale default VLAN information. If RX VLAN acceleration is not enabled, the VLAN tag will be incorrectly stripped and the RX data path will not work correctly. Fixes: cf6645f ("bnxt_en: Add function for VF driver to query default VLAN.") Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Somnath Kotur <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 1d99780 commit 1a9e4f5

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8813,6 +8813,9 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
88138813
goto err_out;
88148814
}
88158815

8816+
if (BNXT_VF(bp))
8817+
bnxt_hwrm_func_qcfg(bp);
8818+
88168819
rc = bnxt_setup_vnic(bp, 0);
88178820
if (rc)
88188821
goto err_out;

0 commit comments

Comments
 (0)