All of lore.kernel.org
 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

* Re: [PATCH bpf] xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Dangaard Brouer @ 2020-06-16 15:12 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, bpf, Toke Høiland-Jørgensen, Daniel Borkmann,
	Alexei Starovoitov, brouer

On Tue, 16 Jun 2020 18:35:18 +0800
Hangbin Liu <liuhangbin@gmail.com> wrote:

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

Thanks for spotting and fixing this! :-)

Acked-by: Jesper Dangaard Brouer <brouer@redhat.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);



-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer


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

* Re: [PATCH bpf] xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()
  2020-06-16 15:12 ` Jesper Dangaard Brouer
@ 2020-06-17  6:02   ` John Fastabend
  2020-06-17 17:00     ` Alexei Starovoitov
  0 siblings, 1 reply; 4+ messages in thread
From: John Fastabend @ 2020-06-17  6:02 UTC (permalink / raw)
  To: Jesper Dangaard Brouer, Hangbin Liu
  Cc: netdev, bpf, Toke Høiland-Jørgensen, Daniel Borkmann,
	Alexei Starovoitov, brouer

Jesper Dangaard Brouer wrote:
> On Tue, 16 Jun 2020 18:35:18 +0800
> Hangbin Liu <liuhangbin@gmail.com> wrote:
> 
> > 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>
> 
> Thanks for spotting and fixing this! :-)
> 
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> 

Acked-by: John Fastabend <john.fastabend@gmail.com>

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

* Re: [PATCH bpf] xdp: handle frame_sz in xdp_convert_zc_to_xdp_frame()
  2020-06-17  6:02   ` John Fastabend
@ 2020-06-17 17:00     ` Alexei Starovoitov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2020-06-17 17:00 UTC (permalink / raw)
  To: John Fastabend
  Cc: Jesper Dangaard Brouer, Hangbin Liu, Network Development, bpf,
	Toke Høiland-Jørgensen, Daniel Borkmann,
	Alexei Starovoitov

On Tue, Jun 16, 2020 at 11:03 PM John Fastabend
<john.fastabend@gmail.com> wrote:
>
> Jesper Dangaard Brouer wrote:
> > On Tue, 16 Jun 2020 18:35:18 +0800
> > Hangbin Liu <liuhangbin@gmail.com> wrote:
> >
> > > 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>
> >
> > Thanks for spotting and fixing this! :-)
> >
> > Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> >
>
> Acked-by: John Fastabend <john.fastabend@gmail.com>

Applied. Thanks

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.