Lines Matching defs:prog

283 static int xdp_test_run_batch(struct xdp_test_data *xdp, struct bpf_prog *prog,
313 act = bpf_prog_run_xdp(prog, ctx);
336 ret = xdp_do_redirect_frame(xdp->dev, ctx, frm, prog);
344 bpf_warn_invalid_xdp_action(NULL, prog, act);
366 static int bpf_test_run_xdp_live(struct bpf_prog *prog, struct xdp_buff *ctx,
384 ret = xdp_test_run_batch(&xdp, prog, repeat - t.i);
394 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
397 struct bpf_prog_array_item item = {.prog = prog};
405 item.cgroup_storage[stype] = bpf_cgroup_storage_alloc(prog, stype);
423 *retval = bpf_prog_run_xdp(prog, ctx);
425 *retval = bpf_prog_run(prog, ctx);
671 int bpf_prog_test_run_tracing(struct bpf_prog *prog,
683 switch (prog->expected_attach_type) {
721 struct bpf_prog *prog;
732 info->retval = bpf_prog_run(info->prog, info->ctx);
736 int bpf_prog_test_run_raw_tp(struct bpf_prog *prog,
752 if (ctx_size_in < prog->aux->max_ctx_offset ||
767 info.prog = prog;
964 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
995 switch (prog->type) {
1066 ret = bpf_test_run(prog, skb, repeat, &retval, &duration, false);
1158 int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
1175 if (prog->expected_attach_type == BPF_XDP_DEVMAP ||
1176 prog->expected_attach_type == BPF_XDP_CPUMAP)
1182 if (bpf_prog_is_dev_bound(prog->aux))
1272 bpf_prog_change_xdp(NULL, prog);
1275 ret = bpf_test_run_xdp_live(prog, &xdp, repeat, batch_size, &duration);
1277 ret = bpf_test_run(prog, &xdp, repeat, &retval, &duration, true);
1295 bpf_prog_change_xdp(prog, NULL);
1320 int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog,
1369 retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN,
1389 int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog, const union bpf_attr *kattr,
1457 progs->items[0].prog = prog;
1489 int bpf_prog_test_run_syscall(struct bpf_prog *prog,
1506 if (ctx_size_in < prog->aux->max_ctx_offset ||
1517 retval = bpf_prog_run_pin_on_cpu(prog, ctx);
1587 int bpf_prog_test_run_nf(struct bpf_prog *prog,
1675 ret = bpf_test_run(prog, &ctx, repeat, &retval, &duration, false);