summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-05-23 05:39:25 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-09-15 15:47:23 -0700
commitb35d4d423c602c44d57c43347c0705a12eec6538 (patch)
tree5aa8fed4e360f95e76efdd41f0621a1760c32d59 /drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
parent2f66fd36a2be8e97a0ea774ba186adf24882cd10 (diff)
downloadop-kernel-dev-b35d4d423c602c44d57c43347c0705a12eec6538.zip
op-kernel-dev-b35d4d423c602c44d57c43347c0705a12eec6538.tar.gz
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: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 4fea871..3b1c914 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -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,
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);
}
@@ -414,6 +418,7 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
VLAN_PRIO_SHIFT)), vf);
ixgbe_set_vmolr(hw, vf, false);
} else {
+ ixgbe_set_vf_vlan(adapter, true, 0, vf);
ixgbe_set_vmvir(adapter, 0, vf);
ixgbe_set_vmolr(hw, vf, true);
}
OpenPOWER on IntegriCloud