patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8446, LWIP IP Re-assembly timer...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8446: LWIP IP Re-assembly timer optimization

Submitter:  Nirav Desai <niravisneo>
Submitted:  Mon 05 May 2014 11:53:13 AM UTC
   
 
Category:  IPv4 Priority:  6
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Mon 19 May 2014 08:16:10 PM UTC, comment #1: 

Your patch is tempting, but it breaks dependencies: as it is now, lwIP core files should not depend on the timer implementation. In other words, everyone is free to implement a different timer implementation as long as the timers are called as needed.

You can see a way to implement what you want in tcp.c/timer.c: TCP calls tcp_timer_needed() when a timer is needed and timer.c then starts the timer if it is not alreay running. This way, developers are free to implement a more efficient way of timer handling in their port and have the TCP timer only running when needed.

Would you mind rewriting your patch to fit this?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 05 May 2014 11:53:13 AM UTC, original submission:  

This timer is used to check state of fragments of data which need to be
re-assembled.
If a timeout occurs the fragments are freed.

This timer was started with a periodicity of 1 sec.
But if there are no fragments to re-assemble still it was being queued and its
expiry handler was executed.
The timeout value for each fragment is 3 sec.


Optimization:
1. Start the timer only when first fragment is added to re-assembly queue.
2. If no elements are present in the re-assembly queue do not queue timer.

Benefits:
1. The timer will execute only when there is a fragment in the queue.
2. This stops wakeup of the processor after every 1 sec


Note:
LWIP has 6 such timers which can be optimized.
viz.
IGMP, DNS, DHCP Fine , DHCP coarse, ARP, IPV6 re-assembly

If this IP Re-assembly patch is accepted and made a part of LWIP main stream
release I will send out other patches which optimize other timers.

Very Important : Dependency

https://savannah.nongnu.org/bugs/?41686

The above bug is open and it needs to be fixed to avoid crash on fragment
re-assembly

Nirav Desai <niravisneo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by niravisneo (Submitted the item)
  • -email is unavailable- added by niravisneo
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-14 goldsimon StatusNone Wont Do
        Open/ClosedOpen Closed
    2014-05-05 niravisneo Attached File- Added IP-Reassembly-Timer-Optimization.patch, #31311
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code