diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-11-03 13:56:29 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 22:26:19 +0900 |
commit | c6c580d7bc390f864488c66153a487057e76d9d8 (patch) | |
tree | f7e849ee2bb639f764bdb448c3e2b1704d3ccf7a /kernel | |
parent | 9314c442d7ddf749d29c09ab48ffa5333d2bf48e (diff) | |
download | linux-c6c580d7bc390f864488c66153a487057e76d9d8.tar.bz2 |
nfp: bpf: move to new BPF program offload infrastructure
Following steps are taken in the driver to offload an XDP program:
XDP_SETUP_PROG:
* prepare:
- allocate program state;
- run verifier (bpf_analyzer());
- run translation;
* load:
- stop old program if needed;
- load program;
- enable BPF if not enabled;
* clean up:
- free program image.
With new infrastructure the flow will look like this:
BPF_OFFLOAD_VERIFIER_PREP:
- allocate program state;
BPF_OFFLOAD_TRANSLATE:
- run translation;
XDP_SETUP_PROG:
- stop old program if needed;
- load program;
- enable BPF if not enabled;
BPF_OFFLOAD_DESTROY:
- free program image.
Take advantage of the new infrastructure. Allocation of driver
metadata has to be moved from jit.c to offload.c since it's now
done at a different stage. Since there is no separate driver
private data for verification step, move temporary nfp_meta
pointer into nfp_prog. We will now use user space context
offsets.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions