bpf: support packet data load instructions
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 27 May 2020 14:16:51 +0000 (15:16 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Jun 2020 21:42:04 +0000 (23:42 +0200)
commitb901d928361cc6f2ff03909a0f7a18640252ee27
tree32872dd071b24c980d117993201509c246376263
parent20c19d9df5f08840d96204dcc65437223c434325
bpf: support packet data load instructions

To fill the gap with linux kernel eBPF implementation,
add support for two non-generic instructions:
(BPF_ABS | <size> | BPF_LD) and (BPF_IND | <size> | BPF_LD)
which are used to access packet data.
These instructions can only be used when BPF context is a pointer
to 'struct rte_mbuf' (i.e: RTE_BPF_ARG_PTR_MBUF type).

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test/test_bpf.c
doc/guides/prog_guide/bpf_lib.rst
doc/guides/rel_notes/release_20_08.rst
lib/librte_bpf/bpf_exec.c
lib/librte_bpf/bpf_validate.c