Lines Matching defs:opt
626 static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
629 struct tc_sfq_qopt *ctl = nla_data(opt);
636 if (opt->nla_len < nla_attr_size(sizeof(*ctl)))
638 if (opt->nla_len >= nla_attr_size(sizeof(*ctl_v1)))
639 ctl_v1 = nla_data(opt);
734 static int sfq_init(struct Qdisc *sch, struct nlattr *opt,
764 if (opt) {
765 int err = sfq_change(sch, opt);
795 struct tc_sfq_qopt_v1 opt;
798 memset(&opt, 0, sizeof(opt));
799 opt.v0.quantum = q->quantum;
800 opt.v0.perturb_period = q->perturb_period / HZ;
801 opt.v0.limit = q->limit;
802 opt.v0.divisor = q->divisor;
803 opt.v0.flows = q->maxflows;
804 opt.depth = q->maxdepth;
805 opt.headdrop = q->headdrop;
808 opt.qth_min = p->qth_min >> p->Wlog;
809 opt.qth_max = p->qth_max >> p->Wlog;
810 opt.Wlog = p->Wlog;
811 opt.Plog = p->Plog;
812 opt.Scell_log = p->Scell_log;
813 opt.max_P = p->max_P;
815 memcpy(&opt.stats, &q->stats, sizeof(opt.stats));
816 opt.flags = q->flags;
818 if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt))