Lines Matching refs:tb

339 static int cls_bpf_prog_from_ops(struct nlattr **tb, struct cls_bpf_prog *prog)  in cls_bpf_prog_from_ops()  argument
347 bpf_num_ops = nla_get_u16(tb[TCA_BPF_OPS_LEN]); in cls_bpf_prog_from_ops()
352 if (bpf_size != nla_len(tb[TCA_BPF_OPS])) in cls_bpf_prog_from_ops()
355 bpf_ops = kmemdup(nla_data(tb[TCA_BPF_OPS]), bpf_size, GFP_KERNEL); in cls_bpf_prog_from_ops()
376 static int cls_bpf_prog_from_efd(struct nlattr **tb, struct cls_bpf_prog *prog, in cls_bpf_prog_from_efd() argument
384 bpf_fd = nla_get_u32(tb[TCA_BPF_FD]); in cls_bpf_prog_from_efd()
391 if (tb[TCA_BPF_NAME]) { in cls_bpf_prog_from_efd()
392 name = nla_memdup(tb[TCA_BPF_NAME], GFP_KERNEL); in cls_bpf_prog_from_efd()
418 struct nlattr *tb[TCA_BPF_MAX + 1]; in cls_bpf_change() local
427 ret = nla_parse_nested_deprecated(tb, TCA_BPF_MAX, tca[TCA_OPTIONS], in cls_bpf_change()
460 is_bpf = tb[TCA_BPF_OPS_LEN] && tb[TCA_BPF_OPS]; in cls_bpf_change()
461 is_ebpf = tb[TCA_BPF_FD]; in cls_bpf_change()
467 ret = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &prog->exts, in cls_bpf_change()
472 if (tb[TCA_BPF_FLAGS]) { in cls_bpf_change()
473 u32 bpf_flags = nla_get_u32(tb[TCA_BPF_FLAGS]); in cls_bpf_change()
482 if (tb[TCA_BPF_FLAGS_GEN]) { in cls_bpf_change()
483 gen_flags = nla_get_u32(tb[TCA_BPF_FLAGS_GEN]); in cls_bpf_change()
494 ret = is_bpf ? cls_bpf_prog_from_ops(tb, prog) : in cls_bpf_change()
495 cls_bpf_prog_from_efd(tb, prog, gen_flags, tp); in cls_bpf_change()
499 if (tb[TCA_BPF_CLASSID]) { in cls_bpf_change()
500 prog->res.classid = nla_get_u32(tb[TCA_BPF_CLASSID]); in cls_bpf_change()