/net/sched/ |
D | cls_bpf.c | 89 struct cls_bpf_prog *prog; in cls_bpf_classify() local 94 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify() 97 qdisc_skb_cb(skb)->tc_classid = prog->res.classid; in cls_bpf_classify() 99 if (tc_skip_sw(prog->gen_flags)) { in cls_bpf_classify() 100 filter_res = prog->exts_integrated ? TC_ACT_UNSPEC : 0; in cls_bpf_classify() 105 filter_res = BPF_PROG_RUN(prog->filter, skb); in cls_bpf_classify() 109 filter_res = BPF_PROG_RUN(prog->filter, skb); in cls_bpf_classify() 112 if (prog->exts_integrated) { in cls_bpf_classify() 114 res->classid = TC_H_MAJ(prog->res.classid) | in cls_bpf_classify() 129 *res = prog->res; in cls_bpf_classify() [all …]
|
D | act_bpf.c | 43 struct tcf_bpf *prog = to_bpf(act); in tcf_bpf() local 47 tcf_lastuse_update(&prog->tcf_tm); in tcf_bpf() 48 bstats_cpu_update(this_cpu_ptr(prog->common.cpu_bstats), skb); in tcf_bpf() 51 filter = rcu_dereference(prog->filter); in tcf_bpf() 82 qstats_drop_inc(this_cpu_ptr(prog->common.cpu_qstats)); in tcf_bpf() 85 action = prog->tcf_action; in tcf_bpf() 95 static bool tcf_bpf_is_ebpf(const struct tcf_bpf *prog) in tcf_bpf_is_ebpf() argument 97 return !prog->bpf_ops; in tcf_bpf_is_ebpf() 100 static int tcf_bpf_dump_bpf_info(const struct tcf_bpf *prog, in tcf_bpf_dump_bpf_info() argument 105 if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog->bpf_num_ops)) in tcf_bpf_dump_bpf_info() [all …]
|
/net/core/ |
D | sock_reuseport.c | 27 RCU_INIT_POINTER(reuse->prog, NULL); in __reuseport_alloc() 79 more_reuse->prog = reuse->prog; in reuseport_grow() 101 if (reuse->prog) in reuseport_free_rcu() 102 bpf_prog_destroy(reuse->prog); in reuseport_free_rcu() 178 struct bpf_prog *prog, struct sk_buff *skb, in run_bpf() argument 196 index = bpf_prog_run_save_cb(prog, skb); in run_bpf() 223 struct bpf_prog *prog; in reuseport_select_sock() local 234 prog = rcu_dereference(reuse->prog); in reuseport_select_sock() 240 if (prog && skb) in reuseport_select_sock() 241 sk2 = run_bpf(reuse, socks, prog, skb, hdr_len); in reuseport_select_sock() [all …]
|
D | filter.c | 97 pkt_len = bpf_prog_run_save_cb(filter->prog, skb); in sk_filter_trim_cap() 366 static int bpf_convert_filter(struct sock_filter *prog, int len, in bpf_convert_filter() argument 390 fp = prog; in bpf_convert_filter() 904 static void __bpf_prog_release(struct bpf_prog *prog) in __bpf_prog_release() argument 906 if (prog->type == BPF_PROG_TYPE_SOCKET_FILTER) { in __bpf_prog_release() 907 bpf_prog_put(prog); in __bpf_prog_release() 909 bpf_release_orig_filter(prog); in __bpf_prog_release() 910 bpf_prog_free(prog); in __bpf_prog_release() 916 __bpf_prog_release(fp->prog); in __sk_filter_release() 945 u32 filter_size = bpf_prog_size(fp->prog->len); in sk_filter_uncharge() [all …]
|
D | sock_diag.c | 95 fprog = filter->prog->orig_prog; in sock_diag_put_filterinfo()
|
D | dev.c | 6731 struct bpf_prog *prog = NULL; in dev_change_xdp_fd() local 6738 prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_XDP); in dev_change_xdp_fd() 6739 if (IS_ERR(prog)) in dev_change_xdp_fd() 6740 return PTR_ERR(prog); in dev_change_xdp_fd() 6744 xdp.prog = prog; in dev_change_xdp_fd() 6746 if (err < 0 && prog) in dev_change_xdp_fd() 6747 bpf_prog_put(prog); in dev_change_xdp_fd()
|
/net/sunrpc/ |
D | svc.c | 423 __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, in __svc_create() argument 433 serv->sv_name = prog->pg_name; in __svc_create() 434 serv->sv_program = prog; in __svc_create() 436 serv->sv_stats = prog->pg_stats; in __svc_create() 443 while (prog) { in __svc_create() 444 prog->pg_lovers = prog->pg_nvers-1; in __svc_create() 445 for (vers=0; vers<prog->pg_nvers ; vers++) in __svc_create() 446 if (prog->pg_vers[vers]) { in __svc_create() 447 prog->pg_hivers = vers; in __svc_create() 448 if (prog->pg_lovers > vers) in __svc_create() [all …]
|
D | stats.c | 36 const struct rpc_program *prog = statp->program; in rpc_proc_show() local 51 for (i = 0; i < prog->nrvers; i++) { in rpc_proc_show() 52 const struct rpc_version *vers = prog->version[i]; in rpc_proc_show() 82 const struct svc_program *prog = statp->program; in svc_seq_show() local 101 for (i = 0; i < prog->pg_nvers; i++) { in svc_seq_show() 102 if (!(vers = prog->pg_vers[i]) || !(proc = vers->vs_proc)) in svc_seq_show()
|
D | rpcb_clnt.c | 445 int rpcb_register(struct net *net, u32 prog, u32 vers, int prot, unsigned short port) in rpcb_register() argument 448 .r_prog = prog, in rpcb_register() 461 prog, vers, prot, port); in rpcb_register()
|
/net/netfilter/ |
D | xt_bpf.c | 46 struct bpf_prog *prog; in __bpf_mt_check_fd() local 48 prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_SOCKET_FILTER); in __bpf_mt_check_fd() 49 if (IS_ERR(prog)) in __bpf_mt_check_fd() 50 return PTR_ERR(prog); in __bpf_mt_check_fd() 52 *ret = prog; in __bpf_mt_check_fd()
|
/net/kcm/ |
D | kcmsock.c | 381 struct bpf_prog *prog = psock->bpf_prog; in kcm_parse_func_strparser() local 383 return (*prog->bpf_func)(skb, prog->insnsi); in kcm_parse_func_strparser() 1369 struct bpf_prog *prog) in kcm_attach() argument 1407 psock->bpf_prog = prog; in kcm_attach() 1475 struct bpf_prog *prog; in kcm_attach_ioctl() local 1482 prog = bpf_prog_get_type(info->bpf_fd, BPF_PROG_TYPE_SOCKET_FILTER); in kcm_attach_ioctl() 1483 if (IS_ERR(prog)) { in kcm_attach_ioctl() 1484 err = PTR_ERR(prog); in kcm_attach_ioctl() 1488 err = kcm_attach(sock, csock, prog); in kcm_attach_ioctl() 1490 bpf_prog_put(prog); in kcm_attach_ioctl()
|
/net/packet/ |
D | af_packet.c | 1426 struct bpf_prog *prog; in fanout_demux_bpf() local 1430 prog = rcu_dereference(f->bpf_prog); in fanout_demux_bpf() 1431 if (prog) in fanout_demux_bpf() 1432 ret = bpf_prog_run_clear_cb(prog, skb) % num; in fanout_demux_bpf() 1985 res = bpf_prog_run_clear_cb(filter->prog, skb); in run_filter()
|