]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Merge branch 'xdp-offload-mode'
authorDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 17:42:21 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 17:42:21 +0000 (13:42 -0400)
commit1847d3d0a4de609523a685d68458529caacacdcc
tree00bbc360b28f362542756d7ca67f953d7394f2c3
parent9bd780f5e0663035d41a95a6b87eced011ba7e2a
parent149d7a572ae124385973bf1c8e4d80b3f07d8bd4
Merge branch 'xdp-offload-mode'

Jakub Kicinski says:

====================
xdp: offload mode

While we discuss the representors.. :)

This set adds XDP flag for forcing offload and a attachment mode
for reporting to user space that program has been offloaded.  The
nfp driver is modified to make use of the new flags, but also to
adhere to the DRV_MODE flag which should disable the HW offload.

The intended driver behaviour is:
            DRV mode   offload
no flags      yes     attempted
DRV_MODE      yes        no
 HW_MODE      no         yes

Where 'yes' means required, and error will be returned if setup fails.
'Attempted' means the offload will only happen automatically if HW is
capable and offloading the program will cause no change in system
behaviour (e.g. maps don't have to bound).

Thanks to loading the program both to the driver and HW by default we
can fallback to the driver mode without disruption in case user replaces
the program with one which cannot be offloaded later.

Note that the NFP driver currently claims XDP offload support but
lacks most basic features like direct packet access.

Only change compared to the RFC is fixing the double bpf_prog_put()
which Daniel has spotted (patch 5).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>