PPP: remove PPP_USE_PBUF_RAM configuration option

Having it configurable does not really make sense anymore, we already
need PBUF_RAM in all transmit paths. There are no real reason to keep
allocating PPP response buffers from the PBUF_POOL which should be now
reserved for receive paths only.
This commit is contained in:
Sylvain Rochet
2020-10-18 16:38:14 +02:00
parent 012fadd77f
commit 39cb84466d
7 changed files with 18 additions and 38 deletions

View File

@@ -60,16 +60,10 @@ extern "C" {
/*
* Memory used for control packets.
*
* PPP_CTRL_PBUF_MAX_SIZE is the amount of memory we allocate when we
* PPP_CTRL_PBUF_UNKNOWN_SIZE is the amount of memory we allocate when we
* cannot figure out how much we are going to use before filling the buffer.
*/
#if PPP_USE_PBUF_RAM
#define PPP_CTRL_PBUF_TYPE PBUF_RAM
#define PPP_CTRL_PBUF_MAX_SIZE 512
#else /* PPP_USE_PBUF_RAM */
#define PPP_CTRL_PBUF_TYPE PBUF_POOL
#define PPP_CTRL_PBUF_MAX_SIZE PBUF_POOL_BUFSIZE
#endif /* PPP_USE_PBUF_RAM */
#define PPP_CTRL_PBUF_UNKNOWN_SIZE 512
/*
* The basic PPP frame.

View File

@@ -184,20 +184,6 @@
#define PPP_NOTIFY_PHASE 0
#endif
/**
* pbuf_type PPP is using for LCP, PAP, CHAP, EAP, CCP, IPCP and IP6CP packets.
*
* Memory allocated must be single buffered for PPP to works, it requires pbuf
* that are not going to be chained when allocated. This requires setting
* PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems.
*
* Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where buffers are
* continuous by design, allowing you to use a smaller PBUF_POOL_BUFSIZE.
*/
#ifndef PPP_USE_PBUF_RAM
#define PPP_USE_PBUF_RAM 1
#endif
/**
* PPP_FCS_TABLE: Keep a 256*2 byte table to speed up FCS calculation for PPPoS
*/