Blob Blame History Raw
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 16 Jun 2020 18:35:18 +0800
Subject: xdp: Handle frame_sz in xdp_convert_zc_to_xdp_frame()
Patch-mainline: v5.8-rc3
Git-commit: 3ff2351651a2ecb73ec9d29119793bde190b2850
References: jsc#SLE-13706

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>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200616103518.2963410-1-liuhangbin@gmail.com
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/core/xdp.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -491,6 +491,7 @@ struct xdp_frame *xdp_convert_zc_to_xdp_
 	xdpf->len = totsize - metasize;
 	xdpf->headroom = 0;
 	xdpf->metasize = metasize;
+	xdpf->frame_sz = PAGE_SIZE;
 	xdpf->mem.type = MEM_TYPE_PAGE_ORDER0;
 
 	xdp_return_buff(xdp);