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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 May 2013 23:27:36 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Holger Brunck <holger.brunck@...mile.com>
CC:	<netdev@...r.kernel.org>
Subject: Re: napi layer and packet throttling

On Thu, 2013-05-23 at 13:52 +0200, Holger Brunck wrote:
> Hi all,
> I have a general question to the napi layer. I have a board with a MPC8360
> processor which uses the ucc_geth.c driver for it's ethernet device. The kernel
> version is 3.9. We see in lab tests that the board gets unresponsive if we send
> a high packet rate to this ethernet device via an packet generator. In the end
> we would like to limit the amount of incoming packets at a very early stage, to
> prevent the system of a to high softirq load.
> 
> The NAPI layer description I read on:
> http://www.linuxfoundation.org/collaborate/workgroups/networking/napi
> pointed two main functions out for the napi layer.
> 
> a) Interrupt mitigation
> Which works perfectly on the ucc_geth.c driver under high load the hard irqs for
> the RX packets are disabled and we switch to a polling mode. If the load is more
> relaxed we switch back.
> 
> b) Packet-Throttling
> Here the description says "NAPI-compliant drivers can often cause packets to be
> dropped in the network adaptor itself, before the kernel sees them at all."
> 
> This is exactly what I need for my usecase. But I don't see any hints how this
> can be implemented with the napi layer.
[...]

If the RX ring is not cleaned and refilled quickly enough, the network
controller will naturally start to drop packets.  It's not something you
should do explicitly in the driver.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ