From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 38E242005CC for ; Thu, 28 Jun 2012 22:24:15 -0700 (PDT) Received: by eeke50 with SMTP id e50so1982972eek.16 for ; Thu, 28 Jun 2012 22:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=KJ24jaW14ndKTNFegPBbed45rJpMGkdEPX/JmcntY9E=; b=O3ut5L4pSPjpDSboNP3QxbYg8yTsV58UtvemyNOYkEvCeBJRglgW1DNkXcYSTAjqyu Bd8sIMHixlpXtbEa9+5e4maL+qNgGWj0hU05KeSTdwOTxaCFypOY/8mfixQTOKrREN3+ bVzlP4KtvmtVICTwF4yhWHKAr6JLIzi7GPsb/k5Mlt5B/Qk/8siaDileTkDJ3qx1YBpD vxHd1miSxxxL4kQGeHfUgu2SekdoAMSivBvJA5xbEMTKkAceEqtMMRfOUDoOufdGcgH4 3ea5c/vpoQtETdYMh45MffUCHdYvHvh0j5yeQaW07vwuZclgPhasjtLc4QcaR79C1KrY a7lA== Received: by 10.216.80.22 with SMTP id j22mr65049wee.198.1340947453011; Thu, 28 Jun 2012 22:24:13 -0700 (PDT) Received: from [172.28.88.52] ([74.125.122.49]) by mx.google.com with ESMTPS id ch9sm5732316wib.8.2012.06.28.22.24.10 (version=SSLv3 cipher=OTHER); Thu, 28 Jun 2012 22:24:11 -0700 (PDT) From: Eric Dumazet To: David Miller In-Reply-To: <20120628.221252.2220466000873887315.davem@davemloft.net> References: <1340903237.13187.151.camel@edumazet-glaptop> <1340945592.29822.8.camel@edumazet-glaptop> <20120628.221252.2220466000873887315.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" Date: Fri, 29 Jun 2012 07:24:08 +0200 Message-ID: <1340947448.29822.41.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: nanditad@google.com, netdev@vger.kernel.org, codel@lists.bufferbloat.net, ycheng@google.com, ncardwell@google.com, mattmathis@google.com Subject: Re: [Codel] [PATCH net-next] fq_codel: report congestion notification at enqueue time 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: Fri, 29 Jun 2012 05:24:15 -0000 On Thu, 2012-06-28 at 22:12 -0700, David Miller wrote: > From: Eric Dumazet > Date: Fri, 29 Jun 2012 06:53:12 +0200 > > > Please dont apply this patch, I'll submit an updated version later. > > Ok. By the way, I am not sure NET_XMIT_CN is correctly used in RED. Or maybe my understanding of NET_XMIT_CN is wrong. If a the packet is dropped in enqueue(), why use NET_XMIT_CN instead of NET_XMIT_DROP ? This seems to mean : I dropped _this_ packet, but dont worry too much, I might accept other packets, so please go on... diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 633e32d..0fc5b6c 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -77,7 +77,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch) sch->qstats.overlimits++; if (!red_use_ecn(q) || !INET_ECN_set_ce(skb)) { q->stats.prob_drop++; - goto congestion_drop; + goto drop; } q->stats.prob_mark++; @@ -88,7 +88,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch) if (red_use_harddrop(q) || !red_use_ecn(q) || !INET_ECN_set_ce(skb)) { q->stats.forced_drop++; - goto congestion_drop; + goto drop; } q->stats.forced_mark++; @@ -104,9 +104,8 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch) } return ret; -congestion_drop: - qdisc_drop(skb, sch); - return NET_XMIT_CN; +drop: + return qdisc_drop(skb, sch); } static struct sk_buff *red_dequeue(struct Qdisc *sch)