Skip to content

Commit

Permalink
xdp: Handle frame_sz in xdp_convert_zc_to_xdp_frame()
Browse files Browse the repository at this point in the history
In commit 34cc0b3 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: 34cc0b3 ("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
  • Loading branch information
Hangbin Liu authored and Alexei Starovoitov committed Jun 17, 2020
1 parent 1c7fb20 commit 3ff2351
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3ff2351

Please sign in to comment.