Lines Matching refs:tb

226 static int cls_bpf_prog_from_ops(struct nlattr **tb, struct cls_bpf_prog *prog)  in cls_bpf_prog_from_ops()  argument
234 bpf_num_ops = nla_get_u16(tb[TCA_BPF_OPS_LEN]); in cls_bpf_prog_from_ops()
239 if (bpf_size != nla_len(tb[TCA_BPF_OPS])) in cls_bpf_prog_from_ops()
246 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); in cls_bpf_prog_from_ops()
265 static int cls_bpf_prog_from_efd(struct nlattr **tb, struct cls_bpf_prog *prog, in cls_bpf_prog_from_efd() argument
272 bpf_fd = nla_get_u32(tb[TCA_BPF_FD]); in cls_bpf_prog_from_efd()
283 if (tb[TCA_BPF_NAME]) { in cls_bpf_prog_from_efd()
284 name = kmemdup(nla_data(tb[TCA_BPF_NAME]), in cls_bpf_prog_from_efd()
285 nla_len(tb[TCA_BPF_NAME]), in cls_bpf_prog_from_efd()
306 unsigned long base, struct nlattr **tb, in cls_bpf_modify_existing() argument
313 is_bpf = tb[TCA_BPF_OPS_LEN] && tb[TCA_BPF_OPS]; in cls_bpf_modify_existing()
314 is_ebpf = tb[TCA_BPF_FD]; in cls_bpf_modify_existing()
319 ret = tcf_exts_validate(net, tp, tb, est, &exts, ovr); in cls_bpf_modify_existing()
323 if (tb[TCA_BPF_FLAGS]) { in cls_bpf_modify_existing()
324 u32 bpf_flags = nla_get_u32(tb[TCA_BPF_FLAGS]); in cls_bpf_modify_existing()
336 ret = is_bpf ? cls_bpf_prog_from_ops(tb, prog) : in cls_bpf_modify_existing()
337 cls_bpf_prog_from_efd(tb, prog, tp); in cls_bpf_modify_existing()
343 if (tb[TCA_BPF_CLASSID]) { in cls_bpf_modify_existing()
344 prog->res.classid = nla_get_u32(tb[TCA_BPF_CLASSID]); in cls_bpf_modify_existing()
380 struct nlattr *tb[TCA_BPF_MAX + 1]; in cls_bpf_change() local
387 ret = nla_parse_nested(tb, TCA_BPF_MAX, tca[TCA_OPTIONS], bpf_policy); in cls_bpf_change()
413 ret = cls_bpf_modify_existing(net, tp, prog, base, tb, tca[TCA_RATE], ovr); in cls_bpf_change()