lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8852] Optimize udp_bind code paths


From: Axel Lin
Subject: [lwip-devel] [patch #8852] Optimize udp_bind code paths
Date: Tue, 12 Jan 2016 01:23:00 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

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

                 Summary: Optimize udp_bind code paths
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: axellin
            Submitted on: Tue 12 Jan 2016 01:22:59 AM 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:

[PATCH 1/2] udp_bind: Slightly optimize the rebind code path

udp_pcbs does not have duplicate pcb in the list.
So for a given pcb, it's not possible to match multiple entries in udp_pcbs.
Optimize the code by break out from the for loop once a match is found.

[PATCH 2/2] udp_bind: Optimize the code patch for checking port collision

Move rebind checking earlier then we can optimize the code path for checking
port collision. udp_new_port() already ensures the ephemeral port selected is
unique, so we can avoid the port collision test again for this case.
Just need to check port collision when port != 0 && rebind == 0.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 12 Jan 2016 01:22:59 AM GMT  Name:
0001-udp_bind-Slightly-optimize-the-rebind-code-path.patch  Size: 2kB   By:
axellin

<http://savannah.nongnu.org/patch/download.php?file_id=35994>
-------------------------------------------------------
Date: Tue 12 Jan 2016 01:22:59 AM GMT  Name:
0002-udp_bind-Optimize-the-code-patch-for-checking-port-c.patch  Size: 4kB  
By: axellin

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

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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