Piero,
This occurs with a lot of calls to tcp_write with small pieces of data. If you called it with 15 bytes per call, you could have over 100 elements in the queue. I think there are 2 possibilities. Increase TCP_SND_QUEUELEN or before you call tcp_write, check pcb->snd_queuelen and call tcp_output if it's at TCP_SND_QUEUELEN - 1. This makes me wonder why tcp_enqueue doesn't do this test and call tcp_output instead of exceeding the queue len causing an error. Can't tcp_enqueue prevent this? Bill _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piero 74 Sent: Tuesday, March 18, 2008 1:11 PM To: Mailing list for lwIP users Subject: [lwip-users] tcp_enqueue problem, using socket: Hi. i'm using socket on lwip 130rc1. i have this problem: after some send operation, in tcp_enqueue, here: /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ queuelen = pcb->snd_queuelen; /* check for configured max queuelen and possible overflow */ if ((queuelen >= TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue: too long queue %"U16_F" (max %"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); pcb->flags |= TF_NAGLEMEMERR; return ERR_MEM; } my code loop forever, in this piece of code, with queuelen = TCP_SND_QUEUELEN, without send any packet, incremeting err in tcp.memerr i cannot recovery this situation? my thread is blocked on send operation i suppose.... bye, Piero
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
