net: lan743x: Allocate rings outside ZONE_DMA
Subsystems (3)
PATCH v3 1/1 net: lan743x: Allocate rings outside ZONE_DMA
The driver allocates ring elements using GFP_DMA flags. There is no dependency from LAN743x hardware on memory allocation should be in DMA_ZONE. Hence modifying the flags to use only GFP_ATOMIC. This is consistent with other callers of lan743x_rx_init_ring_element().
---
v0
-Initial Commit
v1
-Modified GFP flags from GFP_KERNEL to GFP_ATOMIC
v2
-resubmit to net-next
v3
-Shortened prefix and updated commit message
--- drivers/net/ethernet/microchip/lan743x_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan743x_main.c +1 -2
@@ -2495,8 +2495,7 @@ static int lan743x_rx_process_buffer(struct lan743x_rx *rx)/* save existing skb, allocate new skb and map to dma */ skb = buffer_info->skb; -if (lan743x_rx_init_ring_element (rx, rx->last_head, -GFP_ATOMIC |GFP_DMA )) { +if (lan743x_rx_init_ring_element (rx, rx->last_head,GFP_ATOMIC )) {/* failed to allocate next skb. * Memory is very low. * Drop this packet and reuse buffer.
Signature · 1 line
2.25.1
Quoted 11 lines · Thangaraj Samynathan
The driver allocates ring elements using
GFP_DMAflags. There is no dependency from LAN743x hardware on memory allocation should be inDMA_ZONE. Hence modifying the flags to use onlyGFP_ATOMIC. This is consistent with other callers oflan743x_rx_init_ring_element().Reported-by Zhang, Liyin(CN) <[email protected]>Signed-off-by Thangaraj Samynathan <[email protected]>---
v0
-Initial Commit
Quoted 8 lines
v1
-Modified GFP flags fromGFP_KERNELtoGFP_ATOMICv2
-resubmit to net-nextv3
-Shortened prefix and updated commit message
Thanks for the updates.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 15 Apr 2025 10:15:09 +0530 you wrote:
The driver allocates ring elements using
GFP_DMAflags. There is no dependency from LAN743x hardware on memory allocation should be inDMA_ZONE. Hence modifying the flags to use onlyGFP_ATOMIC. This is consistent with other callers oflan743x_rx_init_ring_element().Reported-by Zhang, Liyin(CN) <[email protected]>Signed-off-by Thangaraj Samynathan <[email protected]>[...]
Here is the summary with links:
- [net-next,v3] net: lan743x: Allocate rings outside ZONE_DMA
https://git.kernel.org/netdev/net-next/c/8a8f3f499176
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html