Home
last modified time | relevance | path

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

/linux-4.4.14/net/sched/
Dact_bpf.c181 u16 bpf_size, bpf_num_ops; in tcf_bpf_init_from_ops() local
188 bpf_size = bpf_num_ops * sizeof(*bpf_ops); in tcf_bpf_init_from_ops()
189 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) in tcf_bpf_init_from_ops()
192 bpf_ops = kzalloc(bpf_size, GFP_KERNEL); in tcf_bpf_init_from_ops()
196 memcpy(bpf_ops, nla_data(tb[TCA_ACT_BPF_OPS]), bpf_size); in tcf_bpf_init_from_ops()
Dcls_bpf.c231 u16 bpf_size, bpf_num_ops; in cls_bpf_prog_from_ops() local
238 bpf_size = bpf_num_ops * sizeof(*bpf_ops); in cls_bpf_prog_from_ops()
239 if (bpf_size != nla_len(tb[TCA_BPF_OPS])) in cls_bpf_prog_from_ops()
242 bpf_ops = kzalloc(bpf_size, GFP_KERNEL); in cls_bpf_prog_from_ops()
246 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); in cls_bpf_prog_from_ops()
/linux-4.4.14/include/linux/
Dfilter.h292 int bpf_size = -EINVAL; \
295 bpf_size = BPF_B; \
297 bpf_size = BPF_H; \
299 bpf_size = BPF_W; \
301 bpf_size = BPF_DW; \
303 bpf_size; \
/linux-4.4.14/arch/x86/net/
Dbpf_jit_comp.c73 static int bpf_size_to_x86_bytes(int bpf_size) in bpf_size_to_x86_bytes() argument
75 if (bpf_size == BPF_W) in bpf_size_to_x86_bytes()
77 else if (bpf_size == BPF_H) in bpf_size_to_x86_bytes()
79 else if (bpf_size == BPF_B) in bpf_size_to_x86_bytes()
81 else if (bpf_size == BPF_DW) in bpf_size_to_x86_bytes()
/linux-4.4.14/kernel/bpf/
Dverifier.c520 static int bpf_size_to_bytes(int bpf_size) in bpf_size_to_bytes() argument
522 if (bpf_size == BPF_W) in bpf_size_to_bytes()
524 else if (bpf_size == BPF_H) in bpf_size_to_bytes()
526 else if (bpf_size == BPF_B) in bpf_size_to_bytes()
528 else if (bpf_size == BPF_DW) in bpf_size_to_bytes()
673 int bpf_size, enum bpf_access_type t, in check_mem_access() argument
682 size = bpf_size_to_bytes(bpf_size); in check_mem_access()