This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0069eefd4b net/udp: Add drop count when limited by recv bufsize
0069eefd4b is described below
commit 0069eefd4b1b5b5c27c9808bd87e2099816d8e7f
Author: Zhe Weng <[email protected]>
AuthorDate: Wed Feb 22 19:10:45 2023 +0800
net/udp: Add drop count when limited by recv bufsize
Signed-off-by: Zhe Weng <[email protected]>
---
net/udp/udp_callback.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c
index 0b13b3f757..f353bb32b1 100644
--- a/net/udp/udp_callback.c
+++ b/net/udp/udp_callback.c
@@ -79,6 +79,9 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
{
iob = iob_remove_queue(&conn->readahead);
iob_free_chain(iob);
+#ifdef CONFIG_NET_STATISTICS
+ g_netstats.udp.drop++;
+#endif
}
#endif