Home
last modified time | relevance | path

Searched hist:"341 b3e7b7b89315c43d262da3199098bcf9bbe57" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/kernel/bpf/
H A Doffload.cdiff 341b3e7b7b89315c43d262da3199098bcf9bbe57 Fri Nov 09 07:03:26 CST 2018 Quentin Monnet <quentin.monnet@netronome.com> bpf: call verify_insn from its callback in struct bpf_offload_dev

We intend to remove the dev_ops in struct bpf_prog_offload, and to only
keep the ops in struct bpf_offload_dev instead, which is accessible from
more locations for passing function pointers.

But dev_ops is used for calling the verify_insn hook. Switch to the
newly added ops in struct bpf_prog_offload instead.

To avoid table lookups for each eBPF instruction to verify, we remember
the offdev attached to a netdev and modify bpf_offload_find_netdev() to
avoid performing more than once a lookup for a given offload object.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
/openbmc/linux/include/linux/
H A Dbpf.hdiff 341b3e7b7b89315c43d262da3199098bcf9bbe57 Fri Nov 09 07:03:26 CST 2018 Quentin Monnet <quentin.monnet@netronome.com> bpf: call verify_insn from its callback in struct bpf_offload_dev

We intend to remove the dev_ops in struct bpf_prog_offload, and to only
keep the ops in struct bpf_offload_dev instead, which is accessible from
more locations for passing function pointers.

But dev_ops is used for calling the verify_insn hook. Switch to the
newly added ops in struct bpf_prog_offload instead.

To avoid table lookups for each eBPF instruction to verify, we remember
the offdev attached to a netdev and modify bpf_offload_find_netdev() to
avoid performing more than once a lookup for a given offload object.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>