Re: [PATCH net] octeontx2-af: Fix memory scaling limitation in SR-IOV mode
From: Leon Romanovsky <leon@kernel.org>
Date: 2026-09-16 05:36:25
Also in:
lkml
On Wed, Sep 16, 2026 at 07:51:11AM +0530, Ratheesh Kannoth wrote:
The original code used DMA_ATTR_FORCE_CONTIGUOUS, which could exhaust
the CMA pool when a large number of VFs were requested.
Fix this by switching to the DMA streaming API. This is equivalent on
Octeon platforms, which provide full I/O coherency via the SMMU.
Cc: Leon Romanovsky <leon@kernel.org>
Fixes: 73d33dbc0723 ("octeontx2-af: Use DMA_ATTR_FORCE_CONTIGUOUS attribute in DMA alloc")
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
v9 -> v10: Updated commit message as suggested by Leon
v8 -> v9: Addressed Leon comment.
- Used kzalloc instead of kmalloc.
v7 -> v8: Addressed Leon comments.
- Replace __get_free_pages() and __GFP_COMP with kmalloc()
- Drop GFP_DMA32 retry loop and dma_capable()/phys_to_dma() mask probing
- Use dma_map_single()/dma_unmap_single() instead of dma_map_page_attrs()
with DMA_ATTR_REQUIRE_COHERENT
- Remove defensive parameter checks and dma_max_mapping_size() from the
allocator helper
- Move MAX_PAGE_ORDER validation to qmem_alloc()
v6 -> v7: Addressed Sashiko comments.
https://lore.kernel.org/netdev/178863855246.219967.10510865726694393307@kernel.org/ (local)
v5 -> v6: Addressed review comments.
https://lore.kernel.org/netdev/20260901015621.2708182-1-rkannoth@marvell.com/ (local)
v4 -> v5: Fixed compilation issues.
https://lore.kernel.org/netdev/20260831024210.208447-1-rkannoth@marvell.com/ (local)
v3 -> v4: Fixed compilation issues.
https://lore.kernel.org/netdev/apTpKcN_S1xIwRbZ@rkannoth-OptiPlex-7090/ (local)
v2 -> v3: Addressed sashiko comments.
https://sashiko.dev/#/patchset/20260825045616.3723078-1-rkannoth%40marvell.com
v1 -> v2: Rewrote patch as per sashiko comment.
---
.../ethernet/marvell/octeontx2/af/common.h | 45 ++++++++++++++++---
1 file changed, 39 insertions(+), 6 deletions(-)Thanks, Reviewed-by: Leon Romanovsky <leon@kernel.org>