* [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA
@ 2025-04-15 4:45 Thangaraj Samynathan
2025-04-16 15:14 ` Simon Horman
2025-04-17 1:41 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Thangaraj Samynathan @ 2025-04-15 4:45 UTC (permalink / raw)
To: netdev
Cc: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
kuba, pabeni, linux-kernel
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().
Reported-by: Zhang, Liyin(CN) <Liyin.Zhang.CN@windriver.com>
Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
---
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(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 23760b613d3e..8b6b9b6efe18 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -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.
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA
2025-04-15 4:45 [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA Thangaraj Samynathan
@ 2025-04-16 15:14 ` Simon Horman
2025-04-17 1:41 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-04-16 15:14 UTC (permalink / raw)
To: Thangaraj Samynathan
Cc: netdev, bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem,
edumazet, kuba, pabeni, linux-kernel
On Tue, Apr 15, 2025 at 10:15:09AM +0530, Thangaraj Samynathan 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().
>
> Reported-by: Zhang, Liyin(CN) <Liyin.Zhang.CN@windriver.com>
> Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
> ---
> 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
Thanks for the updates.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA
2025-04-15 4:45 [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA Thangaraj Samynathan
2025-04-16 15:14 ` Simon Horman
@ 2025-04-17 1:41 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-17 1:41 UTC (permalink / raw)
To: Thangaraj Samynathan
Cc: netdev, bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem,
edumazet, kuba, pabeni, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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().
>
> Reported-by: Zhang, Liyin(CN) <Liyin.Zhang.CN@windriver.com>
> Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-17 1:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 4:45 [PATCH net-next v3] net: lan743x: Allocate rings outside ZONE_DMA Thangaraj Samynathan
2025-04-16 15:14 ` Simon Horman
2025-04-17 1:41 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).