[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1369399009.3469.273.camel@deadeye.wl.decadent.org.uk>
Date: Fri, 24 May 2013 13:36:49 +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 Fri, 2013-05-24 at 09:28 +0200, Holger Brunck wrote:
> Hi Ben,
>
> On 05/24/2013 12:27 AM, Ben Hutchings wrote:
> > On Thu, 2013-05-23 at 13:52 +0200, Holger Brunck wrote:
> >> 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.
> >
>
> yes. But what if the remaining amount of packets which are getting through the
> napi_poll function into the linux system are still to many and generate
> therefore a to high softirq load on the system which leads to the problems I
> see.
Soft IRQs are then handled in a ksoftirqd thread, which is scheduled
like any other task (though it has high priority).
> Ok I could use a smaller amount of RX ring buffers, but then the system
> would get more intolerant for RX bursts what I don't want. I would like to
> protect the system if someone sends continuously a high packet rate to the
> interface, similar to DoS attacks.
This is not the job of the driver (beyond using NAPI in the first
place).
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