]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: Prepare for using multiple TX doorbells
authorCosmin Ratiu <cratiu@nvidia.com>
Tue, 16 Sep 2025 14:11:39 +0000 (17:11 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Sep 2025 01:30:36 +0000 (18:30 -0700)
commit673d7ab7563e1268ac4ca62914b2b99d16219500
treea1676910253ff810c3cdf5c26979c38992c86996
parentaa4595d0ada65d5d44fa924a42a87c175d9d88e3
net/mlx5e: Prepare for using multiple TX doorbells

The driver allocates a single doorbell per device and uses
it for all Send Queues (SQs). This can become a bottleneck due to the
high number of concurrent MMIO accesses when ringing the same doorbell
from many channels.

This patch makes the doorbells used by channel queues configurable.

mlx5e_channel_pick_doorbell() is added to select the doorbell to be used
for a given channel, picking the default for now.

When opening a channel, the selected doorbell is saved to the channel
struct and used whenever channel-related queues are created.

Finally, 'uar_page' is added to 'struct mlx5e_create_sq_param' to
control which doorbell to use when allocating an SQ, since that can
happen outside channel context (e.g. for PTP).

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c