patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9628, loopif: only schedule poll when...


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

patch #9628: loopif: only schedule poll when first packet is enqueued

Submitted by:  Joel Cunningham <jcunningham>
Submitted on:  Fri 27 Apr 2018 10:51:27 PM UTC  
Category:  Network drivers Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Joel Cunningham <jcunningham> Open/Closed:  Closed
Planned Release:  None

Wed 02 May 2018 02:18:28 PM UTC, comment #2: 

Committed in ffaee59f3e42b402eacfc623b81a48f6b631412c

Joel Cunningham <jcunningham>
Project MemberIn charge of this item.
Tue 01 May 2018 05:58:22 PM UTC, comment #1: 

Looks good.

Simon Goldschmidt <goldsimon>
Project Administrator
Fri 27 Apr 2018 10:51:27 PM UTC, original submission:  

RFC on attached patch that optimizes the netif_loop_output to only schedule a call to poll when the first packet is enqueued.  This ensures netif_poll is ran once per burst of packets that are sent (which is typical in a TCP transfer).

The old behavior scheduled a call to poll for every packet that was enqueued and this lead to exhaustion of the MEMP_TCPIP_MSG_API memory pool and tcpip_mbox (if port is using static mbox size). The extra callbacks are wasted work because netif_poll drains the entire queue when ran.

This issue presented itself when large TCP transfer go across the loopback netif.

Joel Cunningham <jcunningham>
Project MemberIn charge of this item.


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 jcunningham (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-02 jcunningham StatusNone => Done
        Open/ClosedOpen => Closed
    2018-04-27 jcunningham Attached File- => Added 0001-loopif-only-schedule-poll-when-first-packet-is-enque.patch, #44050

    Back to the top

    Powered by Savane 3.5