mbox series

[v5,net-next,0/7] ethtool: track custom RSS contexts in the core

Message ID cover.1718750586.git.ecree.xilinx@gmail.com (mailing list archive)
Headers show
Series ethtool: track custom RSS contexts in the core | expand

Message

edward.cree@amd.com June 18, 2024, 10:44 p.m. UTC
From: Edward Cree <ecree.xilinx@gmail.com>

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) can be converted afterwards
 and the legacy API removed.

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

 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     | 148 ++++++++++--------
 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                       | 107 +++++++++++++
 include/linux/netdevice.h                     |   7 +-
 net/core/dev.c                                |  43 +++++
 net/ethtool/ioctl.c                           | 110 ++++++++++++-
 net/ethtool/wol.c                             |   2 +-
 24 files changed, 480 insertions(+), 235 deletions(-)

Comments

Jakub Kicinski June 19, 2024, 12:19 a.m. UTC | #1
On Tue, 18 Jun 2024 23:44:20 +0100 edward.cree@amd.com wrote:
> 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) can be converted afterwards
>  and the legacy API removed.

LGTM!

I'll take a stab at bnxt conversion tomorrow. Do you have any tests 
or should I try to produce some as well?
Edward Cree June 19, 2024, noon UTC | #2
On 19/06/2024 01:19, Jakub Kicinski wrote:
> I'll take a stab at bnxt conversion tomorrow. Do you have any tests 
> or should I try to produce some as well?

I don't have any tests, no; that would be great.

-ed