Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-05 Thread John Fastabend
On 17-01-05 04:39 PM, Michael S. Tsirkin wrote: > On Thu, Jan 05, 2017 at 02:57:23PM -0800, John Fastabend wrote: >> On 17-01-03 02:16 PM, Michael S. Tsirkin wrote: >>> On Tue, Jan 03, 2017 at 02:01:27PM +0800, Jason Wang wrote: On 2017年01月03日 03:44, John Fastabend wrote: > Add s

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-05 Thread Michael S. Tsirkin
On Thu, Jan 05, 2017 at 02:57:23PM -0800, John Fastabend wrote: > On 17-01-03 02:16 PM, Michael S. Tsirkin wrote: > > On Tue, Jan 03, 2017 at 02:01:27PM +0800, Jason Wang wrote: > >> > >> > >> On 2017年01月03日 03:44, John Fastabend wrote: > >>> Add support for XDP adjust head by allocating a 256B hea

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-05 Thread John Fastabend
On 17-01-03 02:16 PM, Michael S. Tsirkin wrote: > On Tue, Jan 03, 2017 at 02:01:27PM +0800, Jason Wang wrote: >> >> >> On 2017年01月03日 03:44, John Fastabend wrote: >>> Add support for XDP adjust head by allocating a 256B header region >>> that XDP programs can grow into. This is only enabled when a

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-04 Thread Jason Wang
On 2017年01月05日 02:58, John Fastabend wrote: [...] @@ -393,34 +397,39 @@ static u32 do_xdp_prog(struct virtnet_info *vi, struct bpf_prog *xdp_prog, void *data, int len) { -int hdr_padded_len; struct xdp_buff xdp; -void *buf; unsigned

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-04 Thread John Fastabend
[...] >> @@ -393,34 +397,39 @@ static u32 do_xdp_prog(struct virtnet_info *vi, >> struct bpf_prog *xdp_prog, >> void *data, int len) >> { >> -int hdr_padded_len; >> struct xdp_buff xdp; >> -void *buf; >> unsigned int qp; >> u32 act; >>

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-03 Thread Jason Wang
On 2017年01月04日 00:57, John Fastabend wrote: +/* Changing the headroom in buffers is a disruptive operation because + * existing buffers must be flushed and reallocated. This will happen + * when a xdp program is initially added or xdp is disabled by removing + * the xdp program.

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-03 Thread Jason Wang
On 2017年01月04日 00:54, John Fastabend wrote: +/* Changing the headroom in buffers is a disruptive operation because + * existing buffers must be flushed and reallocated. This will happen + * when a xdp program is initially added or xdp is disabled by removing + * the xdp program.

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-03 Thread Michael S. Tsirkin
On Tue, Jan 03, 2017 at 02:01:27PM +0800, Jason Wang wrote: > > > On 2017年01月03日 03:44, John Fastabend wrote: > > Add support for XDP adjust head by allocating a 256B header region > > that XDP programs can grow into. This is only enabled when a XDP > > program is loaded. > > > > In order to ens

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-03 Thread John Fastabend
On 17-01-02 10:01 PM, Jason Wang wrote: > > > On 2017年01月03日 03:44, John Fastabend wrote: >> Add support for XDP adjust head by allocating a 256B header region >> that XDP programs can grow into. This is only enabled when a XDP >> program is loaded. >> >> In order to ensure that we do not have to

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-03 Thread John Fastabend
On 17-01-03 08:54 AM, John Fastabend wrote: > On 17-01-02 10:01 PM, Jason Wang wrote: >> >> >> On 2017年01月03日 03:44, John Fastabend wrote: >>> Add support for XDP adjust head by allocating a 256B header region >>> that XDP programs can grow into. This is only enabled when a XDP >>> program is loade

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-02 Thread Jason Wang
On 2017年01月03日 03:44, John Fastabend wrote: Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-02 Thread John Fastabend
On 17-01-02 11:44 AM, John Fastabend wrote: > Add support for XDP adjust head by allocating a 256B header region > that XDP programs can grow into. This is only enabled when a XDP > program is loaded. > > In order to ensure that we do not have to unwind queue headroom push > queue setup below bpf_

[RFC PATCH] virtio_net: XDP support for adjust_head

2017-01-02 Thread John Fastabend
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs ano

Re: [RFC PATCH] virtio_net: XDP support for adjust_head

2016-12-23 Thread John Fastabend
On 16-12-23 10:43 AM, John Fastabend wrote: > Add support for XDP adjust head by allocating a 256B header region > that XDP programs can grow into. This is only enabled when a XDP > program is loaded. > > In order to ensure that we do not have to unwind queue headroom push > queue setup below bpf_

[RFC PATCH] virtio_net: XDP support for adjust_head

2016-12-23 Thread John Fastabend
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs ano