This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ARP-related problem


I've been examining Ethernet traces from a customer site where there
appear to be problems associated with the eCos ARP table entry
timeouts.

The application involves an eCos app that exchanges blocks of data
with a Windows PC every 60-80 milliseconds.  Everything runs fine for
hours at a time, but there are occasional failures where the network
traffic just sort of "stops" and the TCP connection has to be
re-established.

These failures only happen when the eCos network stack sends out an
ARP request asking about the Windows PC's IP address.  The ARP
requests usually don't cause problems, but sometimes all traffic
between the two endpoints of the TCP/IP connection stops for 5-6
seconds -- then the applications time out, close the TCP connection
and establish a new one.

Upon examining the network trace, I see ARP requests for the Windows
PC's IP address from the eCos network stack every 20 minutes exactly
This happens even though there is a constant stream of packets being
received from and sent to that IP address for the entire 20 minutes
between ARP requests.

>From what I can tell looking at src/sys/if_ether.c, when an ARP table
entry gets to be 20 minutes old it is deleted without any attempt to
refresh it.

Then, a few milliseconds later a packet is to be sent to the IP
address so an ARP request is sent. Any more attempts to send packets
before the ARP reply has been processed result in tx packets being
discarded.

Why not attempt to refresh ARP table entries _before_ they expire and
we start discarding tx packets?

If we received an Ethernet packet from an IP address 10ms ago, why do
we even _need_ to send an ARP request?  The Ethernet address from 10ms
is probably still valid...

-- 
Grant Edwards               grant.b.edwards        Yow! I am a traffic light,
                                  at               and Alan Ginzberg kidnapped
                              gmail.com            my laundry in 1927!

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]