From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (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 04EDE201904 for ; Thu, 14 May 2015 19:27:14 -0700 (PDT) Received: by obblk2 with SMTP id lk2so68132073obb.0 for ; Thu, 14 May 2015 19:27:13 -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 :cc:content-type:content-transfer-encoding; bh=nQ1e7iCj4wUZXy2VL4tm8NDDfvYx0LOW4KsPd6E9c8Y=; b=Nv+EK5zQckas15SXj0iTF4SWif7tNL7Jsg7MFBgtaOASLIQLnC83UpS+otNlXR68KE a1Mhj75Tvrj/mV0AA+kLzFHSgttpy+TCoR0m9EkNUfwupWB7PmUIcd2Fv0mugVIBMkq2 vGAIBZe4gV6Mg8MYoads19ZyuSlR/WTclBzrFhfUeUo9XYRC1Ty2u8zlsCZYOf0Wr4e1 VFP+Rad50+WVj2gWk3QD7mcDGNGqN0dmRLIDsM5DphVT2Rifuy0FIpOvh3CeR1lW3h2J 24hFIchI8jkBHjgqPlAPqIo/YpJNrblKS4AF6BiRNXwNw+//wEgjjagQWVle7rEiV//f Xr4w== MIME-Version: 1.0 X-Received: by 10.182.138.68 with SMTP id qo4mr6364746obb.56.1431656833742; Thu, 14 May 2015 19:27:13 -0700 (PDT) Received: by 10.202.71.139 with HTTP; Thu, 14 May 2015 19:27:13 -0700 (PDT) In-Reply-To: <5334C435-218A-48CF-8AB2-F73F76F47216@gmail.com> References: <554F64E1.6000609@gmail.com> <554F9594.60808@gmail.com> <50DB1E31-61AE-4298-B80F-8C6F7487C99B@gmail.com> <002A5BFC-5511-4995-8785-370251F24083@gmx.de> <38FFDA3C-2F67-4831-B316-DF8CC7EF0167@gmail.com> <664C6B9D-67C2-4614-A9B0-140D3BEEA4AD@gmx.de> <444770E9-51C0-4935-8E00-5008CDB388E5@gmail.com> <5334C435-218A-48CF-8AB2-F73F76F47216@gmail.com> Date: Thu, 14 May 2015 19:27:13 -0700 Message-ID: From: Dave Taht To: Jonathan Morton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: cake@lists.bufferbloat.net Subject: Re: [Cake] openwrt build with latest cake and other qdiscs 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, 15 May 2015 02:27:43 -0000 Well, there is a lot of redundant work being done in cake_enqueue in this case - the diffserv lookup (which might not be redundant but usually is), the hashing (which will be), grabbing the timestamp (probably won't hurt to just grab it once for the whole aggregate), and so on down through cake_enqueue I do not have sufficient expertise to evaluate the rest. But would certainly like to benchmark it as is. On Thu, May 14, 2015 at 3:06 PM, Jonathan Morton wr= ote: > >> On 14 May, 2015, at 21:15, Sebastian Moeller wrote: >> >> I guess your idea of peeling for ATM carrier and for >1ms wire time aggr= egates sounds like a decent idea=E2=80=A6 > > Code review time, then: > > /* > * We tolerate GSO aggregates if they occupy < 1ms of wire time > * AND we don't need to perform ATM cell-framing. We're unlikely > * to need the latter above 24Mbps (best ADSL downlink), where > * handling individual packets is still cheap. > * > * But if those conditions aren't met, we need to split it. > */ > if(unlikely(len > (q->rate_bps >> 10) || > (q->rate_flags & CAKE_FLAG_ATM)) && > skb_is_gso(skb)) > { > struct sk_buff *segs, *nskb; > netdev_features_t features =3D netif_skb_features(skb); > int ret =3D NET_XMIT_DROP; > > segs =3D skb_gso_segment(skb, features & ~NETIF_F_GSO_MAS= K); > > if (IS_ERR_OR_NULL(segs)) > return qdisc_reshape_fail(skb, sch); > > while (segs) { > nskb =3D segs->next; > segs->next =3D NULL; > qdisc_skb_cb(segs)->pkt_len =3D segs->len; > > switch(cake_enqueue(segs, sch)) { > case NET_XMIT_CN: > ret =3D NET_XMIT_CN; > /* fall */ > > case NET_XMIT_SUCCESS: > if(ret =3D=3D NET_XMIT_DROP) > ret =3D NET_XMIT_SUCCESS; > qdisc_tree_decrease_qlen(sch, -1)= ; > /* fall */ > > default:; > } > segs =3D nskb; > } > > qdisc_tree_decrease_qlen(sch, 1); > consume_skb(skb); > return ret; > } > > I=E2=80=99m thinking of inserting the above into the beginning of cake_en= queue(). This of course makes it a recursive function (but only by one lev= el). > > A bit of lateral thinking was necessary to convert the equivalent code in= TBF (which relies on a child qdisc to do the actual queuing) into a form t= hat cake could use, so I=E2=80=99m not pushing it to git until someone can = spot what, if anything, I=E2=80=99ve got horribly wrong. However, it does = compile and doesn=E2=80=99t seem to crash when I run it on a box with GSO t= urned on, so it=E2=80=99s probably worth a cautious try. > > One quirk is that, in its current form, it=E2=80=99ll *always* peel GSO a= ggregates in unlimited mode. That=E2=80=99s because rate_bps is zero in th= at case. I could clean up that test by having a separate =E2=80=9Cpeeling = threshold=E2=80=9D calculated at configure time. > > - Jonathan Morton > > _______________________________________________ > Cake mailing list > Cake@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/cake --=20 Dave T=C3=A4ht Open Networking needs **Open Source Hardware** https://plus.google.com/u/0/+EricRaymond/posts/JqxCe2pFr67