Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Hangbin Liu and committed by
Alexei Starovoitov
3ff23516 1c7fb20d

+1
+1
net/core/xdp.c
··· 462 462 xdpf->len = totsize - metasize; 463 463 xdpf->headroom = 0; 464 464 xdpf->metasize = metasize; 465 + xdpf->frame_sz = PAGE_SIZE; 465 466 xdpf->mem.type = MEM_TYPE_PAGE_ORDER0; 466 467 467 468 xsk_buff_free(xdp);