lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] portscan


From: Simon Goldschmidt
Subject: Re: [lwip-users] portscan
Date: Thu, 02 Jul 2009 13:54:00 +0200

> I use DMA to transfer packets from CS8900 to a RAM buffer. There can be
> a problem if the buffer is filled faster than processed by LWIP. I tried 
> to avoid this by dropping packets that have been already received from 
> the CS8900. This was disastrous. Nothing worked anymore.

That's strange, I'd expected this to work. At least it worked for me (with a 
totally different MAC, though). With some MACs, you need to read a bit of the 
packet before you can delete it from its buffers, maybe with the CS8900, it's 
like that?

You can also disable the RX interrupt as long as your RAM buffer is full: that 
way you get the buffer overrun in the MAC and don't have to handle it yourself.

> I drew two conclusions out of this:
> - a ethernet tx throttles back if the connected rx has misses

I don't think I understand that, why would you throttle your TX if you are too 
busy to process all RX packets?

> - a packet received by a rx has to be processed under all circumstances

That depends on your application, but technically, no.

> My next step would be to delay the DMAs if there is no space in the
> buffer.

I'd do that, too: delay the DMA and at the same time disable RX interrupt so 
you don't get interrupted again while you can't do anything (and are in a 
stress situation where you need to handle the RAM buffer as fast as you can).

In general, the design of this depends on the application using the network: 
you have to decide if you want to give TX or RX higher priorities.

Simon
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




reply via email to

[Prev in Thread] Current Thread [Next in Thread]