mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
bpf: pass prog instead of env to bpf_prog_offload_verifier_prep()
Function bpf_prog_offload_verifier_prep(), called from the kernel BPF verifier to run a driver-specific callback for preparing for the verification step for offloaded programs, takes a pointer to a struct bpf_verifier_env object. However, no driver callback needs the whole structure at this time: the two drivers supporting this, nfp and netdevsim, only need a pointer to the struct bpf_prog instance held by env. Update the callback accordingly, on kernel side and in these two drivers. 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>
This commit is contained in:
parent
eb9119471e
commit
a40a26322a
6 changed files with 9 additions and 10 deletions
|
@ -268,7 +268,7 @@ struct bpf_prog_offload_ops {
|
|||
int (*insn_hook)(struct bpf_verifier_env *env,
|
||||
int insn_idx, int prev_insn_idx);
|
||||
int (*finalize)(struct bpf_verifier_env *env);
|
||||
int (*prepare)(struct net_device *netdev, struct bpf_verifier_env *env);
|
||||
int (*prepare)(struct net_device *netdev, struct bpf_prog *prog);
|
||||
int (*translate)(struct net_device *netdev, struct bpf_prog *prog);
|
||||
void (*destroy)(struct bpf_prog *prog);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue