diff options
author | Greg Rose <gregory.v.rose@intel.com> | 2010-01-22 17:45:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 04:13:54 -0500 |
commit | 1ada1b1b41b0e54291aca67eed4bd42e61e7e529 (patch) | |
tree | ef5f64367072f96f50963d1f3d1f8e75f4c10880 /drivers/net/ixgbe/ixgbe_main.c | |
parent | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (diff) |
ixgbe: Set the correct pool when VLANs are added in SR-IOV mode.
When VFs are allocated (as indicated by adapter->num_vfs is non-zero) then
the PF pool is no longer zero. Instead it will be the same as the number
of VFs allocated. When setting the VLVF entry for the PF we need to use
the correct pool otherwise the PF will get VLAN packets from the wire
because the packet will pass VFTA filtering and the PF has the default
pool, but it will not get VLAN packets from the VFs because it has
not set the correct pool bit in the VLVF entry.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index c46252520d7a..b8fd81748602 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2432,15 +2432,17 @@ static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | |||
2432 | { | 2432 | { |
2433 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 2433 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
2434 | struct ixgbe_hw *hw = &adapter->hw; | 2434 | struct ixgbe_hw *hw = &adapter->hw; |
2435 | int pool_ndx = adapter->num_vfs; | ||
2435 | 2436 | ||
2436 | /* add VID to filter table */ | 2437 | /* add VID to filter table */ |
2437 | hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true); | 2438 | hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, true); |
2438 | } | 2439 | } |
2439 | 2440 | ||
2440 | static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 2441 | static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
2441 | { | 2442 | { |
2442 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 2443 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
2443 | struct ixgbe_hw *hw = &adapter->hw; | 2444 | struct ixgbe_hw *hw = &adapter->hw; |
2445 | int pool_ndx = adapter->num_vfs; | ||
2444 | 2446 | ||
2445 | if (!test_bit(__IXGBE_DOWN, &adapter->state)) | 2447 | if (!test_bit(__IXGBE_DOWN, &adapter->state)) |
2446 | ixgbe_irq_disable(adapter); | 2448 | ixgbe_irq_disable(adapter); |
@@ -2451,7 +2453,7 @@ static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | |||
2451 | ixgbe_irq_enable(adapter); | 2453 | ixgbe_irq_enable(adapter); |
2452 | 2454 | ||
2453 | /* remove VID from filter table */ | 2455 | /* remove VID from filter table */ |
2454 | hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false); | 2456 | hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, false); |
2455 | } | 2457 | } |
2456 | 2458 | ||
2457 | static void ixgbe_vlan_rx_register(struct net_device *netdev, | 2459 | static void ixgbe_vlan_rx_register(struct net_device *netdev, |