netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()
@ 2020-06-16 10:35 Hangbin Liu
  2020-06-16 15:12 ` Jesper Dangaard Brouer
  0 siblings, 1 reply; 4+ messages in thread
From: Hangbin Liu @ 2020-06-16 10:35 UTC (permalink / raw)
  To: netdev
  Cc: Jesper Dangaard Brouer, bpf, Toke Høiland-Jørgensen,
	Daniel Borkmann, Alexei Starovoitov, Hangbin Liu

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")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 net/core/xdp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/xdp.c b/net/core/xdp.c
index 90f44f382115..3c45f99e26d5 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -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);
-- 
2.25.4


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

end of thread, other threads:[~2020-06-17 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-16 10:35 [PATCH bpf] xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame() Hangbin Liu
2020-06-16 15:12 ` Jesper Dangaard Brouer
2020-06-17  6:02   ` John Fastabend
2020-06-17 17:00     ` Alexei Starovoitov

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).