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

Submitted by:  Joel Cunningham <jcunningham>
Submitted on:  Wed 31 Aug 2016 08:42:12 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Joel Cunningham <jcunningham>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

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

Patch submitted in b7c2553b46f9102a127517d839fadf7994f94f89

Joel Cunningham <jcunningham>
Project MemberIn charge of this item.
Wed 07 Sep 2016 06:17:19 AM UTC, comment #4:

Joel, you may go ahead and commit it!

Dirk Ziegelmeier <dziegel>
Project Member
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>
Project Administrator
Thu 01 Sep 2016 08:19:14 PM UTC, comment #2:

I'd also say it's safe!

Dirk Ziegelmeier <dziegel>
Project Member
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>
Project MemberIn charge of this item.
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>
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
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by dziegel (Posted a comment)
  • -unavailable- added by jcunningham (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Sep 2016 02:16:04 PM UTCjcunninghamStatusNone=>Fixed
      Assigned toNone=>jcunningham
      Open/ClosedOpen=>Closed
    Thu 01 Sep 2016 03:41:44 PM UTCjcunninghamAttached File-=>Added 0001-bug-48964-Make-PBUF_POOL-sanity-checks-contingent-on.patch, #38401

    Back to the top


    Powered by Savane 3.1-cleanup1