|
|
Log in / Subscribe / Register

net/mlx5e: Improve ethtool coalesce support and support per-queue configuration

From:  Rahul Rameshbabu <rrameshbabu-AT-nvidia.com>
To:  netdev-AT-vger.kernel.org
Subject:  [PATCH RFC 0/6] net/mlx5e: Improve ethtool coalesce support and support per-queue configuration
Date:  Wed, 06 Mar 2024 15:04:16 -0800
Message-ID:  <20240306230439.647123-1-rrameshbabu@nvidia.com>
Cc:  Gal Pressman <gal-AT-nvidia.com>, Tariq Toukan <tariqt-AT-nvidia.com>, Saeed Mahameed <saeedm-AT-nvidia.com>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>, Eric Dumazet <edumazet-AT-google.com>, "David S. Miller" <davem-AT-davemloft.net>, "Nabil S . Alramli" <dev-AT-nalramli.com>, Joe Damato <jdamato-AT-fastly.com>, Rahul Rameshbabu <rrameshbabu-AT-nvidia.com>
Archive-link:  Article

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@...

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

-- 
2.42.0




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds