diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-05-15 12:49:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-16 13:56:30 -0700 |
commit | 75c36dbb1c3790eab909344b758decce6bb432da (patch) | |
tree | 1410fe5fb02e10ba1bd995ecc3cdfe4e9e91a8ee /net/ethtool | |
parent | 4df6ff2a99920254ce8c2a3c418ddabc69ff16fe (diff) | |
download | linux-75c36dbb1c3790eab909344b758decce6bb432da.tar.gz linux-75c36dbb1c3790eab909344b758decce6bb432da.tar.bz2 linux-75c36dbb1c3790eab909344b758decce6bb432da.zip |
ethtool: don't call set_channels in drivers if config didn't change
Don't call drivers if nothing changed. Netlink code already
contains this logic.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool')
-rw-r--r-- | net/ethtool/ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index a574d60111fa..eeb1137a3f23 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -1669,6 +1669,12 @@ static noinline_for_stack int ethtool_set_channels(struct net_device *dev, dev->ethtool_ops->get_channels(dev, &curr); + if (channels.rx_count == curr.rx_count && + channels.tx_count == curr.tx_count && + channels.combined_count == curr.combined_count && + channels.other_count == curr.other_count) + return 0; + /* ensure new counts are within the maximums */ if (channels.rx_count > curr.max_rx || channels.tx_count > curr.max_tx || |