From: sashiko-bot@kernel.org
To: "Tariq Toukan" <tariqt@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net/mlx5: Declare no DMA segment boundary restriction
Date: Fri, 20 Nov 2026 08:30:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-224736@kernel.org> (raw)
In-Reply-To: <20261120081819.2538191-2-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. mlx5_core
> raises the default maximum segment size to 2GB but never overrides the
> boundary, although the device has no such limitation.
>
> Consumers such as ib_umem_get() coalesce physically contiguous pages up
> to the maximum segment size without consulting the boundary mask.
> Registering a large MR can therefore produce a segment that crosses a
> 4GB-aligned address, which the DMA API debug checker reports:
>
> DMA-API: mlx5_core 0000:08:00.0: mapping sg segment across boundary
> [start=0x00000002ffe27000] [end=0x000000030020efff]
> [boundary=0x00000000ffffffff]
>
> The segment is about 4MB long, well below the 2GB maximum, but it spans
> the 12GB (0x300000000) boundary: the upper halves of start and end are
> 0x2 and 0x3.
>
> Set the segment boundary mask to ULONG_MAX so the DMA constraints
> declared for the device match what the hardware supports.
>
> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120081819.2538191-1-tariqt@nvidia.com?part=1
next prev parent reply other threads:[~2026-11-20 8:30 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 [this message]
2026-11-20 8:18 ` [PATCH net-next 2/2] net/mlx5: Declare no DMA segment boundary for data direct device Tariq Toukan
2026-11-20 8:30 ` 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=sashiko-outbox-224736@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tariqt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.