nfp: bpf: add basic support for adjust head call

Support bpf_xdp_adjust_head().  We need to check whether the
packet offset after adjustment is within datapath's limits.
We also check if the frame is at least ETH_HLEN long (similar
to the kernel implementation).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Jakub Kicinski 2017-12-14 21:29:18 -08:00 • committed by Daniel Borkmann
commit 0d49eaf4db
6 changed files with 190 additions and 0 deletions