|
From: | Tymoteusz Bloch |
Subject: | [lwip-devel] [bug #56355] PBUF_POOL_BUFSIZE avoid using multiple buffers for IPv6 |
Date: | Mon, 20 May 2019 11:40:47 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0 |
URL: <https://savannah.nongnu.org/bugs/?56355> Summary: PBUF_POOL_BUFSIZE avoid using multiple buffers for IPv6 Project: lwIP - A Lightweight TCP/IP stack Submitted by: tbloch Submitted on: Mon 20 May 2019 03:40:45 PM UTC Category: pbufs Severity: 3 - Normal Item Group: Change Request Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None lwIP version: 2.1.1 _______________________________________________________ Details: 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 _______________________________________________________ Reply to this item at: <https://savannah.nongnu.org/bugs/?56355> _______________________________________________ Message sent via Savannah https://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |