Re: [RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-19 Thread Daniel Borkmann
On 06/17/2017 01:57 AM, Jakub Kicinski wrote: Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown

Re: [RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-19 Thread Daniel Borkmann
On 06/20/2017 01:24 AM, Jakub Kicinski wrote: [...] The XDP_SETUP_PROG_HW command is purely for convenience of drivers without an offload. I felt it's not appropriate to burden all drivers with: if (xdp->flags & XDP_FLAGS_HW_MODE) return -EOPNOTSUPP; But, I do have a patch which does

Re: [RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-19 Thread Jakub Kicinski
On Tue, 20 Jun 2017 00:55:41 +0200, Daniel Borkmann wrote: > On 06/17/2017 01:57 AM, Jakub Kicinski wrote: > > Add an installation-time flag for requesting that the program > > be installed only if it can be offloaded to HW. > > > > Internally new command for ndo_xdp is added, this way we avoid >

Re: [RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-19 Thread Daniel Borkmann
On 06/17/2017 01:57 AM, Jakub Kicinski wrote: Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown

[RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-16 Thread Jakub Kicinski
Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown command. Signed-off-by: Jakub Kicinski