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: Gal Pressman <gal@nvidia.com>, Leon Romanovsky <leon@kernel.org>,
<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Moshe Shemesh <moshe@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Yishai Hadas <yishaih@nvidia.com>
Subject: [PATCH net-next 2/2] net/mlx5: Declare no DMA segment boundary for data direct device
Date: Fri, 20 Nov 2026 10:18:19 +0200 [thread overview]
Message-ID: <20261120081819.2538191-3-tariqt@nvidia.com> (raw)
In-Reply-To: <20261120081819.2538191-1-tariqt@nvidia.com>
From: Yishai Hadas <yishaih@nvidia.com>
The PCI core initialises every PCI device with a DMA segment boundary
mask of 0xffffffff in pci_device_add(), which forbids any segment from
crossing a 4GB-aligned address regardless of its length. The data direct
device raises the default maximum segment size to 2GB but keeps that
boundary, although it has no such limitation.
Declare that explicitly, in line with mlx5_core, to avoid a mismatch
between the declared constraints and the hardware capabilities.
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/data_direct.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c
index 5afb11a2a9f0..73eef8bbc327 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c
@@ -103,6 +103,7 @@ static int mlx5_data_direct_set_dma_caps(struct pci_dev *pdev)
}
dma_set_max_seg_size(&pdev->dev, SZ_2G);
+ dma_set_seg_boundary(&pdev->dev, ULONG_MAX);
return 0;
}
--
2.44.0
next prev parent reply other threads:[~2026-11-20 8:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 8:18 [PATCH net-next 0/2] net/mlx5: Declare no DMA segment boundary restriction Tariq Toukan
2026-11-20 8:18 ` [PATCH net-next 1/2] " Tariq Toukan
2026-11-20 8:30 ` sashiko-bot
2026-11-20 8:18 ` Tariq Toukan [this message]
2026-11-20 8:30 ` [PATCH net-next 2/2] net/mlx5: Declare no DMA segment boundary for data direct device sashiko-bot
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=20261120081819.2538191-3-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=yishaih@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