buglwIP - A Lightweight TCP/IP stack - Bugs: bug #48964, PBUF_POOL init.c checks need to be...

 
 

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

bug #48964: PBUF_POOL init.c checks need to be disabled when using PBUF_REF for RX

Submitter:  Joel Cunningham <jcunningham>
Submitted:  Wed 31 Aug 2016 08:42:12 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  jcunningham
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Wed 07 Sep 2016 02:16:04 PM UTC, comment #5: 

Patch submitted in b7c2553b46f9102a127517d839fadf7994f94f89

Joel Cunningham <jcunningham>
Group Member
Wed 07 Sep 2016 06:17:19 AM UTC, comment #4: 

Joel, you may go ahead and commit it!

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 01 Sep 2016 08:35:35 PM UTC, comment #3: 

I can't test right now but I also guess it's a good idea.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 01 Sep 2016 08:19:14 PM UTC, comment #2: 

I'd also say it's safe!

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 01 Sep 2016 03:41:44 PM UTC, comment #1: 

I've prototyped adding PBUF_POOL_SIZE to the sanity checks and setting it to 0 in my port.  Attached is the patch for init.c

I also audited the LwIP source and only found netifs allocating from PBUF_POOL (which is as expected), so it seems safe to set PBUF_POOL_SIZE to 0



(file #38401)

Joel Cunningham <jcunningham>
Group Member
Wed 31 Aug 2016 08:42:12 PM UTC, original submission:  

My products use !MEMP_MEM_MALLOC and PBUF_REF for zero-copy in the RX pathway.

I'm running into an issue where there are PBUF_POOL checks in init.c that are tripping when I increase TCP_WND beyond what could be in PBUF_POOL (PBUF_POOL_SIZE * PBUF_POOL_BUFSIZE).

Should we be wrapping PBUF_POOL_BUFSIZE and PBUF_POOL_SIZE sanity checks (init.c line 304) with some kind of define for whether PBUF_POOL is in use?

Further, it seems from code analysis that I should be able to completely disable PBUF_POOL by setting PBUF_POOL_SIZE to 0, is this correct?  Maybe we can add "&& PBUF_POOL_SIZE" to both checks?

Joel Cunningham <jcunningham>
Group Member

 

(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 dziegel (Posted a comment)
  • -email is unavailable- added by jcunningham (Submitted the item)
  •  

    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
    2016-09-07 jcunningham StatusNone Fixed
        Assigned toNone jcunningham
        Open/ClosedOpen Closed
    2016-09-01 jcunningham Attached File- Added 0001-bug-48964-Make-PBUF_POOL-sanity-checks-contingent-on.patch, #38401

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code