From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15671 invoked by alias); 27 Jun 2013 19:22:57 -0000 Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org Received: (qmail 15641 invoked by uid 89); 27 Jun 2013 19:22:57 -0000 X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 Received: from mail.carallon.com (HELO mail.carallon.com) (95.177.28.122) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 19:22:56 +0000 X-MDAV-Result: clean X-MDAV-Processed: mail.carallon.com, Thu, 27 Jun 2013 20:22:54 +0100 Received: from [172.20.1.8] by mail.carallon.com (Cipher TLSv1:-SHA:128) (MDaemon PRO v13.0.5) with ESMTP id md50001323246.msg for ; Thu, 27 Jun 2013 20:22:54 +0100 X-Spam-Processed: mail.carallon.com, Thu, 27 Jun 2013 20:22:54 +0100 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 172.20.1.8 X-Return-Path: will_wagner@carallon.com X-Envelope-From: will_wagner@carallon.com X-MDaemon-Deliver-To: ecos-devel@sourceware.org Message-ID: <51CC910D.9070200@carallon.com> Date: Thu, 27 Jun 2013 19:22:00 -0000 From: Will Wagner User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: eCos development list Subject: [RFC 9/9] * Ensure udp stats counter correct when dropped packets Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00011.txt.bz2 There is a code path when udp packets are dropped due to lack of buffers where the stats object is not correctly updated. Signed-off-by: Andrew Parlane Signed-off-by: Will Wagner --- packages/net/lwip_tcpip/current/src/api/api_msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/net/lwip_tcpip/current/src/api/api_msg.c b/packages/net/lwip_tcpip/current/src/api/api_msg.c index d4e44b9..25fa01b 100644 --- a/packages/net/lwip_tcpip/current/src/api/api_msg.c +++ b/packages/net/lwip_tcpip/current/src/api/api_msg.c @@ -51,6 +51,7 @@ #include "lwip/tcpip.h" #include "lwip/igmp.h" #include "lwip/dns.h" +#include "lwip/stats.h" #include @@ -193,6 +194,7 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { + UDP_STATS_INC(udp.drop); netbuf_delete(buf); return; } else { -- 1.8.1.msysgit.1