Home
last modified time | relevance | path

Searched refs:bpf_size (Results 1 – 5 of 5) sorted by relevance

/linux-4.1.27/net/sched/
Dact_bpf.c175 u16 bpf_size, bpf_num_ops; in tcf_bpf_init_from_ops() local
182 bpf_size = bpf_num_ops * sizeof(*bpf_ops); in tcf_bpf_init_from_ops()
183 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) in tcf_bpf_init_from_ops()
186 bpf_ops = kzalloc(bpf_size, GFP_KERNEL); in tcf_bpf_init_from_ops()
190 memcpy(bpf_ops, nla_data(tb[TCA_ACT_BPF_OPS]), bpf_size); in tcf_bpf_init_from_ops()
Dcls_bpf.c190 u16 bpf_size, bpf_num_ops; in cls_bpf_prog_from_ops() local
197 bpf_size = bpf_num_ops * sizeof(*bpf_ops); in cls_bpf_prog_from_ops()
198 if (bpf_size != nla_len(tb[TCA_BPF_OPS])) in cls_bpf_prog_from_ops()
201 bpf_ops = kzalloc(bpf_size, GFP_KERNEL); in cls_bpf_prog_from_ops()
205 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); in cls_bpf_prog_from_ops()
/linux-4.1.27/include/linux/
Dfilter.h272 int bpf_size = -EINVAL; \
275 bpf_size = BPF_B; \
277 bpf_size = BPF_H; \
279 bpf_size = BPF_W; \
281 bpf_size = BPF_DW; \
283 bpf_size; \
/linux-4.1.27/arch/x86/net/
Dbpf_jit_comp.c71 static int bpf_size_to_x86_bytes(int bpf_size) in bpf_size_to_x86_bytes() argument
73 if (bpf_size == BPF_W) in bpf_size_to_x86_bytes()
75 else if (bpf_size == BPF_H) in bpf_size_to_x86_bytes()
77 else if (bpf_size == BPF_B) in bpf_size_to_x86_bytes()
79 else if (bpf_size == BPF_DW) in bpf_size_to_x86_bytes()
/linux-4.1.27/kernel/bpf/
Dverifier.c519 static int bpf_size_to_bytes(int bpf_size) in bpf_size_to_bytes() argument
521 if (bpf_size == BPF_W) in bpf_size_to_bytes()
523 else if (bpf_size == BPF_H) in bpf_size_to_bytes()
525 else if (bpf_size == BPF_B) in bpf_size_to_bytes()
527 else if (bpf_size == BPF_DW) in bpf_size_to_bytes()
645 int bpf_size, enum bpf_access_type t, in check_mem_access() argument
651 size = bpf_size_to_bytes(bpf_size); in check_mem_access()