Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-04 Thread Jesper Dangaard Brouer
On Mon, 3 Jun 2019 21:20:30 + Saeed Mahameed wrote: > On Mon, 2019-06-03 at 11:04 +0200, Björn Töpel wrote: > > On Sat, 1 Jun 2019 at 21:42, Jakub Kicinski > > wrote: > > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wr

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Tue, 4 Jun 2019 at 01:11, Daniel Borkmann wrote: > > On 06/03/2019 10:39 AM, Björn Töpel wrote: > > On Sat, 1 Jun 2019 at 20:12, Jonathan Lemon wrote: > >> On 31 May 2019, at 2:42, Björn Töpel wrote: > >>> From: Björn Töpel > >>> > >>> All XDP capable drivers need to implement the XDP_QUERY_P

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Mon, 3 Jun 2019 at 23:20, Saeed Mahameed wrote: > > On Mon, 2019-06-03 at 11:04 +0200, Björn Töpel wrote: > > On Sat, 1 Jun 2019 at 21:42, Jakub Kicinski > > wrote: > > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote: > >

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Mon, 3 Jun 2019 at 19:03, Jakub Kicinski wrote: > > On Mon, 3 Jun 2019 11:04:36 +0200, Björn Töpel wrote: > > On Sat, 1 Jun 2019 at 21:57, Jakub Kicinski > > wrote: > > > > > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > > > + if (!bpf_op || flags & XDP_FLAGS_SKB_MODE) >

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Daniel Borkmann
On 06/03/2019 10:39 AM, Björn Töpel wrote: > On Sat, 1 Jun 2019 at 20:12, Jonathan Lemon wrote: >> On 31 May 2019, at 2:42, Björn Töpel wrote: >>> From: Björn Töpel >>> >>> All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} >>> command of ndo_bpf. The query code is fairly generic.

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Saeed Mahameed
On Mon, 2019-06-03 at 11:04 +0200, Björn Töpel wrote: > On Sat, 1 Jun 2019 at 21:42, Jakub Kicinski > wrote: > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote: > > > > From: Björn Töpel > > > > > > > > All XDP capable drivers

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Jakub Kicinski
On Mon, 3 Jun 2019 11:04:36 +0200, Björn Töpel wrote: > On Sat, 1 Jun 2019 at 21:57, Jakub Kicinski > wrote: > > > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > > + if (!bpf_op || flags & XDP_FLAGS_SKB_MODE) > > > > + mode = XDP_FLAGS_SKB_MODE; > > > > + > > > > +

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Jonathan Lemon
On 3 Jun 2019, at 1:39, Björn Töpel wrote: On Sat, 1 Jun 2019 at 20:12, Jonathan Lemon wrote: On 31 May 2019, at 2:42, Björn Töpel wrote: From: Björn Töpel All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} command of ndo_bpf. The query code is fairly generic. This commit

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On Sat, 1 Jun 2019 at 22:02, Jakub Kicinski > wrote: >> >> On Fri, 31 May 2019 11:42:14 +0200, Björn Töpel wrote: >> > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >> > index 44b47e9df94a..f3a875a52c6c 100644 >> > --- a/include/linux/netdevice.h >> > +

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Sat, 1 Jun 2019 at 22:02, Jakub Kicinski wrote: > > On Fri, 31 May 2019 11:42:14 +0200, Björn Töpel wrote: > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > > index 44b47e9df94a..f3a875a52c6c 100644 > > --- a/include/linux/netdevice.h > > +++ b/include/linux/netdevice.h >

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Sat, 1 Jun 2019 at 21:57, Jakub Kicinski wrote: > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > > + if (!bpf_op || flags & XDP_FLAGS_SKB_MODE) > > > + mode = XDP_FLAGS_SKB_MODE; > > > + > > > + curr_mode = dev_xdp_current_mode(dev); > > > + > > > + if (!offload

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Sat, 1 Jun 2019 at 21:42, Jakub Kicinski wrote: > > On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote: > > > From: Björn Töpel > > > > > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > > > command of ndo_bp

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-03 Thread Björn Töpel
On Sat, 1 Jun 2019 at 20:12, Jonathan Lemon wrote: > > On 31 May 2019, at 2:42, Björn Töpel wrote: > > > From: Björn Töpel > > > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > > command of ndo_bpf. The query code is fairly generic. This commit > > refactors the query code

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-01 Thread Jakub Kicinski
On Fri, 31 May 2019 11:42:14 +0200, Björn Töpel wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 44b47e9df94a..f3a875a52c6c 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -1940,6 +1940,9 @@ struct net_device { > #endif > str

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-01 Thread Jakub Kicinski
On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > > + if (!bpf_op || flags & XDP_FLAGS_SKB_MODE) > > + mode = XDP_FLAGS_SKB_MODE; > > + > > + curr_mode = dev_xdp_current_mode(dev); > > + > > + if (!offload && curr_mode && (mode ^ curr_mode) & > > + (XDP_FLAGS_DRV_MOD

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-01 Thread Jakub Kicinski
On Fri, 31 May 2019 19:18:17 +, Saeed Mahameed wrote: > On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote: > > From: Björn Töpel > > > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > > command of ndo_bpf. The query code is fairly generic. This commit > > refactors th

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-01 Thread Jonathan Lemon
On 31 May 2019, at 2:42, Björn Töpel wrote: From: Björn Töpel All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} command of ndo_bpf. The query code is fairly generic. This commit refactors the query code up from the drivers to the netdev level. The struct net_device has gained

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-01 Thread kbuild test robot
Hi "Björn, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Bj-rn-T-pel/net-xdp-refactor-XDP_QUERY_PROG-_HW-to-netdev/20190601-053952 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-nex

Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-31 Thread Saeed Mahameed
On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote: > From: Björn Töpel > > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} > command of ndo_bpf. The query code is fairly generic. This commit > refactors the query code up from the drivers to the netdev level. > > The struct

[PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-05-31 Thread Björn Töpel
From: Björn Töpel All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} command of ndo_bpf. The query code is fairly generic. This commit refactors the query code up from the drivers to the netdev level. The struct net_device has gained two new members: xdp_prog_hw and xdp_flags. Th