* Networking with slow CPUs
@ 2002-03-27 18:46 Robert Schwebel
2002-03-28 10:59 ` Peter Wächtler
2002-03-29 11:33 ` pjd
0 siblings, 2 replies; 7+ messages in thread
From: Robert Schwebel @ 2002-03-27 18:46 UTC (permalink / raw)
To: Linux Kernel List
Hi,
in the 2.2 series there was a switch for "CPU is too slow to handle full
bandwidth" which has gone in 2.4. Can anybody tell me the reason for this?
Is there a possibility to "harden" a small machine (33 MHz embedded
device) against e.g. flood pings from the outside world?
Robert
--
+--------------------------------------------------------+
| Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
| Pengutronix - Linux Solutions for Science and Industry |
| Braunschweiger Str. 79, 31134 Hildesheim, Germany |
| Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4 |
+--------------------------------------------------------+
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
2002-03-27 18:46 Networking with slow CPUs Robert Schwebel
@ 2002-03-28 10:59 ` Peter Wächtler
2002-03-29 11:33 ` pjd
1 sibling, 0 replies; 7+ messages in thread
From: Peter Wächtler @ 2002-03-28 10:59 UTC (permalink / raw)
To: Robert Schwebel; +Cc: Linux Kernel List
Robert Schwebel wrote:
> Hi,
>
> in the 2.2 series there was a switch for "CPU is too slow to handle full
> bandwidth" which has gone in 2.4. Can anybody tell me the reason for this?
>
> Is there a possibility to "harden" a small machine (33 MHz embedded
> device) against e.g. flood pings from the outside world?
>
AFAIK, there is a mechanism to switch off the interrupts generated
by the network card, if the load is getting too high. This way the
packets get overwritten on the nic buffers and do not even reach
the CPU.
I don't know if this is implemented (in all drivers?)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
2002-03-28 15:38 Samium Gromoff
@ 2002-03-28 13:31 ` Richard B. Johnson
0 siblings, 0 replies; 7+ messages in thread
From: Richard B. Johnson @ 2002-03-28 13:31 UTC (permalink / raw)
To: Samium Gromoff; +Cc: pwaechtler, linux-kernel
On Thu, 28 Mar 2002, Samium Gromoff wrote:
> > > Is there a possibility to "harden" a small machine (33 MHz embedded
> > > device) against e.g. flood pings from the outside world?
> > >
> >
> > AFAIK, there is a mechanism to switch off the interrupts generated
> > by the network card, if the load is getting too high. This way the
> > packets get overwritten on the nic buffers and do not even reach
> > the CPU.
> this is a whole new strategy: ie you switch from interrupt-driven handling
> to periodicall polls of the NIC.
> last time i`ve heard of it it was the bleeding edge Jamal`s model
> of the lowlevel network engine.
>
> regards, Samium Gromoff
You can also get rid of any polling in the driver ISR. This is used
for "interrupt mitigation" and has the bad effects that you describe.
Instead of:
while(some_bits_are_set)
service_those_bits();
return;
Modify to:
if(some_bits_are_set)
service_those_bits();
return;
This will allow other stuff to happen before the ISR gets called
again. Yes, you lose packets when stormed, but so-what? For normal
communication, the NIC runs fine, maybe a few percent loss in
performance.
FYI, every driver that I have used that suffers 'lock-up' like
the eepro100, 3c59x, etc., can be permanently fixed by removing the
poll. Something to think about.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Windows-2000/Professional isn't.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
@ 2002-03-28 15:38 Samium Gromoff
2002-03-28 13:31 ` Richard B. Johnson
0 siblings, 1 reply; 7+ messages in thread
From: Samium Gromoff @ 2002-03-28 15:38 UTC (permalink / raw)
To: pwaechtler; +Cc: linux-kernel
> > Is there a possibility to "harden" a small machine (33 MHz embedded
> > device) against e.g. flood pings from the outside world?
> >
>
> AFAIK, there is a mechanism to switch off the interrupts generated
> by the network card, if the load is getting too high. This way the
> packets get overwritten on the nic buffers and do not even reach
> the CPU.
this is a whole new strategy: ie you switch from interrupt-driven handling
to periodicall polls of the NIC.
last time i`ve heard of it it was the bleeding edge Jamal`s model
of the lowlevel network engine.
regards, Samium Gromoff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
2002-03-27 18:46 Networking with slow CPUs Robert Schwebel
2002-03-28 10:59 ` Peter Wächtler
@ 2002-03-29 11:33 ` pjd
2002-03-29 15:47 ` Bill Davidsen
1 sibling, 1 reply; 7+ messages in thread
From: pjd @ 2002-03-29 11:33 UTC (permalink / raw)
To: robert; +Cc: Linux Kernel List
Robert Schwebel wrote:
>
> Is there a possibility to "harden" a small machine (33 MHz embedded
> device) against e.g. flood pings from the outside world?
It *is* bleeding edge, as someone else pointed out, but you should
really investigate NAPI. It's designed to make Linux resiliant against
non-flow-controlled network loads like routing, which sounds like
just the ticket.
--
Peter Desnoyers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
2002-03-29 11:33 ` pjd
@ 2002-03-29 15:47 ` Bill Davidsen
2002-03-29 18:27 ` Mike Fedyk
0 siblings, 1 reply; 7+ messages in thread
From: Bill Davidsen @ 2002-03-29 15:47 UTC (permalink / raw)
To: pjd; +Cc: robert, Linux Kernel List
On Fri, 29 Mar 2002 pjd@fred001.dynip.com wrote:
> Robert Schwebel wrote:
> >
> > Is there a possibility to "harden" a small machine (33 MHz embedded
> > device) against e.g. flood pings from the outside world?
>
> It *is* bleeding edge, as someone else pointed out, but you should
> really investigate NAPI. It's designed to make Linux resiliant against
> non-flow-controlled network loads like routing, which sounds like
> just the ticket.
There is rate limiting in recent iptables, as well. I don't regard
iptable as bleeding edge, so that may have a higher comfort level.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Networking with slow CPUs
2002-03-29 15:47 ` Bill Davidsen
@ 2002-03-29 18:27 ` Mike Fedyk
0 siblings, 0 replies; 7+ messages in thread
From: Mike Fedyk @ 2002-03-29 18:27 UTC (permalink / raw)
To: Bill Davidsen; +Cc: pjd, robert, Linux Kernel List
On Fri, Mar 29, 2002 at 10:47:55AM -0500, Bill Davidsen wrote:
> On Fri, 29 Mar 2002 pjd@fred001.dynip.com wrote:
>
> > Robert Schwebel wrote:
> > >
> > > Is there a possibility to "harden" a small machine (33 MHz embedded
> > > device) against e.g. flood pings from the outside world?
> >
> > It *is* bleeding edge, as someone else pointed out, but you should
> > really investigate NAPI. It's designed to make Linux resiliant against
> > non-flow-controlled network loads like routing, which sounds like
> > just the ticket.
>
> There is rate limiting in recent iptables, as well. I don't regard
> iptable as bleeding edge, so that may have a higher comfort level.
>
Yes, but it won't keep the interrupts from all of those packets from
overloading, and DoSing it or possibly crashing the system.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-03-29 18:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-27 18:46 Networking with slow CPUs Robert Schwebel
2002-03-28 10:59 ` Peter Wächtler
2002-03-29 11:33 ` pjd
2002-03-29 15:47 ` Bill Davidsen
2002-03-29 18:27 ` Mike Fedyk
-- strict thread matches above, loose matches on Subject: below --
2002-03-28 15:38 Samium Gromoff
2002-03-28 13:31 ` Richard B. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox