From: Leon Romanovsky <leon@kernel.org>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: davem@davemloft.net, gakula@marvell.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
sgoutham@marvell.com, andrew+netdev@lunn.ch, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Subject: Re: [PATCH v7 net] octeontx2-af: switch qmem from coherent DMA alloc to streaming DMA mapping
Date: Tue, 8 Sep 2026 09:19:24 +0300 [thread overview]
Message-ID: <20260908061924.GM13683@unreal> (raw)
In-Reply-To: <ap6quHlmYxI0cJAl@rkannoth-OptiPlex-7090>
On Mon, Sep 07, 2026 at 05:44:48PM +0530, Ratheesh Kannoth wrote:
> On 2026-09-07 at 17:02:44, Leon Romanovsky (leon@kernel.org) wrote:
> > > > > + */
> > > > > + if (order > MAX_PAGE_ORDER) {
> > > >
> > > > Size is coming from the kernel, how can it be with order more than MAX_PAGE_ORDER?
> > > There is contigious memory allocation request from driver for PF-to-VF mail box memory.
> > > It is crossing max page order in newer platforms as number of VFs per PF increased.
> >
> > I'm not sure what this means. You can't create a VF without assigning it
> > enough memory for DMA. You shouldn't get an "order > MAX_PAGE_ORDER"
> > error at this stage. If you do, there is likely another bug involved.
>
> I will move the MAX_PAGE_ORDER / size validation out of the DMA helper and handle any
> allocation failure with a clear error at the call site, where we know the required size and VF count.
>
> One question on dev_is_dma_coherent(): this qmem path relies on the platform being DMA-coherent
> (as noted in the commit message). Would you prefer that we keep this check in this function as explicit
> guard so that a future port to a non-I/O-coherent SoC fails early rather than silently misbehaving?
It is a platform integration bug to use such an SoC on a platform that
cannot support it. As with any other driver, this should not be handled
in the driver, since DMA coherency is a platform/device property.
If the device works only on a specific architecture (x86 is DMA-coherent),
add the appropriate CONFIG_ dependency in Kconfig.
Thanks
prev parent reply other threads:[~2026-09-08 6:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 4:26 [PATCH v7 net] octeontx2-af: switch qmem from coherent DMA alloc to streaming DMA mapping Ratheesh Kannoth
2026-09-07 7:20 ` Leon Romanovsky
2026-09-07 10:42 ` Ratheesh Kannoth
2026-09-07 11:32 ` Leon Romanovsky
2026-09-07 12:14 ` Ratheesh Kannoth
2026-09-08 6:19 ` Leon Romanovsky [this message]
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=20260908061924.GM13683@unreal \
--to=leon@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sgoutham@marvell.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.