]> git.baikalelectronics.ru Git - 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)
commit03e28e2ffc588efa14742916d39dc673ec6f0444
tree00bbc360b28f362542756d7ca67f953d7394f2c3
parent3ac527c53b2a5709027b9811e460ad9528a7d54b
parent52e538f0d32f5e82a9cb83465945a427c578effb
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>