[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1360341589.28557.102.camel@edumazet-glaptop>
Date: Fri, 08 Feb 2013 08:39:49 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
jhs@...atatu.com, kuznet@....inr.ac.ru
Subject: Re: [patch net-next 5/7] sch: make htb_rate_cfg and functions
around that generic
On Fri, 2013-02-08 at 13:58 +0100, Jiri Pirko wrote:
> As it is going to be used in tbf as well, push these to generic code.
>
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---
> include/net/sch_generic.h | 18 +++++++++++++
> net/sched/sch_generic.c | 37 +++++++++++++++++++++++++++
> net/sched/sch_htb.c | 65 +++++++----------------------------------------
> 3 files changed, 64 insertions(+), 56 deletions(-)
>
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index 2d06c2a..c7e5512 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -679,4 +679,22 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
> }
> #endif
>
> +struct psched_ratecfg {
> + u64 rate_bps;
> + u32 mult;
> + u32 shift;
> +};
> +
> +static inline u64 psched_l2t_ns(struct psched_ratecfg *r, unsigned int len)
const struct psched_ratecfg *r
> +{
> + return ((u64)len * r->mult) >> r->shift;
> +}
> +
> +extern void psched_ratecfg_precompute(struct psched_ratecfg *r, u32 rate);
> +
> +static inline u32 psched_ratecfg_getrate(struct psched_ratecfg *r)
const struct psched_ratecfg *r
> +{
> + return r->rate_bps >> 3;
> +}
> +
other than that, patch is fine.
Acked-by: Eric Dumazet <edumazet@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists