Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-25 Thread Björn Töpel
2018-04-24 1:16 GMT+02:00 Michael S. Tsirkin : > On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: >> From: Magnus Karlsson >> >> Here, we add another setsockopt for registered user memory (umem) >> called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can >> ask the kernel

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-24 Thread Willem de Bruijn
+/* Pgoff for mmaping the rings */ +#define XDP_UMEM_PGOFF_FILL_RING 0x1 + +struct xdp_ring { + __u32 producer __attribute__((aligned(64))); + __u32 consumer __attribute__((aligned(64))); +}; >>> >>> Why 64? And do you still need these guys in

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-24 Thread Magnus Karlsson
On Tue, Apr 24, 2018 at 1:59 AM, Willem de Bruijn wrote: > On Mon, Apr 23, 2018 at 7:21 PM, Michael S. Tsirkin wrote: >> On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: >>> From: Magnus Karlsson >>> >>> Here, we add another setsockopt for registered user memory (umem) >>> called XDP

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Willem de Bruijn
On Mon, Apr 23, 2018 at 7:21 PM, Michael S. Tsirkin wrote: > On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: >> From: Magnus Karlsson >> >> Here, we add another setsockopt for registered user memory (umem) >> called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can >> as

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: > From: Magnus Karlsson > > Here, we add another setsockopt for registered user memory (umem) > called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can > ask the kernel to allocate a queue (ring buffer) and also mmap it >

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: > From: Magnus Karlsson > > Here, we add another setsockopt for registered user memory (umem) > called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can > ask the kernel to allocate a queue (ring buffer) and also mmap it >

[PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Björn Töpel
From: Magnus Karlsson Here, we add another setsockopt for registered user memory (umem) called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can ask the kernel to allocate a queue (ring buffer) and also mmap it (XDP_UMEM_PGOFF_FILL_QUEUE) into the process. The queue is used to expli