From: Tariq Toukan <tariqt@nvidia.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Dragos Tatulea <dtatulea@nvidia.com>,
Gal Pressman <gal@nvidia.com>, "Joe Damato" <joe@dama.to>,
Leon Romanovsky <leon@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
"Nabil S. Alramli" <dev@nalramli.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Yael Chemla <ychemla@nvidia.com>
Subject: [PATCH net 0/3] net/mlx5e: Fix CQE moderation mode reporting and control
Date: Wed, 14 Oct 2026 15:47:01 +0300 [thread overview]
Message-ID: <20261014124704.1017782-1-tariqt@nvidia.com> (raw)
Hi,
This series by Yael fixes inconsistencies in how mlx5e reports and
configures the CQE moderation mode through ethtool.
mlx5e_params keeps two representations of CQE moderation: the private
flags (MLX5E_PFLAG_RX_CQE_BASED_MODER, MLX5E_PFLAG_TX_CQE_BASED_MODER)
and the fields rx_moder_use_cqe_mode / tx_moder_use_cqe_mode. Ethtool
get/set coalesce uses the fields, while the priv-flags path uses the
pflags. When the two disagree, the reported CQE moderation state is
wrong. In addition, commit bc541621f8ba ("net/mlx5e: Support ethtool cq
mode") added ETHTOOL_COALESCE_USE_CQE to the NIC ethtool ops but not to
the representor ones.
Patch 1 syncs the pflags with the capability-derived fields in
mlx5e_build_nic_params(), so that after channel attach or reopen the
private flags no longer remain zero while the fields reflect the
hardware configuration.
Patch 2 fixes the opposite direction. set_pflag_cqe_based_moder() now
also updates rx_moder_use_cqe_mode / tx_moder_use_cqe_mode, and resets
the RX/TX CQ moderation to the defaults of the new period mode, so that
ethtool -c no longer reports a stale CQE mode or stale rx-usecs after
toggling the priv flag.
Patch 3 adds ETHTOOL_COALESCE_USE_CQE to mlx5e_rep_ethtool_ops, so that
setting cqe-mode-rx/tx on a representor is no longer rejected with
EINVAL.
Regards,
Tariq
Yael Chemla (3):
net/mlx5e: Sync CQE moderation pflags with coalesce params
net/mlx5e: Sync CQE moderation params with pflags in
set_pflag_cqe_based_moder
net/mlx5e: Expose CQE moderation mode on representors
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++++++
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
base-commit: af32da41b0327b9c6a37856ba82b6760d6c8d10e
--
2.44.0
next reply other threads:[~2026-10-14 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 12:47 Tariq Toukan [this message]
2026-10-14 12:47 ` [PATCH net 1/3] net/mlx5e: Sync CQE moderation pflags with coalesce params Tariq Toukan
2026-10-14 12:47 ` [PATCH net 2/3] net/mlx5e: Sync CQE moderation params with pflags in set_pflag_cqe_based_moder Tariq Toukan
2026-10-14 12:47 ` [PATCH net 3/3] net/mlx5e: Expose CQE moderation mode on representors Tariq Toukan
2026-10-14 12:55 ` [PATCH net 0/3] net/mlx5e: Fix CQE moderation mode reporting and control netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261014124704.1017782-1-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dev@nalramli.com \
--cc=dtatulea@nvidia.com \
--cc=edumazet@kernel.org \
--cc=gal@nvidia.com \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=ychemla@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox