[En-Nut-Discussion] TCP/IP problems with httpd

Bernd Walter enut at cicely.de
Wed Jan 12 02:27:32 CET 2011


On Wed, Jan 12, 2011 at 12:27:50AM +0100, Ulrich Prinz wrote:
> Hi!
> 
> So here are the plain facts:
> 
> I checked with EIR (DM9000) and cannot break it down with adaptive ping. 
> It alway boots up and receives audio, http interface is working.
> 
> If I connect my SAM7X with httpd example and start it up, it works.
> 
> If I then start an adaptive ping it crashes after around 20k of pings.

No chance to ping my SAM7X with 4.9.8 to death.
I pinged it with default 56 Byte packets and no-wait - only >500kB/s
came back, but this means about 10k/s Packets had been answered, which
sounds quite Ok.
With 1400 Byte packets even >2MB/s came back.
I have the watchdog running, which is triggered by low prio main and
it seems the routine even got enough CPU time left to serve the WD soon
enough.

But a source diff from 4.9.8 to trunk showed that on ARM there was a
change in context.c assembly code - maybe only formating, I didn't look
into detail.
But EIR is also ARM.
Then there had been a few changes to at least the AT91 EMAC driver.
Otherwise I didn't saw anything of special interest, but I didn't
look into detail.

> If I let the ping run and reset the board, DHCP fails as the OS crashes 
> somewhere inside.
> 
> If I connect SAM7X at company site (lots of multicast/broadcast in the 
> network, don't know what the IT guys do) SAM7X never gets a single DHCP 
> request through. Regardless if I cleaned network config or not.

I'm also often surprised how dirty company LANs can be.
Some time from 4.9.8 to current the CAF flag was removed from AT91 EMAC
setup, which effectively enable promiscuous mode on the interface.
I don't know if 4.9.9 already has this corrected, but it means that the
board has to handle unrelated multicast packets and in some environments
even many packets for different hosts - you might be surprised how often
switches don't have a switch entry for a given target and need to flood
it around.
You might want to verify the AVR32 EMAC driver about CAF flag.

> Sometimes it crashes sometimes it insists on keeping it's demo-IP or the 
> old one it had before but never responses to any http request.
> 
> Tomorrow I try to connect the IER into the company network and we see 
> what happens.
> 
> EIR is running Nut/OS 4.9.9.0 SVN release I don't know but I can find 
> out. SAM7X is running some of the latest 4.9.9.0 trunk versions, I think 
> it includes the discussed ntohs change.

I'm running on custom boards, which needs some local changes, so I can't
easily pick a random Nut/OS version to run.
You might want to verify if you can reproduce the problem with 4.9.8
to narrow it down since I'm not sure if my environment is similar enough.

PS: I wasn't able to find svn-tags for 4.9.x releases.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list