Lines Matching refs:tb
170 static int tcf_bpf_init_from_ops(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_ops() argument
178 bpf_num_ops = nla_get_u16(tb[TCA_ACT_BPF_OPS_LEN]); in tcf_bpf_init_from_ops()
183 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) 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()
209 static int tcf_bpf_init_from_efd(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_efd() argument
215 bpf_fd = nla_get_u32(tb[TCA_ACT_BPF_FD]); in tcf_bpf_init_from_efd()
226 if (tb[TCA_ACT_BPF_NAME]) { in tcf_bpf_init_from_efd()
227 name = kmemdup(nla_data(tb[TCA_ACT_BPF_NAME]), in tcf_bpf_init_from_efd()
228 nla_len(tb[TCA_ACT_BPF_NAME]), in tcf_bpf_init_from_efd()
269 struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; in tcf_bpf_init() local
279 ret = nla_parse_nested(tb, TCA_ACT_BPF_MAX, nla, act_bpf_policy); in tcf_bpf_init()
283 is_bpf = tb[TCA_ACT_BPF_OPS_LEN] && tb[TCA_ACT_BPF_OPS]; in tcf_bpf_init()
284 is_ebpf = tb[TCA_ACT_BPF_FD]; in tcf_bpf_init()
287 !tb[TCA_ACT_BPF_PARMS]) in tcf_bpf_init()
290 parm = nla_data(tb[TCA_ACT_BPF_PARMS]); in tcf_bpf_init()
294 ret = is_bpf ? tcf_bpf_init_from_ops(tb, &cfg) : in tcf_bpf_init()
295 tcf_bpf_init_from_efd(tb, &cfg); in tcf_bpf_init()