From: Tonghao Zhang Date: Sun, 28 Jan 2018 11:53:37 +0000 (-0800) Subject: ixgbe: Avoid to write the RETA table when unnecessary X-Git-Tag: v4.17-rc1~148^2~356^2~11 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=60f4b645492592501868c4b7a361f3f972b73196;p=linux.git ixgbe: Avoid to write the RETA table when unnecessary 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 Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 221f15803480..89edb9fae6f0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -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 */ @@ -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; }