diff options
author | Terry Lam <vtlam@google.com> | 2014-01-09 03:40:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-13 14:20:39 -0500 |
commit | 6c76a07a711165a31332aa619215f961b115071d (patch) | |
tree | 2653a63f2edf9877af39146f99f3bb1257ae6271 /net/sched/sch_hhf.c | |
parent | f3c0773ff2875af6497c20cf63e42c186e19eef0 (diff) |
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 <vtlam@google.com>
Acked-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hhf.c')
-rw-r--r-- | net/sched/sch_hhf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c index cf7f614e841b..1cf84a9e13aa 100644 --- a/net/sched/sch_hhf.c +++ b/net/sched/sch_hhf.c | |||
@@ -574,18 +574,18 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt) | |||
574 | q->hh_flows_limit = nla_get_u32(tb[TCA_HHF_HH_FLOWS_LIMIT]); | 574 | q->hh_flows_limit = nla_get_u32(tb[TCA_HHF_HH_FLOWS_LIMIT]); |
575 | 575 | ||
576 | if (tb[TCA_HHF_RESET_TIMEOUT]) { | 576 | 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]); |
578 | 578 | ||
579 | q->hhf_reset_timeout = msecs_to_jiffies(ms); | 579 | q->hhf_reset_timeout = usecs_to_jiffies(us); |
580 | } | 580 | } |
581 | 581 | ||
582 | if (tb[TCA_HHF_ADMIT_BYTES]) | 582 | if (tb[TCA_HHF_ADMIT_BYTES]) |
583 | q->hhf_admit_bytes = nla_get_u32(tb[TCA_HHF_ADMIT_BYTES]); | 583 | q->hhf_admit_bytes = nla_get_u32(tb[TCA_HHF_ADMIT_BYTES]); |
584 | 584 | ||
585 | if (tb[TCA_HHF_EVICT_TIMEOUT]) { | 585 | 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]); |
587 | 587 | ||
588 | q->hhf_evict_timeout = msecs_to_jiffies(ms); | 588 | q->hhf_evict_timeout = usecs_to_jiffies(us); |
589 | } | 589 | } |
590 | 590 | ||
591 | qlen = sch->q.qlen; | 591 | qlen = sch->q.qlen; |
@@ -684,10 +684,10 @@ static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
684 | nla_put_u32(skb, TCA_HHF_QUANTUM, q->quantum) || | 684 | nla_put_u32(skb, TCA_HHF_QUANTUM, q->quantum) || |
685 | nla_put_u32(skb, TCA_HHF_HH_FLOWS_LIMIT, q->hh_flows_limit) || | 685 | nla_put_u32(skb, TCA_HHF_HH_FLOWS_LIMIT, q->hh_flows_limit) || |
686 | nla_put_u32(skb, TCA_HHF_RESET_TIMEOUT, | 686 | nla_put_u32(skb, TCA_HHF_RESET_TIMEOUT, |
687 | jiffies_to_msecs(q->hhf_reset_timeout)) || | 687 | jiffies_to_usecs(q->hhf_reset_timeout)) || |
688 | nla_put_u32(skb, TCA_HHF_ADMIT_BYTES, q->hhf_admit_bytes) || | 688 | nla_put_u32(skb, TCA_HHF_ADMIT_BYTES, q->hhf_admit_bytes) || |
689 | nla_put_u32(skb, TCA_HHF_EVICT_TIMEOUT, | 689 | nla_put_u32(skb, TCA_HHF_EVICT_TIMEOUT, |
690 | jiffies_to_msecs(q->hhf_evict_timeout)) || | 690 | jiffies_to_usecs(q->hhf_evict_timeout)) || |
691 | nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight)) | 691 | nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight)) |
692 | goto nla_put_failure; | 692 | goto nla_put_failure; |
693 | 693 | ||