You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/02/24 12:36:12 UTC

[nuttx] branch master updated: net/udp: Add drop count when limited by recv bufsize

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 <we...@xiaomi.com>
AuthorDate: Wed Feb 22 19:10:45 2023 +0800

    net/udp: Add drop count when limited by recv bufsize
    
    Signed-off-by: Zhe Weng <we...@xiaomi.com>
---
 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