From: Will Wagner <will_wagner@carallon.com>
To: eCos development list <ecos-devel@sourceware.org>
Subject: [RFC 9/9] * Ensure udp stats counter correct when dropped packets
Date: Thu, 27 Jun 2013 19:22:00 -0000 [thread overview]
Message-ID: <51CC910D.9070200@carallon.com> (raw)
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 <andrewp@carallon.com>
Signed-off-by: Will Wagner <willw@carallon.com>
---
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 <string.h>
@@ -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
reply other threads:[~2013-06-27 19:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CC910D.9070200@carallon.com \
--to=will_wagner@carallon.com \
--cc=ecos-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).