From c9d191ecc6212fdc45e42e067733c8a920e9d8bd Mon Sep 17 00:00:00 2001 From: chenchuang Date: Sun, 17 Nov 2024 15:29:19 +0800 Subject: [PATCH] fix: remove duplicated statistics of upd.drop The valule of g_netstats.udp.drop has been increased in net_dataevent() function, while it is increased in udp_datahandler(). --- net/udp/udp_callback.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c index 87dd776f0f871..390dcbf97c3e1 100644 --- a/net/udp/udp_callback.c +++ b/net/udp/udp_callback.c @@ -82,9 +82,6 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, if (conn->readahead && conn->readahead->io_pktlen > conn->rcvbufs) { netdev_iob_release(dev); -#ifdef CONFIG_NET_STATISTICS - g_netstats.udp.drop++; -#endif return 0; } #endif