mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-29 19:46:19 +08:00
Added distinct memp (MEMP_TCPIP_MSG_INPUT) for input packets to prevent
floods from consuming all of MEMP_TCPIP_MSG and starving other message types.
This commit is contained in:
@@ -118,6 +118,7 @@ const u16_t memp_sizes[MEMP_MAX] = {
|
||||
MEMP_ALIGN_SIZE(sizeof(struct netbuf)),
|
||||
MEMP_ALIGN_SIZE(sizeof(struct netconn)),
|
||||
MEMP_ALIGN_SIZE(sizeof(struct tcpip_msg)),
|
||||
MEMP_ALIGN_SIZE(sizeof(struct tcpip_msg)),
|
||||
#if ARP_QUEUEING
|
||||
MEMP_ALIGN_SIZE(sizeof(struct etharp_q_entry)),
|
||||
#endif
|
||||
@@ -141,6 +142,7 @@ static const u16_t memp_num[MEMP_MAX] = {
|
||||
MEMP_NUM_NETBUF,
|
||||
MEMP_NUM_NETCONN,
|
||||
MEMP_NUM_TCPIP_MSG,
|
||||
MEMP_NUM_TCPIP_MSG_INPUT,
|
||||
#if ARP_QUEUEING
|
||||
MEMP_NUM_ARP_QUEUE,
|
||||
#endif
|
||||
@@ -167,6 +169,7 @@ static u8_t memp_memory[MEM_ALIGNMENT - 1 +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_NETBUF, struct netbuf) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_NETCONN, struct netconn) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_TCPIP_MSG, struct tcpip_msg) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_TCPIP_MSG_INPUT, struct tcpip_msg) +
|
||||
#if ARP_QUEUEING
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_ARP_QUEUE, struct etharp_q_entry) +
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user