Skip to content

Commit

Permalink
ixgbe: Do not read the spoofed packets counter when not in IOV mode
Browse files Browse the repository at this point in the history
The counter is not valid unless the controller is running in IOV mode.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Greg Rose authored and Jeff Kirsher committed Sep 24, 2012
1 parent 4b2cd27 commit 0584d99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5560,8 +5560,9 @@ static void ixgbe_spoof_check(struct ixgbe_adapter *adapter)
{
u32 ssvpc;

/* Do not perform spoof check for 82598 */
if (adapter->hw.mac.type == ixgbe_mac_82598EB)
/* Do not perform spoof check for 82598 or if not in IOV mode */
if (adapter->hw.mac.type == ixgbe_mac_82598EB ||
adapter->num_vfs == 0)
return;

ssvpc = IXGBE_READ_REG(&adapter->hw, IXGBE_SSVPC);
Expand Down

0 comments on commit 0584d99

Please sign in to comment.