Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-19 Thread Alexei Starovoitov
On Wed, Dec 19, 2018 at 10:34:28AM +0100, Björn Töpel wrote: > > On 2018-12-19 00:04, Alexei Starovoitov wrote: > > On Mon, Dec 17, 2018 at 04:30:05PM +0100, Björn Töpel wrote: > > > > > > > > Instead of introducing the XDP_ATTACH option to the bind call, can we > > > > just make this association

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-19 Thread Jesper Dangaard Brouer
On Wed, 19 Dec 2018 10:34:28 +0100 Björn Töpel wrote: > To summarize; I'll hold off this series for now (except the first > cleanup patch which I'll send out today), and spend some time on > per-queue programs, iproute2 support and libbpf. As promised I'll be helping out with per-queue programs,

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-19 Thread Björn Töpel
On 2018-12-19 00:04, Alexei Starovoitov wrote: On Mon, Dec 17, 2018 at 04:30:05PM +0100, Björn Töpel wrote: Instead of introducing the XDP_ATTACH option to the bind call, can we just make this association between rx queue id and xsk every single time we bind? Then it is up to the user via the

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-18 Thread Alexei Starovoitov
On Mon, Dec 17, 2018 at 04:30:05PM +0100, Björn Töpel wrote: > > > > Instead of introducing the XDP_ATTACH option to the bind call, can we > > just make this association between rx queue id and xsk every single > > time we bind? Then it is up to the user via the XDP program if he/she > > wants to

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-18 Thread Jakub Kicinski
On Tue, 18 Dec 2018 09:59:26 +0100, Björn Töpel wrote: > Is the XDP HW offloading program verified at load or install time, or both? Load interacts with the ifindex of choice, install checks if the load time device matches.

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-18 Thread Björn Töpel
On 2018-12-18 03:36, Jakub Kicinski wrote: On Mon, 17 Dec 2018 14:39:57 +0100, Björn Töpel wrote: OTOH the implementation would probably look different if there was a per-q program, because this would open up for more optimizations. One could even imagine that the socket fd was part of the progr

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Jakub Kicinski
On Mon, 17 Dec 2018 14:39:57 +0100, Björn Töpel wrote: > OTOH the implementation would probably look different if there was a > per-q program, because this would open up for more optimizations. One > could even imagine that the socket fd was part of the program (part of > relocation process) when l

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Björn Töpel
On 2018-12-17 15:55, Magnus Karlsson wrote: On Mon, Dec 17, 2018 at 3:10 PM Jesper Dangaard Brouer wrote: On Mon, 17 Dec 2018 14:39:57 +0100 Björn Töpel wrote: On 2018-12-17 13:50, Jesper Dangaard Brouer wrote: On Mon, 17 Dec 2018 11:24:54 +0100 Björn Töpel wrote: XDP_ATTACH associat

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Magnus Karlsson
On Mon, Dec 17, 2018 at 3:10 PM Jesper Dangaard Brouer wrote: > > On Mon, 17 Dec 2018 14:39:57 +0100 > Björn Töpel wrote: > > > On 2018-12-17 13:50, Jesper Dangaard Brouer wrote: > > > On Mon, 17 Dec 2018 11:24:54 +0100 > > > Björn Töpel wrote: > > > > > >> XDP_ATTACH associates an XDP socket to

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Jesper Dangaard Brouer
On Mon, 17 Dec 2018 14:39:57 +0100 Björn Töpel wrote: > On 2018-12-17 13:50, Jesper Dangaard Brouer wrote: > > On Mon, 17 Dec 2018 11:24:54 +0100 > > Björn Töpel wrote: > > > >> XDP_ATTACH associates an XDP socket to a specific netdev Rx queue. To > >> redirect a packet to an attached socket

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Björn Töpel
On 2018-12-17 13:50, Jesper Dangaard Brouer wrote: On Mon, 17 Dec 2018 11:24:54 +0100 Björn Töpel wrote: XDP_ATTACH associates an XDP socket to a specific netdev Rx queue. To redirect a packet to an attached socket from XDP, the bpf_xsk_redirect helper is used. The bpf_xsk_redirect helper i

Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Jesper Dangaard Brouer
On Mon, 17 Dec 2018 11:24:54 +0100 Björn Töpel wrote: > XDP_ATTACH associates an XDP socket to a specific netdev Rx queue. To > redirect a packet to an attached socket from XDP, the bpf_xsk_redirect > helper is used. The bpf_xsk_redirect helper is also introduced in this > series. > > Many XDP s

[PATCH bpf-next v2 0/7] Add support for XDP_ATTACH

2018-12-17 Thread Björn Töpel
From: Björn Töpel Hi! This patch set adds support for a new XDP socket bind option, XDP_ATTACH. XDP_ATTACH associates an XDP socket to a specific netdev Rx queue. To redirect a packet to an attached socket from XDP, the bpf_xsk_redirect helper is used. The bpf_xsk_redirect helper is also introd