From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from snapon.lab.bufferbloat.net (unknown [IPv6:2001:4f8:3:203::c001]) by huchra.bufferbloat.net (Postfix) with ESMTP id 99AF0208AAD; Mon, 21 Oct 2013 18:20:03 -0700 (PDT) Received: by snapon.lab.bufferbloat.net (Postfix, from userid 1005) id 815BB220DDA; Mon, 21 Oct 2013 18:20:03 -0700 (PDT) From: Dave Taht To: netdev@vger.kernel.org, codel@lists.bufferbloat.net Date: Mon, 21 Oct 2013 18:19:57 -0700 Message-Id: <1382404797-17239-3-git-send-email-dave.taht@bufferbloat.net> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382404797-17239-1-git-send-email-dave.taht@bufferbloat.net> References: <1382404797-17239-1-git-send-email-dave.taht@bufferbloat.net> Cc: Dave Taht Subject: [Codel] [PATCH 2/2] codel: eliminate maxpacket as an inner bound X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2013 01:20:04 -0000 As there is always at least one packet in the device driver or rate limiter, the maxpacket bound (an artifact of the ns2 code) is unneeded. Also: in the case of TSO/GSO/GRO, it can scale well above (to 64k) what codel's designers intended. Someday the maxpacket variable could be eliminated entirely, but for now it is a useful indicator of "oops, I didn't turn off tso/gso/gro somewhere". Signed-off-by: Dave Taht --- include/net/codel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/codel.h b/include/net/codel.h index 389cf62..319a296 100644 --- a/include/net/codel.h +++ b/include/net/codel.h @@ -225,7 +225,7 @@ static bool codel_should_drop(const struct sk_buff *skb, stats->maxpacket = qdisc_pkt_len(skb); if (codel_time_before(vars->ldelay, params->target) || - sch->qstats.backlog <= stats->maxpacket) { + sch->qstats.backlog <= 0) { /* went below - stay below for at least interval */ vars->first_above_time = 0; return false; -- 1.7.9.5