[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200304035501.628139-1-kuba@kernel.org>
Date: Tue, 3 Mar 2020 19:54:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net
Cc: mkubecek@...e.cz, thomas.lendacky@....com, benve@...co.com,
_govind@....com, pkaustub@...co.com, peppe.cavallaro@...com,
alexandre.torgue@...com, joabreu@...opsys.com, snelson@...sando.io,
yisen.zhuang@...wei.com, salil.mehta@...wei.com,
jeffrey.t.kirsher@...el.com, jacob.e.keller@...el.com,
alexander.h.duyck@...ux.intel.com, michael.chan@...adcom.com,
saeedm@...lanox.com, leon@...nel.org, netdev@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH net-next 00/12] ethtool: consolidate parameter checking for irq coalescing
Hi!
This set aims to simplify and unify the unsupported irq
coalescing parameter handling.
First patch adds a bitmask which drivers should fill in
in their ethtool_ops structs to declare which parameters
they support. Core will then ensure that driver callback
won't see any parameter outside of that set.
This allows us to save some LoC and make sure all drivers
respond the same to unsupported parameters.
If any parameter driver does not support is set to a value
other than 0 core will return -EINVAL. In the future we can
reject any present but unsupported netlink attribute, without
assuming 0 means unset. We can also add some prints or extack,
perhaps a'la Intel's current code.
I started converting the drivers alphabetically but then
realized that for the first set it's probably best to
address a representative mix of actively developed drivers.
According to my unreliable math there are roughly 69 drivers
in the tree which support some form of interrupt coalescing
settings via ethtool. Of these roughly 17 reject parameters
they don't support.
I hope drivers which ignore the parameters don't care, and
won't care about the slight change in behavior. Once all
drivers are converted we can make the checking mandatory.
I've only tested the e1000e and virtio patches, the rest builds.
Jakub Kicinski (12):
ethtool: add infrastructure for centralized checking of coalescing
parameters
xgbe: let core reject the unsupported coalescing parameters
enic: let core reject the unsupported coalescing parameters
stmmac: let core reject the unsupported coalescing parameters
nfp: let core reject the unsupported coalescing parameters
ionic: let core reject the unsupported coalescing parameters
hisilicon: let core reject the unsupported coalescing parameters
ice: let core reject the unsupported coalescing parameters
bnxt: reject unsupported coalescing params
mlx5: reject unsupported coalescing params
e1000e: reject unsupported coalescing params
virtio_net: reject unsupported coalescing params
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 +-------
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 ++
.../net/ethernet/cisco/enic/enic_ethtool.c | 23 ++-----
drivers/net/ethernet/hisilicon/hip04_eth.c | 16 +----
drivers/net/ethernet/intel/e1000e/ethtool.c | 1 +
drivers/net/ethernet/intel/ice/ice_ethtool.c | 59 +----------------
.../ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +
.../net/ethernet/mellanox/mlx5/core/en_rep.c | 6 ++
.../mellanox/mlx5/core/ipoib/ethtool.c | 3 +
.../ethernet/netronome/nfp/nfp_net_ethtool.c | 22 +------
.../ethernet/pensando/ionic/ionic_ethtool.c | 23 +------
.../ethernet/stmicro/stmmac/stmmac_ethtool.c | 16 +----
drivers/net/virtio_net.c | 1 +
include/linux/ethtool.h | 44 ++++++++++++-
net/ethtool/ioctl.c | 63 +++++++++++++++++++
15 files changed, 140 insertions(+), 172 deletions(-)
--
2.24.1
Powered by blists - more mailing lists