[Codel] [PATCH 2/2] codel: eliminate maxpacket as an inner bound

Dave Taht dave.taht at bufferbloat.net
Mon Oct 21 21:19:57 EDT 2013


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 <dave.taht at bufferbloat.net>
---
 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




More information about the Codel mailing list