Skip to contentSkip to conversation

xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()

PATCH Applied Hangbin Liu 4 participants 4 messages Jun 16, 2020 – Jun 17, 2020

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

PATCH 1/1 xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()

In commit 34cc0b338a61 we only handled the frame_sz in convert_to_xdp_frame(). This patch will also handle frame_sz in xdp_convert_zc_to_xdp_frame().

Fixes 34cc0b338a61 ("xdp: Xdp_frame add member frame_sz and handle in convert_to_xdp_frame")
---
 net/core/xdp.c | 1 +
 1 file changed, 1 insertion(+)
net/core/xdp.c +1 -0
index 90f44f382115..3c45f99e26d5 100644
@@ -462,6 +462,7 @@ struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
 	xdpf->len = totsize - metasize;
 	xdpf->headroom = 0;
 	xdpf->metasize = metasize;
+	xdpf->frame_sz = PAGE_SIZE;
 	xdpf->mem.type = MEM_TYPE_PAGE_ORDER0;
 
 	xsk_buff_free(xdp);
Signature · 1 line
2.25.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Tue, 16 Jun 2020 18:35:18 +0800 Hangbin Liu <[email protected]> wrote:

In commit 34cc0b338a61 we only handled the frame_sz in convert_to_xdp_frame(). This patch will also handle frame_sz in xdp_convert_zc_to_xdp_frame().

Fixes 34cc0b338a61 ("xdp: Xdp_frame add member frame_sz and handle in convert_to_xdp_frame")

Thanks for spotting and fixing this! :-)

Quoted 16 lines
---
 net/core/xdp.c | 1 +
 1 file changed, 1 insertion(+)
net/core/xdp.c +1 -0
index 90f44f382115..3c45f99e26d5 100644
@@ -462,6 +462,7 @@ struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
 	xdpf->len = totsize - metasize;
 	xdpf->headroom = 0;
 	xdpf->metasize = metasize;
+	xdpf->frame_sz = PAGE_SIZE;
 	xdpf->mem.type = MEM_TYPE_PAGE_ORDER0;
 
 	xsk_buff_free(xdp);
Signature · 4 lines
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
maintainer Acked-by
#2 lore raw
Quoted 6 lines · Jesper Dangaard Brouer
Quoted 3 lines · On Tue, 16 Jun 2020 18:35:18 +0800 Hangbin Liu <[email protected]> wrote:

In commit 34cc0b338a61 we only handled the frame_sz in convert_to_xdp_frame(). This patch will also handle frame_sz in xdp_convert_zc_to_xdp_frame().

Quoted 7 lines
Quoted 2 lines
Fixes 34cc0b338a61 ("xdp: Xdp_frame add member frame_sz and handle in convert_to_xdp_frame")

Thanks for spotting and fixing this! :-)

#3 lore raw
Quoted 11 lines · John Fastabend
Quoted 9 lines · Jesper Dangaard Brouer
Quoted 5 lines · On Tue, 16 Jun 2020 18:35:18 +0800 Hangbin Liu <[email protected]> wrote:

In commit 34cc0b338a61 we only handled the frame_sz in convert_to_xdp_frame(). This patch will also handle frame_sz in xdp_convert_zc_to_xdp_frame().

Fixes 34cc0b338a61 ("xdp: Xdp_frame add member frame_sz and handle in convert_to_xdp_frame")
Quoted 6 lines
Quoted 4 lines

Thanks for spotting and fixing this! :-)

Applied. Thanks