patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9431, Removing the restriction on number...

 
 

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

patch #9431: Removing the restriction on number of sockets

Submitted by:  Joan Lledó <jllledo>
Submitted on:  Tue 08 Aug 2017 05:32:30 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: None

Thu 10 Aug 2017 07:12:44 AM UTC, comment #2:

Here's a new patch with those issues solved.

Regarding the MEMP_MEM_MALLOC requirement, it's there for the number of sockets to not be limited by MEMP_NUM_* macros as you suggested. Do you want me to remove it?

(file #41472)

Joan Lledó <jllledo>
Tue 08 Aug 2017 07:19:09 PM UTC, comment #1:

The patch has some drawbacks:
- duplicated code in alloc_socket(): this is really bad as two #if/else blocks do the same. A bug fixed in one bug can remain in the 2nd block. Never do this!
- LWIP_SOCKET_OFFSET is not checked/obeyed everywhere
- alloc_socket() doesn't check for int overflow
- free_socket() doesn't follow our (old) C standard where variable declarations and code must not be mixed
- Why is MEMP_MEM_MALLOC needed?

So far to the patch, I'll reply to the general discussion on the list.

Simon Goldschmidt <goldsimon>
Project Administrator
Tue 08 Aug 2017 05:32:30 PM UTC, original submission:

This comes from [1]

Attached is a patch that adds a new macro to allow the user to remove the limit on number of sockets.

------------
[1] http://lists.nongnu.org/archive/html/lwip-devel/2017-08/msg00029.html

Joan Lledó <jllledo>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Aug 2017 07:12:44 AM UTCjllledoAttached File-=>Added 0001-New-option-LWIP_SOCKET_OPEN_COUNT-in-opts.h.patch, #41472
    Tue 08 Aug 2017 05:32:30 PM UTCjllledoAttached File-=>Added 0001-New-option-LWIP_SOCKET_OPEN_COUNT-in-opts.h.patch, #41453

    Back to the top


    Powered by Savane 3.1-cleanup1