netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/12] ethtool: consolidate parameter checking for irq coalescing
@ 2020-03-05  5:15 Jakub Kicinski
  2020-03-05  5:15 ` [PATCH net-next v3 01/12] ethtool: add infrastructure for centralized checking of coalescing parameters Jakub Kicinski
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Jakub Kicinski @ 2020-03-05  5:15 UTC (permalink / raw)
  To: davem
  Cc: andrew, ecree, mkubecek, thomas.lendacky, benve, _govind,
	peppe.cavallaro, alexandre.torgue, joabreu, snelson,
	yisen.zhuang, salil.mehta, jeffrey.t.kirsher, jacob.e.keller,
	alexander.h.duyck, michael.chan, saeedm, leon, netdev,
	Jakub Kicinski

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(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-03-05 20:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05  5:15 [PATCH net-next v3 00/12] ethtool: consolidate parameter checking for irq coalescing Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 01/12] ethtool: add infrastructure for centralized checking of coalescing parameters Jakub Kicinski
2020-03-05 13:13   ` Michal Kubecek
2020-03-05 13:27   ` Andrew Lunn
2020-03-05 16:24   ` Alexander Duyck
2020-03-05  5:15 ` [PATCH net-next v3 02/12] xgbe: let core reject the unsupported " Jakub Kicinski
2020-03-05 14:30   ` Tom Lendacky
2020-03-05  5:15 ` [PATCH net-next v3 03/12] enic: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 04/12] stmmac: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 05/12] nfp: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 06/12] ionic: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 07/12] hisilicon: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 08/12] ice: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 09/12] bnxt: reject unsupported coalescing params Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 10/12] mlx5: " Jakub Kicinski
2020-03-05  8:14   ` Saeed Mahameed
2020-03-05  5:15 ` [PATCH net-next v3 11/12] e1000e: " Jakub Kicinski
2020-03-05  5:15 ` [PATCH net-next v3 12/12] virtio_net: " Jakub Kicinski
2020-03-05 20:17 ` [PATCH net-next v3 00/12] ethtool: consolidate parameter checking for irq coalescing David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).