mbox series

[RFC,0/6] net/mlx5e: Improve ethtool coalesce support and support per-queue configuration

Message ID 20240306230439.647123-1-rrameshbabu@nvidia.com (mailing list archive)
Headers show
Series net/mlx5e: Improve ethtool coalesce support and support per-queue configuration | expand

Message

Rahul Rameshbabu March 6, 2024, 11:04 p.m. UTC
This series introduces enhancements for ethtool coalescing support.

* We added support for on-the-fly cq_period_mode changes for mlx5 device MODIFY_CQ commands
  - This removes the need to tear down and create new channels for reconfiguring coalescing
* We also now support per-channel coalescing configuration.

We noticed that mlx5 devices were in fact in some cases not being configured
correctly based. Some cases include impacting tx queue coalescing parameters
when adaptive-rx is tuned on from the off state, etc. We end up fixing these
issues as well in this series and hope that now whatever state displayed in
ethtool -c <ifname> reflects the device state. The exception is when DIM is
enabled and the state can properly be observed using the per-channel coalescing
options in ethtool.

We would like to thank Joe Damato and Nabil Alramli for their submission to the
mailing list that inspired the work on this series [1]. We would like to get
their Signed-off-by trailers and accredit them as co-developers of this series.

[1] https://lore.kernel.org/netdev/20230918222955.2066-1-dev@nalramli.com/

Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>

Rahul Rameshbabu (6):
  net/mlx5e: Move DIM function declarations to en/dim.h
  net/mlx5e: Use DIM constants for CQ period mode parameter
  net/mlx5e: Dynamically allocate DIM structure for SQs/RQs
  net/mlx5e: Introduce per-channel coalescing parameters with global
    coalescing support
  net/mlx5e: Support updating coalescing configuration without resetting
    channels
  net/mlx5e: Implement ethtool callbacks for supporting per-queue
    coalescing

 drivers/net/ethernet/mellanox/mlx5/core/en.h  |  36 +-
 .../ethernet/mellanox/mlx5/core/en/channels.c |  83 +++++
 .../ethernet/mellanox/mlx5/core/en/channels.h |   4 +
 .../net/ethernet/mellanox/mlx5/core/en/dim.h  |  45 +++
 .../ethernet/mellanox/mlx5/core/en/params.c   |  72 +---
 .../ethernet/mellanox/mlx5/core/en/params.h   |   5 -
 .../net/ethernet/mellanox/mlx5/core/en_dim.c  |  95 +++++-
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  | 307 ++++++++++++++----
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 209 ++++++++++--
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |  10 +-
 .../net/ethernet/mellanox/mlx5/core/en_txrx.c |   4 +-
 include/linux/mlx5/cq.h                       |   7 +-
 include/linux/mlx5/mlx5_ifc.h                 |   7 +-
 13 files changed, 685 insertions(+), 199 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/dim.h