From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net-next] fq_codel: add memory limitation per queue Date: Mon, 9 May 2016 21:57:33 -0700 Message-ID: References: <865DA393-262D-40B6-A9D3-1B978CD5F6C6@gmail.com> <1462128385.5535.200.camel@edumazet-glaptop3.roam.corp.google.com> <1462136140.5535.219.camel@edumazet-glaptop3.roam.corp.google.com> <1462201620.5535.250.camel@edumazet-glaptop3.roam.corp.google.com> <1462205669.5535.254.camel@edumazet-glaptop3.roam.corp.google.com> <1462464776.13075.18.camel@edumazet-glaptop3.roam.corp.google.com> <1462476207.13075.20.camel@edumazet-glaptop3.roam.corp.google.com> <542135C7-D7CC-4E33-B35B-C2AD259FA5AB@gmx.de> <20160506133323.0b190f47@redhat.com> <1462541156.13075.34.camel@edumazet-glaptop3.roam.corp.google.com> <1462550112.13075.47.camel@edumazet-glaptop3.roam.corp.google.com> <1462768295.23934.28.camel@edumazet-glaptop3.roam.corp.google.com> <1462804008.23934.30.camel@edumazet-glaptop3.roam.corp.google.com> <1462855514.23934.51.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: David Miller , Jesper Dangaard Brouer , =?UTF-8?Q?Dave_T=C3=A4ht?= , netdev , moeller0 To: Eric Dumazet Return-path: Received: from mail-yw0-f179.google.com ([209.85.161.179]:33786 "EHLO mail-yw0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbcEJE5y (ORCPT ); Tue, 10 May 2016 00:57:54 -0400 Received: by mail-yw0-f179.google.com with SMTP id t10so1827437ywa.0 for ; Mon, 09 May 2016 21:57:53 -0700 (PDT) In-Reply-To: <1462855514.23934.51.camel@edumazet-glaptop3.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, May 9, 2016 at 9:45 PM, Eric Dumazet wrote: > On Mon, 2016-05-09 at 21:34 -0700, Cong Wang wrote: >> On Mon, May 9, 2016 at 7:26 AM, Eric Dumazet wrote: >> > On Sun, 2016-05-08 at 22:07 -0700, Cong Wang wrote: >> >> On Sun, May 8, 2016 at 9:31 PM, Eric Dumazet wrote: >> >> > On Sun, 2016-05-08 at 21:14 -0700, Cong Wang wrote: >> >> > >> >> >> So when the packet is dropped due to memory over limit, should >> >> >> we return failure for this case? Or I miss anything? >> >> > >> >> > Same behavior than before. >> >> > >> >> > If we dropped some packets of this flow, we return NET_XMIT_CN >> >> >> >> I think for the limited memory case, the upper layer is supposed >> >> to stop sending more packets when hitting the limit. >> > >> > They doe. NET_XMIT_CN for example aborts IP fragmentation. >> > >> > TCP flows will also instantly react. >> >> But not for the NET_XMIT_SUCCESS case: >> >> return ret == idx ? NET_XMIT_CN : NET_XMIT_SUCCESS; > > > I believe you missed whole point of FQ (SFQ, FQ_CODEL, FQ, ...) > > If we dropped a packet of another flow because this other flow is an > elephant, why should we notify the mouse that we shot an elephant ? > > We return NET_XMIT_SUCCESS because we properly queued this packet for > this flow. This is absolutely right. > Sure, but we are talking about memory constraint case, aren't we? If the whole system are suffering from memory pressure, the whole qdisc should be halted?