diff options
author | Kinsey Moore <kinsey.moore@oarcorp.com> | 2023-03-02 16:30:10 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2023-03-08 14:58:32 -0600 |
commit | 64d981949f4c746bed051028cdff27973123f5c0 (patch) | |
tree | 8c07f4d99fa8bc30f394bdbfa7dc23a8aaa57b4c | |
parent | lwip/sockets.h: Avoid duplication of system struct (diff) | |
download | rtems-lwip-64d981949f4c746bed051028cdff27973123f5c0.tar.bz2 |
lwip/api: Notify about dropped packets
The receive UDP and raw mailboxes will silently drop packets once the
mailbox is full. This provides a debug message if debugging is enabled
when this is the case to direct the user toward a solution.
-rw-r--r-- | lwip/src/api/api_msg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lwip/src/api/api_msg.c b/lwip/src/api/api_msg.c index 3f08e03..e3eab42 100644 --- a/lwip/src/api/api_msg.c +++ b/lwip/src/api/api_msg.c @@ -191,6 +191,10 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, len = q->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { +#ifdef __rtems__ + LWIP_DEBUGF(API_MSG_DEBUG | LWIP_DBG_LEVEL_WARNING, + ("recv_raw: dropping packet\n")); +#endif netbuf_delete(buf); return 0; } else { @@ -270,6 +274,10 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { +#ifdef __rtems__ + LWIP_DEBUGF(API_MSG_DEBUG | LWIP_DBG_LEVEL_WARNING, + ("recv_udp: dropping packet\n")); +#endif netbuf_delete(buf); return; } else { |