buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29148, Incorrect PBUF_POOL_BUFSIZE for...

 
 

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

bug #29148: Incorrect PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0

Submitted by:  Petr Cernin <cerninp>
Submitted on:  Tue 09 Mar 2010 06:44:33 PM UTC  
 
Category: pbufsSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sun 14 Mar 2010 10:16:47 AM UTC, comment #5:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 11 Mar 2010 07:27:01 PM UTC, comment #4:

No, opts.h is fine. I only have too many local changes currently to fix it right away, give me a few days. :-)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 11 Mar 2010 07:14:11 PM UTC, comment #3:

No argument here - it belongs in opts.h to be overidden in lwipopts.h. Or in something like a porting file - e.g. ethernetif.h

Bill Auerbach <billauerbach>
Thu 11 Mar 2010 06:51:16 PM UTC, comment #2:

I'd rather solve this by defaulting PBUF_LINK_HLEN to (14 + ETH_PAD_SIZE) instead of 14, but we would have to move ETH_PAD_SIZE from etharp.h to opt.h for that.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 09 Mar 2010 07:48:45 PM UTC, comment #1:

I agree. I made a similar change for my ETH_PAD_SIZE = 2 port. I did it in a different way - by changing a PKT_SIZE #define that was used in PBUF_POOL_BUFSIZE.

Bill Auerbach <billauerbach>
Tue 09 Mar 2010 06:44:33 PM UTC, original submission:

Hello,

In opt.h the default value of PBUF_POOL_BUFFSIZE is defined as:

LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)

I think there should be

LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN+ETH_PAD_SIZE)

Current default value isn't correct for ports where ETH_PAD_SIZE > 0 (where unaligned accesses to memory are not allowed).

Am I right ?

Petr Cernin <cerninp>

 

No files currently attached

 

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 billauerbach (Posted a comment)
  • -unavailable- added by cerninp (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 14 Mar 2010 10:16:47 AM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1