提交 96cc6372 编写于 作者: A Alexander Duyck 提交者: Jeff Kirsher

ixgbe: limit VF access to network traffic

This change fixes VM pool allocation issues based on MAC address filtering,
as well as limits the scope of VF access to promiscuous mode.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Acked-by: NGreg Rose <gregory.v.rose@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 a124339a
...@@ -1370,6 +1370,9 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw) ...@@ -1370,6 +1370,9 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw)
hw_dbg(hw, " New MAC Addr =%pM\n", hw->mac.addr); hw_dbg(hw, " New MAC Addr =%pM\n", hw->mac.addr);
hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
/* clear VMDq pool/queue selection for RAR 0 */
hw->mac.ops.clear_vmdq(hw, 0, IXGBE_CLEAR_VMDQ_ALL);
} }
hw->addr_ctrl.overflow_promisc = 0; hw->addr_ctrl.overflow_promisc = 0;
......
...@@ -110,12 +110,10 @@ static int ixgbe_set_vf_vlan(struct ixgbe_adapter *adapter, int add, int vid, ...@@ -110,12 +110,10 @@ static int ixgbe_set_vf_vlan(struct ixgbe_adapter *adapter, int add, int vid,
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);
} }
static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe) static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe)
{ {
u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
vmolr |= (IXGBE_VMOLR_ROMPE | vmolr |= (IXGBE_VMOLR_ROMPE |
IXGBE_VMOLR_ROPE |
IXGBE_VMOLR_BAM); IXGBE_VMOLR_BAM);
if (aupe) if (aupe)
vmolr |= IXGBE_VMOLR_AUPE; vmolr |= IXGBE_VMOLR_AUPE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册