public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ARP-related problem
@ 2013-01-25 22:07 Grant Edwards
  0 siblings, 0 replies; only message in thread
From: Grant Edwards @ 2013-01-25 22:07 UTC (permalink / raw)
  To: ecos-discuss


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-25 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 22:07 [ECOS] ARP-related problem Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).