Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/11/2017 12:46 AM, Jakub Kicinski wrote: On Thu, 11 May 2017 00:24:56 +0200, Daniel Borkmann wrote: I understand the counter argument that from user space perspective it would make things slightly more complicated because there would be two conditions in which driver hook is used: 1) DRV

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Jakub Kicinski
On Thu, 11 May 2017 00:24:56 +0200, Daniel Borkmann wrote: > > I understand the counter argument that from user space perspective it > > would make things slightly more complicated because there would be two > > conditions in which driver hook is used: > > 1) DRV_MODE set on dump; > > 2) flags

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 11:07 PM, Jakub Kicinski wrote: On Wed, 10 May 2017 11:36:22 +0200, Daniel Borkmann wrote: On 05/10/2017 05:18 AM, Jakub Kicinski wrote: On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: [...] xdp = nla_nest_start(skb, IFLA_XDP); if (!xdp)

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Jakub Kicinski
On Wed, 10 May 2017 11:36:22 +0200, Daniel Borkmann wrote: > On 05/10/2017 05:18 AM, Jakub Kicinski wrote: > > On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: > >> @@ -6851,6 +6851,32 @@ int dev_change_proto_down(struct net_device *dev, > >> bool proto_down) > >> } > >> EXPORT_SYM

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 05:18 AM, Jakub Kicinski wrote: On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: While working on the iproute2 generic XDP frontend, I noticed that as of right now it's possible to have native *and* generic XDP programs loaded both at the same time for the case when a dri

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-09 Thread Jakub Kicinski
On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: > While working on the iproute2 generic XDP frontend, I noticed that > as of right now it's possible to have native *and* generic XDP > programs loaded both at the same time for the case when a driver > supports native XDP. Nice improvemen

[PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-09 Thread Daniel Borkmann
While working on the iproute2 generic XDP frontend, I noticed that as of right now it's possible to have native *and* generic XDP programs loaded both at the same time for the case when a driver supports native XDP. The intended model for generic XDP from b5cdae3291f7 ("net: Generic XDP") is, howe