Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <davem@davemloft.net>, <gakula@marvell.com>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<sgoutham@marvell.com>
Cc: <andrew+netdev@lunn.ch>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>
Subject: Re: [PATCH v2 net] octeontx2-af: allocate qmem from page allocator to avoid CMA
Date: Thu, 27 Aug 2026 11:23:50 +0530	[thread overview]
Message-ID: <ao_Q7lClzT-yeK-0@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260825045616.3723078-1-rkannoth@marvell.com>

On 2026-08-25 at 10:26:16, Ratheesh Kannoth (rkannoth@marvell.com) wrote:
> qmem_alloc() uses dma_alloc_attrs() with DMA_ATTR_FORCE_CONTIGUOUS so
> CN10K LMTST regions get physically contiguous DMA memory across page
> boundaries.  On platforms with CMA enabled, that attribute causes
> allocations to be drawn from the CMA pool.  qmem is used for NIX and
> NPA queue contexts, admin queues, and LMTST regions, so the footprint
> grows with the number of enabled interfaces and is difficult to
> provision in CMA.
>
> Add otx2_dma_alloc_coherent() and otx2_dma_free_coherent() helpers
> that allocate compound pages with __get_free_pages(__GFP_COMP),
> DMA-map them with dma_map_page(), and retry with GFP_DMA32 when the
> physical address exceeds the device DMA mask.  Switch qmem_alloc()
> and qmem_free() to use them instead of
> dma_alloc_attrs()/dma_free_attrs().
>
> Fixes: 73d33dbc0723 ("octeontx2-af: Use DMA_ATTR_FORCE_CONTIGUOUS attribute in DMA alloc")
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

Will address sashiko comments in v3

pw-bot: changes-requested

      reply	other threads:[~2026-08-27  5:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  4:56 [PATCH v2 net] octeontx2-af: allocate qmem from page allocator to avoid CMA Ratheesh Kannoth
2026-08-27  5:53 ` Ratheesh Kannoth [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=ao_Q7lClzT-yeK-0@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox