Skip to content

Commit 6c76a07

Browse files
Terry Lamdavem330
authored andcommitted
HHF qdisc: fix jiffies-time conversion.
This is to be compatible with the use of "get_time" (i.e. default time unit in us) in iproute2 patch for HHF as requested by Stephen. Signed-off-by: Terry Lam <[email protected]> Acked-by: Nandita Dukkipati <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f3c0773 commit 6c76a07

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

net/sched/sch_hhf.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -574,18 +574,18 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt)
574574
q->hh_flows_limit = nla_get_u32(tb[TCA_HHF_HH_FLOWS_LIMIT]);
575575

576576
if (tb[TCA_HHF_RESET_TIMEOUT]) {
577-
u32 ms = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
577+
u32 us = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
578578

579-
q->hhf_reset_timeout = msecs_to_jiffies(ms);
579+
q->hhf_reset_timeout = usecs_to_jiffies(us);
580580
}
581581

582582
if (tb[TCA_HHF_ADMIT_BYTES])
583583
q->hhf_admit_bytes = nla_get_u32(tb[TCA_HHF_ADMIT_BYTES]);
584584

585585
if (tb[TCA_HHF_EVICT_TIMEOUT]) {
586-
u32 ms = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
586+
u32 us = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
587587

588-
q->hhf_evict_timeout = msecs_to_jiffies(ms);
588+
q->hhf_evict_timeout = usecs_to_jiffies(us);
589589
}
590590

591591
qlen = sch->q.qlen;
@@ -684,10 +684,10 @@ static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb)
684684
nla_put_u32(skb, TCA_HHF_QUANTUM, q->quantum) ||
685685
nla_put_u32(skb, TCA_HHF_HH_FLOWS_LIMIT, q->hh_flows_limit) ||
686686
nla_put_u32(skb, TCA_HHF_RESET_TIMEOUT,
687-
jiffies_to_msecs(q->hhf_reset_timeout)) ||
687+
jiffies_to_usecs(q->hhf_reset_timeout)) ||
688688
nla_put_u32(skb, TCA_HHF_ADMIT_BYTES, q->hhf_admit_bytes) ||
689689
nla_put_u32(skb, TCA_HHF_EVICT_TIMEOUT,
690-
jiffies_to_msecs(q->hhf_evict_timeout)) ||
690+
jiffies_to_usecs(q->hhf_evict_timeout)) ||
691691
nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight))
692692
goto nla_put_failure;
693693

0 commit comments

Comments
 (0)