Lines Matching refs:tb

184 static int cls_bpf_prog_from_ops(struct nlattr **tb,  in cls_bpf_prog_from_ops()  argument
193 bpf_num_ops = nla_get_u16(tb[TCA_BPF_OPS_LEN]); in cls_bpf_prog_from_ops()
198 if (bpf_size != nla_len(tb[TCA_BPF_OPS])) in cls_bpf_prog_from_ops()
205 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); in cls_bpf_prog_from_ops()
226 static int cls_bpf_prog_from_efd(struct nlattr **tb, in cls_bpf_prog_from_efd() argument
233 bpf_fd = nla_get_u32(tb[TCA_BPF_FD]); in cls_bpf_prog_from_efd()
244 if (tb[TCA_BPF_NAME]) { in cls_bpf_prog_from_efd()
245 name = kmemdup(nla_data(tb[TCA_BPF_NAME]), in cls_bpf_prog_from_efd()
246 nla_len(tb[TCA_BPF_NAME]), in cls_bpf_prog_from_efd()
266 unsigned long base, struct nlattr **tb, in cls_bpf_modify_existing() argument
274 is_bpf = tb[TCA_BPF_OPS_LEN] && tb[TCA_BPF_OPS]; in cls_bpf_modify_existing()
275 is_ebpf = tb[TCA_BPF_FD]; in cls_bpf_modify_existing()
278 !tb[TCA_BPF_CLASSID]) in cls_bpf_modify_existing()
282 ret = tcf_exts_validate(net, tp, tb, est, &exts, ovr); in cls_bpf_modify_existing()
286 classid = nla_get_u32(tb[TCA_BPF_CLASSID]); in cls_bpf_modify_existing()
288 ret = is_bpf ? cls_bpf_prog_from_ops(tb, prog, classid) : in cls_bpf_modify_existing()
289 cls_bpf_prog_from_efd(tb, prog, classid); in cls_bpf_modify_existing()
329 struct nlattr *tb[TCA_BPF_MAX + 1]; in cls_bpf_change() local
336 ret = nla_parse_nested(tb, TCA_BPF_MAX, tca[TCA_OPTIONS], bpf_policy); in cls_bpf_change()
362 ret = cls_bpf_modify_existing(net, tp, prog, base, tb, tca[TCA_RATE], ovr); in cls_bpf_change()