Commit b35d4d42 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

ixgbe: Fix ordering of things so that PF correctly configures its VLANs

The PF was not correctly registering any of its VLANs.  As a result any
VLAN tagged traffic from the VF would not be delivered to the PF because
the VLAN was never assigned to the PF pool.

In addition the VF was not allowed to receive traffic from VLAN 0 if it was
allowed to receive untagged frames.  This change corrects that so that it
will correctly receive traffic from VLAN 0.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: default avatarSibai Li <sibai.li@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 2f66fd36
...@@ -3660,8 +3660,6 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter) ...@@ -3660,8 +3660,6 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
if (hw->mac.type == ixgbe_mac_82598EB) if (hw->mac.type == ixgbe_mac_82598EB)
netif_set_gso_max_size(adapter->netdev, 32768); netif_set_gso_max_size(adapter->netdev, 32768);
hw->mac.ops.set_vfta(&adapter->hw, 0, 0, true);
#ifdef IXGBE_FCOE #ifdef IXGBE_FCOE
if (adapter->netdev->features & NETIF_F_FCOE_MTU) if (adapter->netdev->features & NETIF_F_FCOE_MTU)
max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE); max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
...@@ -3861,6 +3859,11 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter) ...@@ -3861,6 +3859,11 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter)
#ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB
ixgbe_configure_dcb(adapter); ixgbe_configure_dcb(adapter);
#endif #endif
/*
* We must restore virtualization before VLANs or else
* the VLVF registers will not be populated
*/
ixgbe_configure_virtualization(adapter);
ixgbe_set_rx_mode(adapter->netdev); ixgbe_set_rx_mode(adapter->netdev);
ixgbe_restore_vlan(adapter); ixgbe_restore_vlan(adapter);
...@@ -3892,8 +3895,6 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter) ...@@ -3892,8 +3895,6 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter)
break; break;
} }
ixgbe_configure_virtualization(adapter);
#ifdef IXGBE_FCOE #ifdef IXGBE_FCOE
/* configure FCoE L2 filters, redirection table, and Rx control */ /* configure FCoE L2 filters, redirection table, and Rx control */
ixgbe_configure_fcoe(adapter); ixgbe_configure_fcoe(adapter);
......
...@@ -346,6 +346,10 @@ void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter) ...@@ -346,6 +346,10 @@ void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter)
static int ixgbe_set_vf_vlan(struct ixgbe_adapter *adapter, int add, int vid, static int ixgbe_set_vf_vlan(struct ixgbe_adapter *adapter, int add, int vid,
u32 vf) u32 vf)
{ {
/* VLAN 0 is a special case, don't allow it to be removed */
if (!vid && !add)
return 0;
return adapter->hw.mac.ops.set_vfta(&adapter->hw, vid, vf, (bool)add); return adapter->hw.mac.ops.set_vfta(&adapter->hw, vid, vf, (bool)add);
} }
...@@ -414,6 +418,7 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) ...@@ -414,6 +418,7 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
VLAN_PRIO_SHIFT)), vf); VLAN_PRIO_SHIFT)), vf);
ixgbe_set_vmolr(hw, vf, false); ixgbe_set_vmolr(hw, vf, false);
} else { } else {
ixgbe_set_vf_vlan(adapter, true, 0, vf);
ixgbe_set_vmvir(adapter, 0, vf); ixgbe_set_vmvir(adapter, 0, vf);
ixgbe_set_vmolr(hw, vf, true); ixgbe_set_vmolr(hw, vf, true);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment