lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191017104025.31f00c97@cakuba.netronome.com>
Date:   Thu, 17 Oct 2019 10:40:25 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Robert Beckett <bob.beckett@...labora.com>
Cc:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net,
        netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
        Aaron Brown <aaron.f.brown@...el.com>
Subject: Re: [net-next 2/7] igb: add rx drop enable attribute

On Thu, 17 Oct 2019 18:04:22 +0100, Robert Beckett wrote:
> On Thu, 2019-10-17 at 08:44 -0700, Jakub Kicinski wrote:
> > On Thu, 17 Oct 2019 12:24:03 +0100, Robert Beckett wrote:  
> > > On Wed, 2019-10-16 at 16:55 -0700, Jakub Kicinski wrote:  
> > > > On Wed, 16 Oct 2019 16:47:06 -0700, Jeff Kirsher wrote:    
> > > > > From: Robert Beckett <bob.beckett@...labora.com>
> > > > > 
> > > > > To allow userland to enable or disable dropping packets when
> > > > > descriptor
> > > > > ring is exhausted, add RX_DROP_EN private flag.
> > > > > 
> > > > > This can be used in conjunction with flow control to mitigate
> > > > > packet storms
> > > > > (e.g. due to network loop or DoS) by forcing the network
> > > > > adapter to
> > > > > send
> > > > > pause frames whenever the ring is close to exhaustion.
> > > > > 
> > > > > By default this will maintain previous behaviour of enabling
> > > > > dropping of
> > > > > packets during ring buffer exhaustion.
> > > > > Some use cases prefer to not drop packets upon exhaustion, but
> > > > > instead
> > > > > use flow control to limit ingress rates and ensure no dropped
> > > > > packets.
> > > > > This is useful when the host CPU cannot keep up with packet
> > > > > delivery,
> > > > > but data delivery is more important than throughput via
> > > > > multiple
> > > > > queues.
> > > > > 
> > > > > Userland can set this flag to 0 via ethtool to disable packet
> > > > > dropping.
> > > > > 
> > > > > Signed-off-by: Robert Beckett <bob.beckett@...labora.com>
> > > > > Tested-by: Aaron Brown <aaron.f.brown@...el.com>
> > > > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>    
> > > > 
> > > > How is this different than enabling/disabling flow control..
> > > > 
> > > > ethtool -a/-A    
> > > 
> > > Enabling flow control enables the advertisement of flow control
> > > capabilites and allows negotiation with link partner.  
> > 
> > More or less. If autoneg is on it controls advertised bits,
> > if autoneg is off it controls the enabled/disable directly.
> >   
> > > It does not dictate under which circumstances those pause frames
> > > will
> > > be emitted.  
> > 
> > So you're saying even with pause frames on igb by default will not
> > backpressure all the way to the wire if host RX ring is full/fill
> > ring
> > is empty?  
> 
> Correct.
> Honestly I personally considered it a bug when I first saw it.
> 
> see e6bdb6fefc590
> 
> Specifically it enables dropping of frames if multiple queues are in
> use, ostensibly to prevent head of line blocking between the different
> rx queues.
> 
> This patch says that that should be a user choice, defaulting to the
> old behaviour.

I'd say just always enable it then. Honestly if it's statically enabled
with multi queue (which I presume is the default?) then there's no need
for us to ponder the uAPI questions. I can't think of anyone flipping
that flag to disabled...

Flow control is supposed to prevent _all_ drops it can, AFAIU.

If we get an actual user request to change it we can revisit.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ