提交 0584d999 编写于 作者: G Greg Rose 提交者: Jeff Kirsher

ixgbe: Do not read the spoofed packets counter when not in IOV mode

The counter is not valid unless the controller is running in IOV mode.
Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 4b2cd27f
...@@ -5560,8 +5560,9 @@ static void ixgbe_spoof_check(struct ixgbe_adapter *adapter) ...@@ -5560,8 +5560,9 @@ static void ixgbe_spoof_check(struct ixgbe_adapter *adapter)
{ {
u32 ssvpc; u32 ssvpc;
/* Do not perform spoof check for 82598 */ /* Do not perform spoof check for 82598 or if not in IOV mode */
if (adapter->hw.mac.type == ixgbe_mac_82598EB) if (adapter->hw.mac.type == ixgbe_mac_82598EB ||
adapter->num_vfs == 0)
return; return;
ssvpc = IXGBE_READ_REG(&adapter->hw, IXGBE_SSVPC); ssvpc = IXGBE_READ_REG(&adapter->hw, IXGBE_SSVPC);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册