• Somnath Kotur's avatar
    bnxt_en: Query default VLAN before VNIC setup on a VF · 1a9e4f50
    Somnath Kotur authored
    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: cf6645f8 ("bnxt_en: Add function for VF driver to query default VLAN.")
    Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
    Signed-off-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    1a9e4f50
bnxt.c 364 KB