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>
This commit is contained in:
parent
51c24aaaca
commit
1ada1b1b41
1 changed files with 4 additions and 2 deletions
|
@ -2432,15 +2432,17 @@ static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
|
||||||
{
|
{
|
||||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||||
struct ixgbe_hw *hw = &adapter->hw;
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
|
int pool_ndx = adapter->num_vfs;
|
||||||
|
|
||||||
/* add VID to filter table */
|
/* add VID to filter table */
|
||||||
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
|
hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
|
static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
|
||||||
{
|
{
|
||||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||||
struct ixgbe_hw *hw = &adapter->hw;
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
|
int pool_ndx = adapter->num_vfs;
|
||||||
|
|
||||||
if (!test_bit(__IXGBE_DOWN, &adapter->state))
|
if (!test_bit(__IXGBE_DOWN, &adapter->state))
|
||||||
ixgbe_irq_disable(adapter);
|
ixgbe_irq_disable(adapter);
|
||||||
|
@ -2451,7 +2453,7 @@ static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
|
||||||
ixgbe_irq_enable(adapter);
|
ixgbe_irq_enable(adapter);
|
||||||
|
|
||||||
/* remove VID from filter table */
|
/* remove VID from filter table */
|
||||||
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
|
hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ixgbe_vlan_rx_register(struct net_device *netdev,
|
static void ixgbe_vlan_rx_register(struct net_device *netdev,
|
||||||
|
|
Reference in a new issue