From: Tariq Toukan <tariqt@nvidia.com>
To: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Cc: Jiri Pirko <jiri@resnulli.us>, Jonathan Corbet <corbet@lwn.net>,
"Leon Romanovsky" <leon@kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
<netdev@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
<bpf@vger.kernel.org>, Gal Pressman <gal@nvidia.com>,
Cosmin Ratiu <cratiu@nvidia.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
Jiri Pirko <jiri@nvidia.com>
Subject: [PATCH net-next 00/10] net/mlx5e: Use multiple doorbells
Date: Wed, 10 Sep 2025 13:24:41 +0300 [thread overview]
Message-ID: <1757499891-596641-1-git-send-email-tariqt@nvidia.com> (raw)
Hi,
This series by Cosmin adds multiple doorbells usage in mlx5e driver.
See detailed description by Cosmin below [1].
Regards,
Tariq
[1]
mlx5e uses a single MMIO-mapped doorbell per netdevice for all send and
receive operations. Writes to the doorbell go over the PCIe bus directly
to the device, which then services the indicated queues.
On certain architectures and with sufficiently high volume of doorbell
ringing (many cores, many active channels, small MTU, no GSO, etc.), the
MMIO-mapped doorbell address can become contended, leading to delays in
servicing writes to that address and a global slowdown of all traffic
for that netdevice.
mlx5 NICs have supported using multiple doorbells for many years, the
mlx5_ib driver for the same hardware has been using multiple doorbells
traditionally.
This patch series extends the mlx5 Ethernet driver to also use multiple
doorbells to solve the MMIO contention issues. By allocating and using
more doorbells for all channel queues (TX and RX), the MMIO contention
on any particular doorbell address is reduced significantly.
The first patches are cleanups:
net/mlx5: Fix typo of MLX5_EQ_DOORBEL_OFFSET
net/mlx5: Remove unused 'offset' field from struct mlx5_sq_bfreg'
net/mlx5e: Remove unused 'xsk' param of mlx5e_build_xdpsq_param
The next patch separates the global doorbell from Ethernet-specific
resources:
net/mlx5: Store the global doorbell in mlx5_priv
Next, plumbing to allow a different doorbell to be used for channel TX
and RX queues:
net/mlx5e: Prepare for using multiple TX doorbells
net/mlx5e: Prepare for using different CQ doorbells
Then, enable using multiple doorbells for channel queues:
net/mlx5e: Use multiple TX doorbells
net/mlx5e: Use multiple CQ doorbells
Finally, introduce a devlink parameter to control this:
devlink: Add a 'num_doorbells' driverinit param
net/mlx5e: Use the 'num_doorbells' devlink param
Cosmin Ratiu (10):
net/mlx5: Fix typo of MLX5_EQ_DOORBEL_OFFSET
net/mlx5: Remove unused 'offset' field from mlx5_sq_bfreg
net/mlx5e: Remove unused 'xsk' param of mlx5e_build_xdpsq_param
net/mlx5: Store the global doorbell in mlx5_priv
net/mlx5e: Prepare for using multiple TX doorbells
net/mlx5e: Prepare for using different CQ doorbells
net/mlx5e: Use multiple TX doorbells
net/mlx5e: Use multiple CQ doorbells
devlink: Add a 'num_doorbells' driverinit param
net/mlx5e: Use the 'num_doorbells' devlink param
.../networking/devlink/devlink-params.rst | 3 ++
Documentation/networking/devlink/mlx5.rst | 8 ++++
drivers/infiniband/hw/mlx5/cq.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/cq.c | 1 -
.../net/ethernet/mellanox/mlx5/core/devlink.c | 26 +++++++++++
drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 ++
.../ethernet/mellanox/mlx5/core/en/params.c | 6 +--
.../ethernet/mellanox/mlx5/core/en/params.h | 2 +-
.../net/ethernet/mellanox/mlx5/core/en/ptp.c | 6 ++-
.../net/ethernet/mellanox/mlx5/core/en/ptp.h | 1 +
.../net/ethernet/mellanox/mlx5/core/en/trap.c | 1 +
.../net/ethernet/mellanox/mlx5/core/en/txrx.h | 5 +--
.../mellanox/mlx5/core/en/xsk/setup.c | 2 +-
.../ethernet/mellanox/mlx5/core/en_common.c | 45 ++++++++++++++++---
.../net/ethernet/mellanox/mlx5/core/en_main.c | 37 ++++++++++++---
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 8 ++--
.../ethernet/mellanox/mlx5/core/fpga/conn.c | 1 -
.../net/ethernet/mellanox/mlx5/core/lib/aso.c | 8 ++--
.../net/ethernet/mellanox/mlx5/core/main.c | 11 +++--
.../mellanox/mlx5/core/steering/hws/send.c | 8 ++--
.../mellanox/mlx5/core/steering/sws/dr_send.c | 1 -
drivers/net/ethernet/mellanox/mlx5/core/wc.c | 16 ++++---
include/linux/mlx5/cq.h | 1 -
include/linux/mlx5/driver.h | 8 ++--
include/net/devlink.h | 4 ++
net/devlink/param.c | 5 +++
26 files changed, 162 insertions(+), 59 deletions(-)
base-commit: deb105f49879dd50d595f7f55207d6e74dec34e6
--
2.31.1
next reply other threads:[~2025-09-10 10:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 10:24 Tariq Toukan [this message]
2025-09-10 10:24 ` [PATCH net-next 01/10] net/mlx5: Fix typo of MLX5_EQ_DOORBEL_OFFSET Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 02/10] net/mlx5: Remove unused 'offset' field from mlx5_sq_bfreg Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 03/10] net/mlx5e: Remove unused 'xsk' param of mlx5e_build_xdpsq_param Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 04/10] net/mlx5: Store the global doorbell in mlx5_priv Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 05/10] net/mlx5e: Prepare for using multiple TX doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 06/10] net/mlx5e: Prepare for using different CQ doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 07/10] net/mlx5e: Use multiple TX doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 08/10] net/mlx5e: Use multiple CQ doorbells Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 09/10] devlink: Add a 'num_doorbells' driverinit param Tariq Toukan
2025-09-10 10:24 ` [PATCH net-next 10/10] net/mlx5e: Use the 'num_doorbells' devlink param Tariq Toukan
2025-09-10 16:16 ` Stanislav Fomichev
2025-09-10 16:23 ` Jason Gunthorpe
2025-09-16 8:32 ` Cosmin Ratiu
2025-09-10 17:23 ` Jakub Kicinski
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=1757499891-596641-1-git-send-email-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=cratiu@nvidia.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=hawk@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-doc@vger.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=saeedm@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