mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-25 01:27:05 +08:00
(see task #6831): Included new option PBUF_POOL_USES_MEMP to use a memp pool for PBUF_POOL pbufs instead of the old pool implementation in pbuf.c to remove redundant code.
This commit is contained in:
@@ -53,9 +53,12 @@ typedef enum {
|
||||
MEMP_TCPIP_MSG,
|
||||
#if ARP_QUEUEING
|
||||
MEMP_ARP_QUEUE,
|
||||
#endif
|
||||
#if PBUF_POOL_USES_MEMP
|
||||
MEMP_PBUF_POOL,
|
||||
#endif
|
||||
MEMP_SYS_TIMEOUT,
|
||||
|
||||
|
||||
MEMP_MAX
|
||||
} memp_t;
|
||||
|
||||
|
||||
@@ -377,21 +377,25 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
|
||||
|
||||
/* ---------- Pbuf options ---------- */
|
||||
/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
|
||||
/* PBUF_POOL_USES_MEMP: if set to 1, PBUF_POOL pbufs are allocated using an
|
||||
additional memp type, which saves some code since a dedicated pbuf pool
|
||||
is not used any more */
|
||||
#ifndef PBUF_POOL_USES_MEMP
|
||||
#define PBUF_POOL_USES_MEMP 0
|
||||
#endif
|
||||
|
||||
/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
|
||||
#ifndef PBUF_POOL_SIZE
|
||||
#define PBUF_POOL_SIZE 16
|
||||
#endif
|
||||
|
||||
/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
|
||||
link level header. Defaults to 14 for Ethernet. */
|
||||
|
||||
#ifndef PBUF_LINK_HLEN
|
||||
#define PBUF_LINK_HLEN 14
|
||||
#endif
|
||||
|
||||
/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
|
||||
|
||||
#ifndef PBUF_POOL_BUFSIZE
|
||||
/* Default designed to accomodate single full size TCP frame in one PBUF */
|
||||
/* TCP_MSS + 40 for IP and TCP headers + physical layer headers */
|
||||
|
||||
Reference in New Issue
Block a user