Skip to content

Commit

Permalink
ixgbe: Avoid to write the RETA table when unnecessary
Browse files Browse the repository at this point in the history
If indir == 0 in the ixgbe_set_rxfh(), it is unnecessary
to write the HW. Because redirection table is not changed.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Tonghao Zhang authored and Jeff Kirsher committed Feb 26, 2018
1 parent 8f611fb commit 60f4b64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3059,6 +3059,8 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir,

for (i = 0; i < reta_entries; i++)
adapter->rss_indir_tbl[i] = indir[i];

ixgbe_store_reta(adapter);
}

/* Fill out the rss hash key */
Expand All @@ -3067,8 +3069,6 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir,
ixgbe_store_key(adapter);
}

ixgbe_store_reta(adapter);

return 0;
}

Expand Down

0 comments on commit 60f4b64

Please sign in to comment.