[net-next V4 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-04 Thread Jesper Dangaard Brouer
This patch makes cpumap functional, by adding SKB allocation and invoking the network stack on the dequeuing CPU. For constructing the SKB on the remote CPU, the xdp_buff in converted into a struct xdp_pkt, and it mapped into the top headroom of the packet, to avoid allocating separate mem. For n

Re: [net-next V4 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-05 Thread Daniel Borkmann
On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote: [...] static int cpu_map_kthread_run(void *data) { struct bpf_cpu_map_entry *rcpu = data; set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { + unsigned int processed = 0, drops =

Re: [net-next V4 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-06 Thread Jesper Dangaard Brouer
On Thu, 05 Oct 2017 12:22:43 +0200 Daniel Borkmann wrote: > On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote: > [...] > > static int cpu_map_kthread_run(void *data) > > { > > struct bpf_cpu_map_entry *rcpu = data; > > > > set_current_state(TASK_INTERRUPTIBLE); > > while (!kthr