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:
marcbou
2007-08-16 19:49:08 +00:00
parent 58bfb0458e
commit 1b98df4a0d
4 changed files with 35 additions and 29 deletions

View File

@@ -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