BPF List
 help / color / mirror / Atom feed
* [PATCH v2 net-next] xsk: add missing virtual address conversion for page
@ 2025-05-22  4:01 Bui Quang Minh
  2025-05-27 10:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Bui Quang Minh @ 2025-05-22  4:01 UTC (permalink / raw)
  To: netdev
  Cc: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
	Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
	Eric Dumazet, Paolo Abeni, Simon Horman, Maciej Fijalkowski,
	Alexander Lobakin, bpf, linux-kernel, Bui Quang Minh

In commit 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use
page_pool_dev_alloc()"), when converting from netmem to page, I missed a
call to page_address() around skb_frag_page(frag) to get the virtual
address of the page. This commit uses skb_frag_address() helper to fix
the issue.

Fixes: 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()")
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
---
Changes in v2:
- Add Fixes tag

 net/core/xdp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/core/xdp.c b/net/core/xdp.c
index e6f22ba61c1e..491334b9b8be 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -709,8 +709,7 @@ static noinline bool xdp_copy_frags_from_zc(struct sk_buff *skb,
 			return false;
 		}
 
-		memcpy(page_address(page) + offset,
-		       skb_frag_page(frag) + skb_frag_off(frag),
+		memcpy(page_address(page) + offset, skb_frag_address(frag),
 		       LARGEST_ALIGN(len));
 		__skb_fill_page_desc_noacc(sinfo, i, page, offset, len);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net-next] xsk: add missing virtual address conversion for page
  2025-05-22  4:01 [PATCH v2 net-next] xsk: add missing virtual address conversion for page Bui Quang Minh
@ 2025-05-27 10:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-27 10:00 UTC (permalink / raw)
  To: Bui Quang Minh
  Cc: netdev, ast, daniel, davem, kuba, hawk, john.fastabend, edumazet,
	pabeni, horms, maciej.fijalkowski, aleksander.lobakin, bpf,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Thu, 22 May 2025 11:01:15 +0700 you wrote:
> In commit 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use
> page_pool_dev_alloc()"), when converting from netmem to page, I missed a
> call to page_address() around skb_frag_page(frag) to get the virtual
> address of the page. This commit uses skb_frag_address() helper to fix
> the issue.
> 
> Fixes: 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()")
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
> 
> [...]

Here is the summary with links:
  - [v2,net-next] xsk: add missing virtual address conversion for page
    https://git.kernel.org/netdev/net-next/c/28fcb4b56f92

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] 2+ messages in thread

end of thread, other threads:[~2025-05-27  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  4:01 [PATCH v2 net-next] xsk: add missing virtual address conversion for page Bui Quang Minh
2025-05-27 10:00 ` 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