From owner-freebsd-net@FreeBSD.ORG Fri Jun 14 13:05:17 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A82084C; Fri, 14 Jun 2013 13:05:17 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx1.freebsd.org (Postfix) with ESMTP id E00801DFC; Fri, 14 Jun 2013 13:05:16 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id 10so558248pdc.19 for ; Fri, 14 Jun 2013 06:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=meiL3CTzzk1hBDCJdvDeDCUHLru2VN0z7qIZjCWEczo=; b=iRvztNSiG4QJyEdq3o1Sbk+lqbeBTH2Yv9mX+40DdJGuuQ7+sIvMP/OuI2HBtLecKn nwbetsmgHYl3NM70PcpQo1DvHBdVVW790RvlLlIsbnTPY3B3q2dd0hgmVO9td374MVY+ 8m18ksRZTtd/rmQevmRaGuOg1dhiHBEwuh9JopHEnV3oWgMGRHmaVNuhCfZ6axPEItLc fKs30pihqRUqopQ5gjd/EgDPwa4KgEQz6IZnSV8aXQOD1liunu0D9ivBNHiN0YMzhXbP KiQeuIm4hoBW1A6nYk+K9pY7fCHQPM3NMcqHJAcPp+dObZ3sCFrZPRnHjjb30JMI36wV bW7A== MIME-Version: 1.0 X-Received: by 10.68.164.196 with SMTP id ys4mr2466262pbb.170.1371215116405; Fri, 14 Jun 2013 06:05:16 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.70.56.37 with HTTP; Fri, 14 Jun 2013 06:05:16 -0700 (PDT) In-Reply-To: <51BAF1BA.8000603@freebsd.org> References: <20130614095125.GQ12443@FreeBSD.org> <51BAF1BA.8000603@freebsd.org> Date: Fri, 14 Jun 2013 15:05:16 +0200 X-Google-Sender-Auth: sls5nn1gGVmTtQD89kG9efSiN7w Message-ID: Subject: Re: [PATH] ALTQ(9) codel algorithm implementation From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2013 13:05:17 -0000 On Fri, Jun 14, 2013 at 12:34 PM, Andre Oppermann wrote: > On 14.06.2013 11:51, Gleb Smirnoff wrote: > >> Ermal, >> >> On Mon, Jun 10, 2013 at 03:43:12PM +0200, Ermal Lu?i wrote: >> E> at location [1] can be found a patch for Codel[3] algorithm >> implementation. >> E> >> E> Triggered by a mail to the mailing lists[2] of OpenBSD i completed the >> E> implementation for FreeBSD. >> E> >> E> It allows to use codel as the single configured discipline on an >> interface. >> E> Also it can be used as a sub discipline of existing queueing >> disciplines >> E> already present. >> E> >> E> The work has been tested and confirmed working without issues in >> pfSense. >> E> >> E> Any objections on pushing this into FreeBSD? >> E> >> E> [1] >> E> https://github.com/pfsense/**pfsense-tools/blob/master/** >> patches/RELENG_10_0/altq_**codel.diff >> E> [2] http://permalink.gmane.org/**gmane.os.openbsd.tech/29745 >> E> [3] http://www.bufferbloat.net/**projects/codel/wiki >> >> I'm afraid we can't grow mbuf packet header with 8 bytes just to satisfy >> the ALTQ codel algo, which would definitely have a limited usage among >> FreeBSD users. Thus, "enqueue_time" should go into mbuf_tags(9) not into >> mbuf packet header. >> > > Agreed. We don't have space for that in the mbuf header. There's some > other > fields that may be repurposed though, the header pointer for example which > is > almost entirely unused. With some updates to the TSO and Checksum offload > mechanism I have in the pipeline the "header" field can be easily > repurposed. > > Though I'm against an "obscure" ALTQ mechanism having its own mbuf header > field > as such. It must be a generic field that can be used by others as well. > > -- > Andre > > Yeah i forgot to clarify that. The initial implementation had the added field in tag of pf but for some reason i did not investigate, and this can be a more deep problem the tag not always made it up to ALTQ. Hence it was put in the mbuf header. I did not find a direct way on why the mbuf tag was lost. Also with codel this does give lots of dropped packet hence i choose this way. I do not like to grow the mbuf tag as well but that was the only consistent way to get this to work reliably. -- Ermal