From: Holger Brunck <holger.brunck@keymile.com>
To: netdev@vger.kernel.org
Subject: napi layer and packet throttling
Date: Thu, 23 May 2013 13:52:46 +0200 [thread overview]
Message-ID: <519E030E.5040903@keymile.com> (raw)
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. So what I need would be something like a
possibility to accept on the eth0 device in timeframe x only packetcount y. If
this packetcount is reached disable hard irq and napi_poll until the timeframe
is expired.
So are there any pointers to other ethernet drivers doing something like this?
Do I misunderstand the packet throttling purpose of the NAPI layer completely?
Any help is appreciated.
Regards
Holger
next reply other threads:[~2013-05-23 12:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 11:52 Holger Brunck [this message]
2013-05-23 22:27 ` napi layer and packet throttling Ben Hutchings
2013-05-24 7:28 ` Holger Brunck
2013-05-24 9:20 ` devendra.aaru
2013-05-24 9:39 ` Holger Brunck
2013-05-24 12:36 ` Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519E030E.5040903@keymile.com \
--to=holger.brunck@keymile.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).