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.beck...@collabora.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.beck...@collabora.com>
> > > Tested-by: Aaron Brown <aaron.f.br...@intel.com>
> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirs...@intel.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?

> This patch enables an igb specific feature that can cause flow control
> to be used. The default behaviour is to drop packets if the rx ring
> buffer fills. This flag tells the driver instead to emit pause frames
> and not drop packets, which is useful when reliable data delivery is
> more important than throughput.

The feature looks like something easily understood with a standard NIC
model in mind. Therefore it should have a generic config knob not a
private flag.

Reply via email to