[En-Nut-Discussion] ARP(?) traffic problems

Dusan Ferbas dferbas at etech.cz
Tue Jan 24 14:49:16 CET 2006


Hi,

we had ARP problems when we are initiating UDP traffic from Nut/OS and this 
is done from more threads. Most recent arpcache.c modifications seems to 
solve this (NutEventBroadcast when arp entry is removed - shortens time for 
which other thread is waiting if target IP does not exist, check for entry 
if pointer is still valid).

Our problem was on a large network. We detected a lot of broadcasts, which 
are used in some companies to detect intruders with unregistered IPs. But 
this is nothing with ARP. It is about processor power and cooperative 
multitasking. The idea was previously proved on a 32-bit ColdFire system.

In nicrtl.c, there is a loop for getting packets from RTL chip. And here we 
are where system is looping when there is a lot of broadcasts (can be 
detected by Ethereal). Everything is fine, but the rest of system should 
have time to process received packets.

declaration in THREAD(NicRx, arg):

     unsigned long end_tick_count;

inside  while (1) { (before do loop):
                 #define MAX_RECEIVING_TIME      100     //ms
                 end_tick_count = NutGetTickCount() + 
(MAX_RECEIVING_TIME*2)/125;

inside do loop:
                         if ((NutGetTickCount() >= end_tick_count))
                         {
                                 NutThreadYield();
                                 end_tick_count = NutGetTickCount() + 
(MAX_RECEIVING_TIME*2)/125;
                         }

modified condition of the do loop:
         } while (nb && (NutGetTickCount() < end_tick_count));

>Anyway, one problem I can think of is within ARP code. Large
>networks produce a lot of broadcasts and Dusan Ferbas had never
>been satisfied with the current status. Either because of lack of
>time or because I simply can't follow his critics, there hadn't
>been done anything in this area. May be Dusan knows something,
>which I do not.
>
>...
>Harald
>
>
>At 09:35 11.01.2006 +0100, you wrote:
>>Hello,
>>
>>again I have the following problem with a small Webserver application based
>>on the http demo on NutOS 3.9.8:
>>
>>The applicatione runs weeks without crash on my private network, even if I
>>heavily access the Nut's website from three PCs, using a script which
>>reloads the page every 10 seconds using htget with three PCs simultanously.
>>
>>Now I installed the device in our companie's network which is incredibly
>>big, a routed network with several thousands of PCs. In my segment are about
>>150 PCs.
>>
>>10 Minutes later the webserver Thread hangs and the Nut didn't respond to a
>>ping anymore.
>>
>>The application's main thread is alive, seen at debug outputs on the serial
>>port. These debug outputs constantly reports about 23kB free heap. So I
>>don't think it is a memory leak.
>>
>>Maybe it has something to with high network or broadcast load?
>>
>>Can anyone give me a hint what maybe wrong or what I should test?
>>
>>Thank you
>>Thorsten



Dusan Ferbas
www.etech.cz

Dusan Ferbas
www.etech.cz




More information about the En-Nut-Discussion mailing list