bpf_size
u32 dst_reg, u32 src_reg, s16 off, u8 bpf_size)
maybe_emit_mod(&prog, dst_reg, src_reg, bpf_size == BPF_DW);
static int bpf_size_to_x86_bytes(int bpf_size)
if (bpf_size == BPF_W)
u32 src_reg, s16 off, u8 bpf_size)
emit_ldx(pprog, bpf_size, dst_reg, src_reg, off);
emit_stx(pprog, bpf_size, dst_reg, src_reg, off);
else if (bpf_size == BPF_H)
else if (bpf_size == BPF_B)
else if (bpf_size == BPF_DW)
static int bpf_size_to_x86_bytes(int bpf_size)
if (bpf_size == BPF_W)
else if (bpf_size == BPF_H)
else if (bpf_size == BPF_B)
else if (bpf_size == BPF_DW)
int bpf_size = -EINVAL; \
bpf_size = BPF_B; \
bpf_size = BPF_H; \
bpf_size = BPF_W; \
bpf_size = BPF_DW; \
bpf_size; \
#define bpf_size_to_bytes(bpf_size) \
if (bpf_size == BPF_B) \
else if (bpf_size == BPF_H) \
else if (bpf_size == BPF_W) \
else if (bpf_size == BPF_DW) \
int off, int bpf_size, enum bpf_access_type t,
size = bpf_size_to_bytes(bpf_size);
if (bpf_size != BPF_DW) {
u16 bpf_size, bpf_num_ops;
bpf_size = bpf_num_ops * sizeof(*bpf_ops);
if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS]))
bpf_ops = kmemdup(nla_data(tb[TCA_ACT_BPF_OPS]), bpf_size, GFP_KERNEL);
u16 bpf_size, bpf_num_ops;
bpf_size = bpf_num_ops * sizeof(*bpf_ops);
if (bpf_size != nla_len(tb[TCA_BPF_OPS]))
bpf_ops = kmemdup(nla_data(tb[TCA_BPF_OPS]), bpf_size, GFP_KERNEL);
return bpf_size(dso);