[email protected] schrieb:
Bernhard 'Gustl' Bauer wrote:
Simon Goldschmidt schrieb:
In the past, stalls like this have often been driver bugs: a portscan
is like a stress situation to your driver, maybe it leaves interrupts
disabled or something like that, so the device cannot receive any
packets?
I enabled the stats of my driver (CS8900). What I get during a
portscan is a lot of misses and collisions. Could this crash TCP or ping?
I shouldn't crash TCP: if a packet is not received correctly by a remote
host, TCP retransmits it eventualy, so your connections should go back
to normal after the portscan has finished. During the portscan, however,
it could well be that your device is not fast enough to process all the
packets sent by the PC, so TCP connections might stall and ping might
fail while the portscan is active. That's perfectly normal for a device
that cannot handle received packets as fast as they can be sent on the
wire (which most embedded devices can't).
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. I drew two
conclusions out of this:
- a ethernet tx throttles back if the connected rx has misses
- a packet received by a rx has to be processed under all circumstances
Please correct me when I'm wrong.
My next step would be to delay the DMAs if there is no space in the buffer.
Gustl
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users