Skip to contentSkip to conversation

net: lan743x: Allocate rings outside ZONE_DMA

PATCH Applied Thangaraj Samynathan 3 participants 3 messages Apr 15, 2025 – Apr 17, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 23760b613d3e..8b6b9b6efe18 100644
@@ -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
reviewer Reviewed-by on v3 1/1
#1 lore raw
Quoted 11 lines · Thangaraj Samynathan

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

Quoted 8 lines

v1
-Modified GFP flags from GFP_KERNEL to GFP_ATOMIC

v2
-resubmit to net-next

v3
-Shortened prefix and updated commit message

Thanks for the updates.

#2 lore raw
In reply to Thangaraj Samynathan
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_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().

[...]

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