Hi guys.
On my implementation of the lwip 1.3.0, i had a high frequency input and output
of UDP packets on multiple sockets in a single task.
So all the sockets read and write are done with select since none of them can
be blocking. The problem was it still blocked despite select
said something was in the mailbox. Select checks out the recvevent variable of
the sockets, and it was 1 despite the fact
nothing was available in mailbox and hence the recv call blocked. So i checked
out the recv_udp() function and found this :
SYS_ARCH_INC(conn->recv_avail, p->tot_len);
/* Register event with callback */
API_EVENT(conn, NETCONN_EVT_RCVPLUS, p->tot_len);
if (sys_mbox_trypost(conn->recvmbox, buf) != ERR_OK) {
netbuf_delete(buf);
return;
}
The problem is, if the posting failed, the recvevent variable was not
subtracted hence it stayed one despite the mailbox posting failed. I only found
this
with high frequency packet sending. Should this be a bug ?
Greetings
M Ikhwan Ismail
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users