public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] ARP-related problem
Date: Fri, 25 Jan 2013 22:07:00 -0000	[thread overview]
Message-ID: <20130125220711.GA14802@grante> (raw)


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

                 reply	other threads:[~2013-01-25 22:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130125220711.GA14802@grante \
    --to=grant.b.edwards@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).