ethtool: consolidate parameter checking for irq coalescing
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest12 patches 6 repliesIn review
- v212 patches 16 repliesSuperseded
- v112 patches 7 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | ethtool: add infrastructure for centralized checking of coalescing parametersinclude/ net/ | +108 | 3 replies | |
| 2/12 | xgbe: let core reject the unsupported coalescing parametersdrivers/ | +2 | 1 reply | |
| 3/12 | enic: let core reject the unsupported coalescing parametersdrivers/ | +4 | 0 replies | |
| 4/12 | stmmac: let core reject the unsupported coalescing parametersdrivers/ | +2 | 0 replies | |
| 5/12 | nfp: let core reject the unsupported coalescing parametersdrivers/ | +2 | 0 replies | |
| 6/12 | ionic: let core reject the unsupported coalescing parametersdrivers/ | +1 | 0 replies | |
| 7/12 | hisilicon: let core reject the unsupported coalescing parametersdrivers/ | +2 | 0 replies | |
| 8/12 | ice: let core reject the unsupported coalescing parametersdrivers/ | +3 | 0 replies | |
| 9/12 | bnxt: reject unsupported coalescing paramsdrivers/ | +6 | 0 replies | |
| 10/12 | mlx5: reject unsupported coalescing paramsdrivers/ drivers/ drivers/ | +12 | 1 reply | |
| 11/12 | e1000e: reject unsupported coalescing paramsdrivers/ | +1 | 0 replies | |
| 12/12 | virtio_net: reject unsupported coalescing paramsdrivers/ | +3 | 0 replies |
Reviews trailers per patch
7 of 12 patches have a Reviewed-by or Acked-by.
| Patch | Jacob Keller | Michael Chan | Shannon Nelson | Jeff Kirsher | Saeed Mahameed | Michal Kubecek | Andrew Lunn | Tom Lendacky | Alexander Duyck |
|---|---|---|---|---|---|---|---|---|---|
| 1/12 | R-b | R-b | R-b | R-b | |||||
| 2/12 | A-b | ||||||||
| 3/12 | |||||||||
| 4/12 | |||||||||
| 5/12 | |||||||||
| 6/12 | A-b | ||||||||
| 7/12 | |||||||||
| 8/12 | R-b | A-b | |||||||
| 9/12 | R-b | ||||||||
| 10/12 | A-b | ||||||||
| 11/12 | A-b | ||||||||
| 12/12 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.
Cover letter [PATCH net-next v3 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.
v2: fix up ice and virtio conversions
v3: (patch 1)
- move the (temporary) check if driver defines types earlier (Michal)
- rename used_types -> nonzero_params, and coalesce_types -> supported_coalesce_params (Alex)
- use EOPNOTSUPP instead of EINVAL (Andrew, Michal)
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 | 14 +--- include/linux/ethtool.h | 45 ++++++++++++- net/ethtool/ioctl.c | 66 +++++++++++++++++++ 15 files changed, 146 insertions(+), 183 deletions(-)
Signature · 1 line
2.24.1