[rtems-lwip commit] lwip/api: Notify about dropped packets
Joel Sherrill
joel at rtems.org
Wed Mar 8 20:41:28 UTC 2023
Module: rtems-lwip
Branch: master
Commit: 64d981949f4c746bed051028cdff27973123f5c0
Changeset: http://git.rtems.org/rtems-lwip/commit/?id=64d981949f4c746bed051028cdff27973123f5c0
Author: Kinsey Moore <kinsey.moore at oarcorp.com>
Date: Thu Mar 2 16:30:10 2023 -0600
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.
---
lwip/src/api/api_msg.c | 8 ++++++++
1 file changed, 8 insertions(+)
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 {
More information about the vc
mailing list