lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #7855] Provide alternative timeout implementation


From: James Smith
Subject: [lwip-devel] [patch #7855] Provide alternative timeout implementation
Date: Thu, 27 Sep 2012 15:36:59 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24

URL:
  <http://savannah.nongnu.org/patch/?7855>

                 Summary: Provide alternative timeout implementation
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: rallysmith
            Submitted on: Thu 27 Sep 2012 03:36:58 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Attached is a patch that implements an absolute end-time based timeout scheme.
It is a large-ish patch, but is a NOP if the relevant "lwipopts.h" options are
not defined.

It is needed to fix the real-world problem of timeout drift affecting lwIP
correct operation. This can be seen on low-throughput systems if the
sys_arch_mbox_fetch() takes a significant amount of time to perform its work
and returns the SYS_ARCH_TIMEOUT state regardless of how much time has
actually passed; and can affect for example DHCP lease renewal (where I first
noticed the problem) since if the lease is short lwIP can hold onto an address
it is no longer entitled to because the DHCP coarse timeout drifts so far that
the renewal process is not started within the 50%->100% window.

NOTE: From searching Savannah it turns out Simon Goldschmidt had submitted a
patch (file#12539) to the bug#1902 report and some later changes aswell. None
of that work made it into the head of the tree though. This is an alternative
"absolute end-time" implementation and is not derived from that earlier work
by Simon.

Ideally, if the maintainers do not want to include this source into the
mainline, the mainline source SHOULD be updated to allow the actual
"sys_timeout()", "sys_untimeout()" and "sys_timeouts_mbox_fetch()" functions
to be over-ridden by architecture specific sourcefiles. i.e. a "lwipopts.h"
setting that stops the old DELTA code from being compiled by
"src/core/timers.c" thus allowing the run-time to provide target specific
versions. The need for an opaque "time" field within the timeout structure
will still remain and should be covered by the same change.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 27 Sep 2012 03:36:58 PM GMT  Name: timeouts_absolute_endtime.patch 
Size: 27kB   By: rallysmith

<http://savannah.nongnu.org/patch/download.php?file_id=26659>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7855>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]