From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id E1F2721FC2A for ; Fri, 18 Sep 2015 05:27:03 -0700 (PDT) Received: by padhy16 with SMTP id hy16so50525375pad.1 for ; Fri, 18 Sep 2015 05:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zNkUlZ05ES64aqbalYWIYCZGK1BZbahqGDQItqgVor8=; b=sF2tHewDbILM00j5UAek8QwWLawVN2M55MuZMePpzAcm94R4e5RGEarNlNT0or5RV5 Mj23J/8EWmKGi6VhJaFLj4xcUI2yx3Nl0YbW7EXY6NxSARGkTrfN8ZQi5pV6cXw9Jzun 2LMLRz8bKhIExWB00rS3qHJHV2srgBaMKLIF/dT79BSbXKW6okkFQUFy/tUrhJ3YtdD9 hIwLCv5JLjKkpAMlv0PER4Af8+fGsyZJugL4VWdisyps6rHaBcLqEciZhhT3CLOmeBjW RMGWhyn7a1REUf3D7bpm8ZtC+dHC1Lpox0xbWKGQ0NHobPm4M6giG5IZjD5ZrzorpdCV 4tlg== MIME-Version: 1.0 X-Received: by 10.66.222.6 with SMTP id qi6mr6905494pac.97.1442579223182; Fri, 18 Sep 2015 05:27:03 -0700 (PDT) Received: by 10.66.23.8 with HTTP; Fri, 18 Sep 2015 05:27:03 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Sep 2015 12:27:03 +0000 Message-ID: From: Loganaden Velvindron To: cake@lists.bufferbloat.net Content-Type: multipart/alternative; boundary=047d7b5d64ca2889ca052004a6cc Subject: Re: [Cake] trivial patch for sch_cake.c X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 12:27:26 -0000 --047d7b5d64ca2889ca052004a6cc Content-Type: text/plain; charset=UTF-8 On Wed, Sep 9, 2015 at 6:35 PM, Loganaden Velvindron wrote: > Hi guys, > > Here's a trivial patch to fix a warning with gcc 5.2, as 1 isn't casted > before being compared with an unsigned integer. Diff below: > > diff --git a/sch_cake.c b/sch_cake.c > index 3ed18d7..aab0fe3 100644 > --- a/sch_cake.c > +++ b/sch_cake.c > @@ -436,7 +436,7 @@ static int cake_enqueue(struct sk_buff *skb, struct Qdisc *sch) > * Split GSO aggregates if they're likely to impair flow isolation > * or if we need to know individual packet sizes for framing overhead. > */ > - if(unlikely((len * max(fqcd->flow_count, 1) > q->peel_threshold && skb_is_gso(skb)))) > + if(unlikely((len * max(fqcd->flow_count, (u32)1) > q->peel_threshold && skb_is_gso(skb)))) > { > struct sk_buff *segs, *nskb; > netdev_features_t features = netif_skb_features(skb); > > > Hi Chromi@, Thanks for fixing that, but in a different way :) --047d7b5d64ca2889ca052004a6cc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Sep 9, 2015 at 6:35 PM, Loganaden Velvindron = <loganaden@gmai= l.com> wrote:
Hi guys,

Here's a trivial patch to fix a warning = with gcc 5.2, as 1 isn't casted before being compared with an unsigned = integer. Diff below:

diff --git a/sch_cake.c b/sch_cake.c
index 3ed18d7..aab0fe3 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -436,7 +436,7 @@ static int cake_enqueue(struct sk_buff *skb, struct Qdi=
sc *sch)
 	 * Split GSO aggregates if they're likely to impair flow isolation
 	 * or if we need to know individual packet sizes for framing overhead.
 	 */
-	if(unlikely((len * max(fqcd->flow_count, 1) > q->peel_threshold =
&& skb_is_gso(skb))))
+	if(unlikely((len * max(fqcd->flow_count, (u32)1) > q->peel_thres=
hold && skb_is_gso(skb))))
 	{
 		struct sk_buff *segs, *nskb;
 		netdev_features_t features =3D netif_skb_features(skb);


Hi Chromi@,

=
Thanks for fixing that, but in a different= way :)




--047d7b5d64ca2889ca052004a6cc--