Lines Matching refs:prog
285 static int xdp_test_run_batch(struct xdp_test_data *xdp, struct bpf_prog *prog, in xdp_test_run_batch() argument
318 act = bpf_prog_run_xdp(prog, ctx); in xdp_test_run_batch()
341 ret = xdp_do_redirect_frame(xdp->dev, ctx, frm, prog); in xdp_test_run_batch()
349 bpf_warn_invalid_xdp_action(NULL, prog, act); in xdp_test_run_batch()
372 static int bpf_test_run_xdp_live(struct bpf_prog *prog, struct xdp_buff *ctx, in bpf_test_run_xdp_live() argument
390 ret = xdp_test_run_batch(&xdp, prog, repeat - t.i); in bpf_test_run_xdp_live()
400 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, in bpf_test_run() argument
404 struct bpf_prog_array_item item = {.prog = prog}; in bpf_test_run()
412 item.cgroup_storage[stype] = bpf_cgroup_storage_alloc(prog, stype); in bpf_test_run()
432 *retval = bpf_prog_run_xdp(prog, ctx); in bpf_test_run()
434 *retval = bpf_prog_run(prog, ctx); in bpf_test_run()
684 int bpf_prog_test_run_tracing(struct bpf_prog *prog, in bpf_prog_test_run_tracing() argument
696 switch (prog->expected_attach_type) { in bpf_prog_test_run_tracing()
735 struct bpf_prog *prog; member
750 info->retval = bpf_prog_run(info->prog, info->ctx); in __bpf_prog_test_run_raw_tp()
756 int bpf_prog_test_run_raw_tp(struct bpf_prog *prog, in bpf_prog_test_run_raw_tp() argument
772 if (ctx_size_in < prog->aux->max_ctx_offset || in bpf_prog_test_run_raw_tp()
787 info.prog = prog; in bpf_prog_test_run_raw_tp()
984 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr, in bpf_prog_test_run_skb() argument
1016 switch (prog->type) { in bpf_prog_test_run_skb()
1099 ret = bpf_test_run(prog, skb, repeat, &retval, &duration, false); in bpf_prog_test_run_skb()
1205 int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr, in bpf_prog_test_run_xdp() argument
1222 if (prog->expected_attach_type == BPF_XDP_DEVMAP || in bpf_prog_test_run_xdp()
1223 prog->expected_attach_type == BPF_XDP_CPUMAP) in bpf_prog_test_run_xdp()
1229 if (bpf_prog_is_dev_bound(prog->aux)) in bpf_prog_test_run_xdp()
1319 bpf_prog_change_xdp(NULL, prog); in bpf_prog_test_run_xdp()
1322 ret = bpf_test_run_xdp_live(prog, &xdp, repeat, batch_size, &duration); in bpf_prog_test_run_xdp()
1324 ret = bpf_test_run(prog, &xdp, repeat, &retval, &duration, true); in bpf_prog_test_run_xdp()
1342 bpf_prog_change_xdp(prog, NULL); in bpf_prog_test_run_xdp()
1367 int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog, in bpf_prog_test_run_flow_dissector() argument
1416 retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN, in bpf_prog_test_run_flow_dissector()
1436 int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog, const union bpf_attr *kattr, in bpf_prog_test_run_sk_lookup() argument
1504 progs->items[0].prog = prog; in bpf_prog_test_run_sk_lookup()
1536 int bpf_prog_test_run_syscall(struct bpf_prog *prog, in bpf_prog_test_run_syscall() argument
1553 if (ctx_size_in < prog->aux->max_ctx_offset || in bpf_prog_test_run_syscall()
1564 retval = bpf_prog_run_pin_on_cpu(prog, ctx); in bpf_prog_test_run_syscall()
1634 int bpf_prog_test_run_nf(struct bpf_prog *prog, in bpf_prog_test_run_nf() argument
1722 ret = bpf_test_run(prog, &ctx, repeat, &retval, &duration, false); in bpf_prog_test_run_nf()