mbox series

[net-next,0/3] ethtool: set_channels: add a few more checks

Message ID 20200515194902.3103469-1-kuba@kernel.org
Headers show
Series ethtool: set_channels: add a few more checks | expand

Message

Jakub Kicinski May 15, 2020, 7:48 p.m. UTC
There seems to be a few more things we can check in the core before
we call drivers' ethtool_ops->set_channels. Adding the checks to
the core simplifies the drivers. This set only includes changes
to the NFP driver as an example.

There is a small risk in the first patch that someone actually
purposefully accepts a strange configuration without RX or TX
channels, but I couldn't find such a driver in the tree.

Jakub Kicinski (3):
  ethtool: check if there is at least one channel for TX/RX in the core
  nfp: don't check lack of RX/TX channels
  ethtool: don't call set_channels in drivers if config didn't change

 .../ethernet/netronome/nfp/nfp_net_ethtool.c  |  3 +--
 net/ethtool/channels.c                        | 20 +++++++++++++++++--
 net/ethtool/ioctl.c                           | 11 ++++++++++
 3 files changed, 30 insertions(+), 4 deletions(-)