[Ns-bugs] [Bug 253] ARP does not retry upon loss

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Jul 21 08:39:13 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=253





------- Comment #4 from mathieu.lacage at sophia.inria.fr  2008-07-21 11:39 -------

(In reply to comment #3)
> Created an attachment (id=204)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=204&action=view) [details]
> proposed patch
> 
> I tested this against the test case, and did some bounds checking on the
> maxRetries value.  It basically adds a timer to protect the ArpRequest, and a
> counter to control how many requests are sent before giving up.

The idea sounds ok modulo the expected question: how do real systems deal with
that ? Why was it not enough for you to make the 'dead' timer value smaller ?

As to the patch, adding a Timer * instance _per entry_ seems horrendous from a
memory perspective. I would much rather do one of:
1) do not use a Timer object and Simulator::Schedule without storing the
resulting EventId. 
2) If you really must include the timer, do not use a "Timer *" But use a
"Timer".
3) use a per-cache timer shared by all entries which scans through all entries
to find waiting entries whenever it expires and uses the Entry::m_lastSeen
field together with the  m_waitReplyTimeout value to guess how many retries
were done for each entry and whether or not it should resend a request (i.e.,
if now - m_lastSeen / m_waitReplyTimeout is bigger than m_retries + 1, you
should send a new request and increment m_retries and potentially re-schedule
the wait reply timeout.

I really prefer 3 above.

Another comment is that your current patch as well as any of the proposed
modifications make the following code uneeded in ArpL3Protocol::Lookup. It
should be replaced at least by an ASSERT : if (IsWaitReply) {NS_ASSERT ()} or,
better, be removed after some serious testing.

         else if (entry->IsWaitReply ())
            {
              NS_LOG_LOGIC ("node="<<m_node->GetId ()<<
                        ", wait reply for " << destination << " expired --
drop");
              entry->MarkDead ();
              Ptr<Packet> pending = entry->DequeuePending();
              while (pending != 0)
                {
                  m_dropTrace (pending);
                  pending = entry->DequeuePending();
                }
              m_dropTrace (packet);
            }


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list