Subject: Re: [PATCH net-next v2 1/3] net_sched: tbf: support of 64bit rates

From: Sergei Shtylyov <[email-masked]>
Date: Thu, 07 Nov 2013 18:25:39 +0400

Hello.

On 07-11-2013 6:13, Yang Yingliang wrote:

> With psched_ratecfg_precompute(), tbf can deal with 64bit rates.
> Add two new attributes so that tc can use them to break the 32bit
> limit.

> Signed-off-by: Yang Yingliang <[email-masked]>
[...]

> diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
> index b057122..b736517 100644
> --- a/net/sched/sch_tbf.c
> +++ b/net/sched/sch_tbf.c
[...]
> @@ -402,6 +409,13 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
>   	opt.buffer = PSCHED_NS2TICKS(q->buffer);
>   	if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt))
>   		goto nla_put_failure;
> +	if ((q->rate.rate_bytes_ps >= (1ULL << 32)) &&
> +			nla_put_u64(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps))
> +		goto nla_put_failure;
> +	if (q->peak_present &&
> +			(q->peak.rate_bytes_ps >= (1ULL << 32)) &&
> +			nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps))
> +		goto nla_put_failure;

    According to the networking coding style, the *if* continuation lines 
should start under the next character after (.

WBR, Sergei