Go to file
Sylvain Rochet cfe5182380 timers: fix wrong timings for !NO_SYS targets
issue 1:

sys_arch_sem_wait() is supposed to return an elapsed time in ms, what could
happen given a > 1 kHz calling rate for high throughput systems is that it
might always returns 0 ms. This is a problem for systems which compute the
elapsed time from a high precision clock source.

This is what is currently happening in the unix port in sys_arch_sem_wait():

start time -> 1000000000;  // ns
-- less than a ms before an event arrive --
end time   -> 1000xxxxxx;  // ns
return value -> (end time - start time)/1000000 -> 0

The return value is used to reduce the next timer interval, if
sys_arch_sem_wait() always return 0 no more timers are fired anymore

issue 2:

The current timer implementation for !NO_SYS targets only count elapsed
time while -waiting- for semaphore and doesn't count at all the time
spent by the stack to process packets. For CPU bound traffic patterns no
more timers are fired anymore.

Both are serious design issues which cannot be easily fixed without reworking
everything. This patch uses the properly implemented timers for NO_SYS targets
for !NO_SYS targets and merge them both into one single timers implementation.
2016-06-20 16:17:55 +02:00
doc Reorganize links in doxygen documentation 2016-06-12 10:41:44 +02:00
src timers: fix wrong timings for !NO_SYS targets 2016-06-20 16:17:55 +02:00
test/unit [PATCH] Drop instead of ASSERT in tcp_input header parsing 2016-06-13 20:08:43 +02:00
.gitattributes Added .gitattributes to normalize CRLF 2014-02-07 09:36:03 +01:00
.gitignore Update doxygen file to work with recent doxygen versions 2016-05-23 20:16:20 +02:00
CHANGELOG prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array 2016-04-05 23:01:57 +02:00
COPYING Re-added without vendor tag. 2002-10-20 15:13:14 +00:00
FILES etharp_query() has error return type now. Matched dhcp.c with this change. 2003-04-01 14:02:50 +00:00
README README: replaced CVS references to Git 2015-09-22 20:39:32 +02:00
UPGRADING Fixed UPGRADING regarding 1.4.0 2015-08-27 21:38:30 +02:00

INTRODUCTION

lwIP is a small independent implementation of the TCP/IP protocol
suite that has been developed by Adam Dunkels at the Computer and
Networks Architectures (CNA) lab at the Swedish Institute of Computer
Science (SICS).

The focus of the lwIP TCP/IP implementation is to reduce the RAM usage
while still having a full scale TCP. This making lwIP suitable for use
in embedded systems with tens of kilobytes of free RAM and room for
around 40 kilobytes of code ROM.

FEATURES

  * IP (Internet Protocol) including packet forwarding over multiple network
    interfaces
  * ICMP (Internet Control Message Protocol) for network maintenance and debugging
  * IGMP (Internet Group Management Protocol) for multicast traffic management
  * UDP (User Datagram Protocol) including experimental UDP-lite extensions
  * TCP (Transmission Control Protocol) with congestion control, RTT estimation
    and fast recovery/fast retransmit
  * Specialized raw/native API for enhanced performance
  * Optional Berkeley-like socket API
  * DNS (Domain names resolver)
  * SNMP (Simple Network Management Protocol)
  * DHCP (Dynamic Host Configuration Protocol)
  * AUTOIP (for IPv4, conform with RFC 3927)
  * PPP (Point-to-Point Protocol)
  * ARP (Address Resolution Protocol) for Ethernet

LICENSE

lwIP is freely available under a BSD license.

DEVELOPMENT

lwIP has grown into an excellent TCP/IP stack for embedded devices,
and developers using the stack often submit bug fixes, improvements,
and additions to the stack to further increase its usefulness.

Development of lwIP is hosted on Savannah, a central point for
software development, maintenance and distribution. Everyone can
help improve lwIP by use of Savannah's interface, Git and the
mailing list. A core team of developers will commit changes to the
Git source tree.

The lwIP TCP/IP stack is maintained in the 'lwip' Git module and
contributions (such as platform ports) are in the 'contrib' Git module.

See doc/savannah.txt for details on Git server access for users and
developers.

The current Git trees are web-browsable:
  http://git.savannah.gnu.org/cgit/lwip.git
  http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git

Submit patches and bugs via the lwIP project page:
  http://savannah.nongnu.org/projects/lwip/


DOCUMENTATION

The original out-dated homepage of lwIP and Adam Dunkels' papers on
lwIP are at the official lwIP home page:
  http://www.sics.se/~adam/lwip/

Self documentation of the source code is regularly extracted from the
current Git sources and is available from this web page:
  http://www.nongnu.org/lwip/

There is now a constantly growin wiki about lwIP at
  http://lwip.wikia.com/wiki/LwIP_Wiki

Also, there are mailing lists you can subscribe at
  http://savannah.nongnu.org/mail/?group=lwip
plus searchable archives:
  http://lists.nongnu.org/archive/html/lwip-users/
  http://lists.nongnu.org/archive/html/lwip-devel/

Reading Adam's papers, the files in docs/, browsing the source code
documentation and browsing the mailing list archives is a good way to
become familiar with the design of lwIP.

Adam Dunkels <adam@sics.se>
Leon Woestenberg <leon.woestenberg@gmx.net>