Lines Matching refs:tb
176 static int tcf_bpf_init_from_ops(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_ops() argument
184 bpf_num_ops = nla_get_u16(tb[TCA_ACT_BPF_OPS_LEN]); in tcf_bpf_init_from_ops()
189 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) 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()
215 static int tcf_bpf_init_from_efd(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_efd() argument
221 bpf_fd = nla_get_u32(tb[TCA_ACT_BPF_FD]); in tcf_bpf_init_from_efd()
232 if (tb[TCA_ACT_BPF_NAME]) { in tcf_bpf_init_from_efd()
233 name = kmemdup(nla_data(tb[TCA_ACT_BPF_NAME]), in tcf_bpf_init_from_efd()
234 nla_len(tb[TCA_ACT_BPF_NAME]), in tcf_bpf_init_from_efd()
278 struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; in tcf_bpf_init() local
288 ret = nla_parse_nested(tb, TCA_ACT_BPF_MAX, nla, act_bpf_policy); in tcf_bpf_init()
292 if (!tb[TCA_ACT_BPF_PARMS]) in tcf_bpf_init()
295 parm = nla_data(tb[TCA_ACT_BPF_PARMS]); in tcf_bpf_init()
314 is_bpf = tb[TCA_ACT_BPF_OPS_LEN] && tb[TCA_ACT_BPF_OPS]; in tcf_bpf_init()
315 is_ebpf = tb[TCA_ACT_BPF_FD]; in tcf_bpf_init()
324 ret = is_bpf ? tcf_bpf_init_from_ops(tb, &cfg) : in tcf_bpf_init()
325 tcf_bpf_init_from_efd(tb, &cfg); in tcf_bpf_init()