buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56355, PBUF_POOL_BUFSIZE avoid using...

 
 

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

bug #56355: PBUF_POOL_BUFSIZE avoid using multiple buffers for IPv6

Submitter:  Tymoteusz Bloch <tbloch>
Submitted:  Mon 20 May 2019 03:40:45 PM UTC
   
 
Category:  pbufs Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.1.1

Thu 30 Jan 2020 07:45:27 PM UTC, comment #2: 

Fixed by using existing constants instead of '+40'.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 20 May 2019 03:47:16 PM UTC, comment #1: 

Mistake
It should be
IPv6 header needs 20 bytes more required by IPv4 header.

Tymoteusz Bloch <tbloch>
Mon 20 May 2019 03:40:45 PM UTC, original submission:  

There were some problems with Mbed-OS using LWIP code and IPv6.

Root cause was related pbuf's size.

It's desirable to avoid using multiple buffers increase LWIP PBUF_POOL_BUFSIZE.

This involves selecting the default size by IP type.
IPv4 header needs 20 bytes more required by IPv6 header.

Proposed changes in opt.h

Replace:

#if !defined PBUF_POOL_BUFSIZE || defined _DOXYGEN_
#define PBUF_POOL_BUFSIZE               LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PB
UF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
#endif

with:

#if !defined PBUF_POOL_BUFSIZE || defined _DOXYGEN_
#if LWIP_IPV6
#define PBUF_POOL_BUFSIZE               LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
#elif LWIP_IPV4
#define PBUF_POOL_BUFSIZE               LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
#endif
#endif

Tymoteusz Bloch <tbloch>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

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 tbloch (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-30 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code