Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-09 Thread Jesper Dangaard Brouer
On Tue, 8 Sep 2020 13:32:01 +0300 Maxim Mikityanskiy wrote: > From the driver API perspective, I would prefer to see a simpler API if > possible. The current API exposes things that the driver shouldn't know > (BPF map type), and requires XSK-specific handling. It would be better > if some sp

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Björn Töpel
On 2020-09-08 13:37, Magnus Karlsson wrote: On Tue, Sep 8, 2020 at 12:33 PM Maxim Mikityanskiy wrote: On 2020-09-04 16:59, Björn Töpel wrote: On 2020-09-04 15:53, Björn Töpel wrote: This series addresses a problem that arises when AF_XDP zero-copy is enabled, and the kernel softirq Rx proces

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Jakub Kicinski
On Tue, 8 Sep 2020 20:28:14 +0200 Björn Töpel wrote: > On 2020-09-08 19:24, Jakub Kicinski wrote: > >> I'll start playing around a bit, but again, I think this simple series > >> should go in just to make AF_XDP single core usable*today*. > > No objection from me. > > Thanks Jakub, but as you

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Björn Töpel
On 2020-09-08 19:24, Jakub Kicinski wrote: I'll start playing around a bit, but again, I think this simple series should go in just to make AF_XDP single core usable*today*. No objection from me. Thanks Jakub, but as you (probably) noticed in the other thread Maxim had some valid concerns. Le

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Jakub Kicinski
On Tue, 8 Sep 2020 08:58:30 +0200 Björn Töpel wrote: > >> As for this patch set, I think it would make sense to pull it in since > >> it makes the single-core scenario *much* better, and it is pretty > >> simple. Then do the application polling as another, potentially, > >> improvement series. >

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Magnus Karlsson
On Tue, Sep 8, 2020 at 12:33 PM Maxim Mikityanskiy wrote: > > On 2020-09-04 16:59, Björn Töpel wrote: > > On 2020-09-04 15:53, Björn Töpel wrote: > >> This series addresses a problem that arises when AF_XDP zero-copy is > >> enabled, and the kernel softirq Rx processing and userland process > >> i

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-08 Thread Maxim Mikityanskiy
On 2020-09-04 16:59, Björn Töpel wrote: On 2020-09-04 15:53, Björn Töpel wrote: This series addresses a problem that arises when AF_XDP zero-copy is enabled, and the kernel softirq Rx processing and userland process is running on the same core. [...] @Maxim I'm not well versed in Mellanox

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-07 Thread Björn Töpel
On 2020-09-07 20:40, Jakub Kicinski wrote: On Mon, 7 Sep 2020 15:37:40 +0200 Björn Töpel wrote: > I've been pondering the exact problem you're solving with Maciej > recently. The efficiency of AF_XDP on one core with the NAPI processing. > > Your solution (even though it admittedly helps

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-07 Thread Jakub Kicinski
On Mon, 7 Sep 2020 15:37:40 +0200 Björn Töpel wrote: > > I've been pondering the exact problem you're solving with Maciej > > recently. The efficiency of AF_XDP on one core with the NAPI processing. > > > > Your solution (even though it admittedly helps, and is quite simple) > > still has the

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-07 Thread Björn Töpel
On 2020-09-05 01:58, Jakub Kicinski wrote: > On Fri, 4 Sep 2020 16:32:56 +0200 Björn Töpel wrote: >> On 2020-09-04 16:27, Jesper Dangaard Brouer wrote: >>> On Fri, 4 Sep 2020 15:53:25 +0200 >>> Björn Töpel wrote: >>> On my machine the "one core scenario Rx drop" performance went from ~

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Jakub Kicinski
On Fri, 4 Sep 2020 16:32:56 +0200 Björn Töpel wrote: > On 2020-09-04 16:27, Jesper Dangaard Brouer wrote: > > On Fri, 4 Sep 2020 15:53:25 +0200 > > Björn Töpel wrote: > > > >> On my machine the "one core scenario Rx drop" performance went from > >> ~65Kpps to 21Mpps. In other words, from "not

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Björn Töpel
On 2020-09-04 16:27, Jesper Dangaard Brouer wrote: On Fri, 4 Sep 2020 15:53:25 +0200 Björn Töpel wrote: On my machine the "one core scenario Rx drop" performance went from ~65Kpps to 21Mpps. In other words, from "not usable" to "usable". YMMV. We have observed this kind of dropping off an e

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Jesper Dangaard Brouer
On Fri, 4 Sep 2020 15:53:25 +0200 Björn Töpel wrote: > On my machine the "one core scenario Rx drop" performance went from > ~65Kpps to 21Mpps. In other words, from "not usable" to > "usable". YMMV. We have observed this kind of dropping off an edge before with softirq (when userspace process r

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-04 Thread Björn Töpel
On 2020-09-04 15:53, Björn Töpel wrote: This series addresses a problem that arises when AF_XDP zero-copy is enabled, and the kernel softirq Rx processing and userland process is running on the same core. [...] @Maxim I'm not well versed in Mellanox drivers. Would this be relevant to mlx5