netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HHF qdisc: fix jiffies-time conversion.
@ 2014-01-09  8:40 Terry Lam
  2014-01-10 19:02 ` Nandita Dukkipati
  2014-01-13 19:20 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Terry Lam @ 2014-01-09  8:40 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Nandita Dukkipati, Stephen Hemminger, Terry Lam

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>
---
 net/sched/sch_hhf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index cf7f614..1cf84a9 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)
 		q->hh_flows_limit = nla_get_u32(tb[TCA_HHF_HH_FLOWS_LIMIT]);
 
 	if (tb[TCA_HHF_RESET_TIMEOUT]) {
-		u32 ms = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
+		u32 us = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
 
-		q->hhf_reset_timeout = msecs_to_jiffies(ms);
+		q->hhf_reset_timeout = usecs_to_jiffies(us);
 	}
 
 	if (tb[TCA_HHF_ADMIT_BYTES])
 		q->hhf_admit_bytes = nla_get_u32(tb[TCA_HHF_ADMIT_BYTES]);
 
 	if (tb[TCA_HHF_EVICT_TIMEOUT]) {
-		u32 ms = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
+		u32 us = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
 
-		q->hhf_evict_timeout = msecs_to_jiffies(ms);
+		q->hhf_evict_timeout = usecs_to_jiffies(us);
 	}
 
 	qlen = sch->q.qlen;
@@ -684,10 +684,10 @@ static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb)
 	    nla_put_u32(skb, TCA_HHF_QUANTUM, q->quantum) ||
 	    nla_put_u32(skb, TCA_HHF_HH_FLOWS_LIMIT, q->hh_flows_limit) ||
 	    nla_put_u32(skb, TCA_HHF_RESET_TIMEOUT,
-			jiffies_to_msecs(q->hhf_reset_timeout)) ||
+			jiffies_to_usecs(q->hhf_reset_timeout)) ||
 	    nla_put_u32(skb, TCA_HHF_ADMIT_BYTES, q->hhf_admit_bytes) ||
 	    nla_put_u32(skb, TCA_HHF_EVICT_TIMEOUT,
-			jiffies_to_msecs(q->hhf_evict_timeout)) ||
+			jiffies_to_usecs(q->hhf_evict_timeout)) ||
 	    nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight))
 		goto nla_put_failure;
 
-- 
1.8.5.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HHF qdisc: fix jiffies-time conversion.
  2014-01-09  8:40 [PATCH] HHF qdisc: fix jiffies-time conversion Terry Lam
@ 2014-01-10 19:02 ` Nandita Dukkipati
  2014-01-13 19:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nandita Dukkipati @ 2014-01-10 19:02 UTC (permalink / raw)
  To: Terry Lam; +Cc: David S. Miller, Netdev, Stephen Hemminger

On Thu, Jan 9, 2014 at 12:40 AM, Terry Lam <vtlam@google.com> wrote:
> 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>
> ---
>  net/sched/sch_hhf.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
> index cf7f614..1cf84a9 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)
>                 q->hh_flows_limit = nla_get_u32(tb[TCA_HHF_HH_FLOWS_LIMIT]);
>
>         if (tb[TCA_HHF_RESET_TIMEOUT]) {
> -               u32 ms = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
> +               u32 us = nla_get_u32(tb[TCA_HHF_RESET_TIMEOUT]);
>
> -               q->hhf_reset_timeout = msecs_to_jiffies(ms);
> +               q->hhf_reset_timeout = usecs_to_jiffies(us);
>         }
>
>         if (tb[TCA_HHF_ADMIT_BYTES])
>                 q->hhf_admit_bytes = nla_get_u32(tb[TCA_HHF_ADMIT_BYTES]);
>
>         if (tb[TCA_HHF_EVICT_TIMEOUT]) {
> -               u32 ms = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
> +               u32 us = nla_get_u32(tb[TCA_HHF_EVICT_TIMEOUT]);
>
> -               q->hhf_evict_timeout = msecs_to_jiffies(ms);
> +               q->hhf_evict_timeout = usecs_to_jiffies(us);
>         }
>
>         qlen = sch->q.qlen;
> @@ -684,10 +684,10 @@ static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb)
>             nla_put_u32(skb, TCA_HHF_QUANTUM, q->quantum) ||
>             nla_put_u32(skb, TCA_HHF_HH_FLOWS_LIMIT, q->hh_flows_limit) ||
>             nla_put_u32(skb, TCA_HHF_RESET_TIMEOUT,
> -                       jiffies_to_msecs(q->hhf_reset_timeout)) ||
> +                       jiffies_to_usecs(q->hhf_reset_timeout)) ||
>             nla_put_u32(skb, TCA_HHF_ADMIT_BYTES, q->hhf_admit_bytes) ||
>             nla_put_u32(skb, TCA_HHF_EVICT_TIMEOUT,
> -                       jiffies_to_msecs(q->hhf_evict_timeout)) ||
> +                       jiffies_to_usecs(q->hhf_evict_timeout)) ||
>             nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight))
>                 goto nla_put_failure;
>
> --
> 1.8.5.1
>
Acked-by: Nandita Dukkipati <nanditad@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HHF qdisc: fix jiffies-time conversion.
  2014-01-09  8:40 [PATCH] HHF qdisc: fix jiffies-time conversion Terry Lam
  2014-01-10 19:02 ` Nandita Dukkipati
@ 2014-01-13 19:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-13 19:20 UTC (permalink / raw)
  To: vtlam; +Cc: netdev, nanditad, stephen

From: Terry Lam <vtlam@google.com>
Date: Thu,  9 Jan 2014 00:40:00 -0800

> 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>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-13 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09  8:40 [PATCH] HHF qdisc: fix jiffies-time conversion Terry Lam
2014-01-10 19:02 ` Nandita Dukkipati
2014-01-13 19:20 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).