}
static int
-nfp_bpf_verifier_prep(struct net_device *netdev, struct bpf_verifier_env *env)
+nfp_bpf_verifier_prep(struct net_device *netdev, struct bpf_prog *prog)
{
struct nfp_net *nn = netdev_priv(netdev);
- struct bpf_prog *prog = env->prog;
struct nfp_app *app = nn->app;
struct nfp_prog *nfp_prog;
int ret;
}
static int
-nsim_bpf_verifier_prep(struct net_device *dev, struct bpf_verifier_env *env)
+nsim_bpf_verifier_prep(struct net_device *dev, struct bpf_prog *prog)
{
struct netdevsim *ns = netdev_priv(dev);
if (!ns->bpf_bind_accept)
return -EOPNOTSUPP;
- return nsim_bpf_create_prog(ns, env->prog);
+ return nsim_bpf_create_prog(ns, prog);
}
static int nsim_bpf_translate(struct net_device *dev, struct bpf_prog *prog)
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);
};
return cur_func(env)->regs;
}
-int bpf_prog_offload_verifier_prep(struct bpf_verifier_env *env);
+int bpf_prog_offload_verifier_prep(struct bpf_prog *prog);
int bpf_prog_offload_verify_insn(struct bpf_verifier_env *env,
int insn_idx, int prev_insn_idx);
int bpf_prog_offload_finalize(struct bpf_verifier_env *env);
return err;
}
-int bpf_prog_offload_verifier_prep(struct bpf_verifier_env *env)
+int bpf_prog_offload_verifier_prep(struct bpf_prog *prog)
{
struct bpf_prog_offload *offload;
int ret = -ENODEV;
down_read(&bpf_devs_lock);
- offload = env->prog->aux->offload;
+ offload = prog->aux->offload;
if (offload)
- ret = offload->offdev->ops->prepare(offload->netdev, env);
+ ret = offload->offdev->ops->prepare(offload->netdev, prog);
offload->dev_state = !ret;
up_read(&bpf_devs_lock);
goto skip_full_check;
if (bpf_prog_is_dev_bound(env->prog->aux)) {
- ret = bpf_prog_offload_verifier_prep(env);
+ ret = bpf_prog_offload_verifier_prep(env->prog);
if (ret)
goto skip_full_check;
}