Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread John Fastabend
On 16-11-18 03:21 PM, Eric Dumazet wrote: > On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > > >> static void free_receive_bufs(struct virtnet_info *vi) >> { >> +struct bpf_prog *old_prog; >> int i; >> >> for (i = 0; i < vi->max_queue_pairs; i++) { >> whil

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread John Fastabend
On 16-11-18 03:23 PM, Eric Dumazet wrote: > On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: >> From: Shrijeet Mukherjee > > >> #include >> @@ -81,6 +82,8 @@ struct receive_queue { >> >> struct napi_struct napi; >> >> +struct bpf_prog *xdp_prog; > > Please add proper spar

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > From: Shrijeet Mukherjee > #include > @@ -81,6 +82,8 @@ struct receive_queue { > > struct napi_struct napi; > > + struct bpf_prog *xdp_prog; Please add proper sparse annotation, as in struct bpf_prog __rcu *xdp

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > static void free_receive_bufs(struct virtnet_info *vi) > { > + struct bpf_prog *old_prog; > int i; > > for (i = 0; i < vi->max_queue_pairs; i++) { > while (vi->rq[i].pages) > __free_