Skip to content

ethtool: track custom RSS contexts in the core

[email protected] netdev 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest9 patches 1 replyIn review 8 of 9 applied
  2. v79 patches 0 repliesSuperseded
  3. v69 patches 10 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v57 patches13 repliesSuperseded
v47 patches27 repliesSuperseded
v3 RFC7 patches8 repliesSuperseded
v2 RFC7 patches16 repliesSuperseded
v1 RFC6 patches15 repliesSuperseded

Changes in v8 from the cover letter

* use struct_size_t in patch 3 (Przemek)

Patches in v8 8 of 9 applied

#Subject and filesSizeRepliesApplied
1/9net: move ethtool-related netdev state into its own structdrivers/net/ethernet/realtek/r8169_main.c drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +8 more+28 -140 replies
2/9net: ethtool: attach an XArray of custom RSS contexts to a netdeviceinclude/linux/ethtool.h net/core/dev.c+69 -00 repliesApplied
3/9net: ethtool: record custom RSS contexts in the XArrayinclude/linux/ethtool.h net/ethtool/ioctl.c+87 -10 repliesApplied
4/9net: ethtool: let the core choose RSS context IDsinclude/linux/ethtool.h net/core/dev.c net/ethtool/ioctl.c+79 -130 repliesApplied
5/9net: ethtool: add an extack parameter to new rxfh_context APIsinclude/linux/ethtool.h net/core/dev.c net/ethtool/ioctl.c+13 -70 repliesApplied
6/9net: ethtool: add a mutex protecting RSS contextsinclude/linux/ethtool.h net/core/dev.c net/ethtool/ioctl.c+15 -00 repliesApplied
7/9sfc: use new rxfh_context APIdrivers/net/ethernet/sfc/ef10.c drivers/net/ethernet/sfc/ef100_ethtool.c drivers/net/ethernet/sfc/efx.c +10 more+212 -2190 repliesApplied
8/9net: ethtool: use the tracking array for get_rxfh on custom RSS contextsnet/ethtool/ioctl.c+21 -50 repliesApplied
9/9sfc: remove get_rxfh_context dead codedrivers/net/ethernet/sfc/ethtool_common.c+2 -360 repliesApplied

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPrzemek Kitszel
SeriesR-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 net-next 0/9] ethtool: track custom RSS contexts in the core

From: Edward Cree <[email protected]>

Make the core responsible for tracking the set of custom RSS contexts,
their IDs, indirection tables, hash keys, and hash functions; this lets us get rid of duplicative code in drivers, and will allow us to support netlink dumps later.

This series only moves the sfc EF10 & EF100 driver over to the new API;
other drivers (mvpp2, octeontx2, mlx5, sfc/siena, bnxt_en) can be converted afterwards and the legacy API removed.

Changes in v8:
* use struct_size_t in patch 3 (Przemek)

Changes in v7:
* ensure 'ret' is initialised in ethtool_get_rxfh (horms)

Changes in v6:
* fixed kdoc for renamed fields
* always call setter in netdev_rss_contexts_free()
* document that 'create' method should populate ctx for driver-chosen defaults
* on 'ethtool -x', get info from the tracking xarray rather than calling the driver's get_rxfh method. This makes it easier to test that the tracking is correct, in the absence of future code like netlink dumps to use it.

Changes in v5:
* Rebased on top of Ahmed Zaki's struct ethtool_rxfh_param API
* Moved rxfh_max_context_id to the ethtool ops struct

Changes in v4:
* replaced IDR with XArray
* grouped initialisations together in patch 6
* dropped RFC tags

Changes in v3:
* Added WangXun ngbe to patch #1, not sure if they've added WoL support since v2 or if I just missed it last time around
* Re-ordered struct ethtool_netdev_state to avoid hole (Andrew Lunn)
* Fixed some resource leaks in error handling paths (kuba)
* Added maintainers of other context-using drivers to CC

Edward Cree (9):
net: move ethtool-related netdev state into its own struct
net: ethtool: attach an XArray of custom RSS contexts to a netdevice
net: ethtool: record custom RSS contexts in the XArray
net: ethtool: let the core choose RSS context IDs
net: ethtool: add an extack parameter to new rxfh_context APIs
net: ethtool: add a mutex protecting RSS contexts
sfc: use new rxfh_context API
net: ethtool: use the tracking array for get_rxfh on custom RSS
contexts
sfc: remove get_rxfh_context dead code

 drivers/net/ethernet/realtek/r8169_main.c     |   4 +-
 drivers/net/ethernet/sfc/ef10.c               |   2 +-
 drivers/net/ethernet/sfc/ef100_ethtool.c      |   4 +
 drivers/net/ethernet/sfc/efx.c                |   2 +-
 drivers/net/ethernet/sfc/efx.h                |   2 +-
 drivers/net/ethernet/sfc/efx_common.c         |  10 +-
 drivers/net/ethernet/sfc/ethtool.c            |   4 +
 drivers/net/ethernet/sfc/ethtool_common.c     | 168 ++++++++----------
 drivers/net/ethernet/sfc/ethtool_common.h     |  12 ++
 drivers/net/ethernet/sfc/mcdi_filters.c       | 135 +++++++-------
 drivers/net/ethernet/sfc/mcdi_filters.h       |   8 +-
 drivers/net/ethernet/sfc/net_driver.h         |  28 +--
 drivers/net/ethernet/sfc/rx_common.c          |  64 ++-----
 drivers/net/ethernet/sfc/rx_common.h          |   8 +-
 .../net/ethernet/wangxun/ngbe/ngbe_ethtool.c  |   4 +-
 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c |   2 +-
 drivers/net/phy/phy.c                         |   2 +-
 drivers/net/phy/phy_device.c                  |   5 +-
 drivers/net/phy/phylink.c                     |   2 +-
 include/linux/ethtool.h                       | 110 ++++++++++++
 include/linux/netdevice.h                     |   7 +-
 net/core/dev.c                                |  40 +++++
 net/ethtool/ioctl.c                           | 136 +++++++++++++-
 net/ethtool/wol.c                             |   2 +-
 24 files changed, 496 insertions(+), 265 deletions(-)