Lines Matching defs:prog
281 static int xdp_test_run_batch(struct xdp_test_data *xdp, struct bpf_prog *prog,
311 act = bpf_prog_run_xdp(prog, ctx);
334 ret = xdp_do_redirect_frame(xdp->dev, ctx, frm, prog);
342 bpf_warn_invalid_xdp_action(NULL, prog, act);
364 static int bpf_test_run_xdp_live(struct bpf_prog *prog, struct xdp_buff *ctx,
382 ret = xdp_test_run_batch(&xdp, prog, repeat - t.i);
392 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
395 struct bpf_prog_array_item item = {.prog = prog};
403 item.cgroup_storage[stype] = bpf_cgroup_storage_alloc(prog, stype);
421 *retval = bpf_prog_run_xdp(prog, ctx);
423 *retval = bpf_prog_run(prog, ctx);
651 int bpf_prog_test_run_tracing(struct bpf_prog *prog,
663 switch (prog->expected_attach_type) {
701 struct bpf_prog *prog;
712 info->retval = bpf_prog_run(info->prog, info->ctx);
716 int bpf_prog_test_run_raw_tp(struct bpf_prog *prog,
732 if (ctx_size_in < prog->aux->max_ctx_offset ||
747 info.prog = prog;
944 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
975 switch (prog->type) {
1046 ret = bpf_test_run(prog, skb, repeat, &retval, &duration, false);
1138 int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
1155 if (prog->expected_attach_type == BPF_XDP_DEVMAP ||
1156 prog->expected_attach_type == BPF_XDP_CPUMAP)
1162 if (bpf_prog_is_dev_bound(prog->aux))
1252 bpf_prog_change_xdp(NULL, prog);
1255 ret = bpf_test_run_xdp_live(prog, &xdp, repeat, batch_size, &duration);
1257 ret = bpf_test_run(prog, &xdp, repeat, &retval, &duration, true);
1275 bpf_prog_change_xdp(prog, NULL);
1300 int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog,
1349 retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN,
1369 int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog, const union bpf_attr *kattr,
1437 progs->items[0].prog = prog;
1469 int bpf_prog_test_run_syscall(struct bpf_prog *prog,
1486 if (ctx_size_in < prog->aux->max_ctx_offset ||
1497 retval = bpf_prog_run_pin_on_cpu(prog, ctx);
1567 int bpf_prog_test_run_nf(struct bpf_prog *prog,
1655 ret = bpf_test_run(prog, &ctx, repeat, &retval, &duration, false);