From: Hangbin Liu Date: Tue, 16 Jun 2020 10:35:18 +0000 (+0800) Subject: xdp: Handle frame_sz in xdp_convert_zc_to_xdp_frame() X-Git-Tag: v5.15~3509^2~77^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ff2351651a2ecb73ec9d29119793bde190b2850;p=platform%2Fkernel%2Flinux-starfive.git 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") Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200616103518.2963410-1-liuhangbin@gmail.com --- diff --git a/net/core/xdp.c b/net/core/xdp.c index 90f44f3..3c45f99 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);