Thanks for the reply Frédéric and Simon, Yes, I was also amazed to see the mailbox being so low. I have successfully converted the mailbox into queue (Nucleus queue of course), and with a queue length of 5 can successfully download in 10 simultaneous connections. Most of re-work was in sys_arch.c.
Can you please tell me what should be the safe minimum value for Queue length? I can see that TCP_WND/TCP_MSS is one deciding factor. What can be any other factor(s)? I have one doubt though, does using long queues eliminate any chance of deadlock? In a fast producer and slow consumer scenario, as I discussed in my last mail, queues gradually gets filled up and for a very long reception this occur. Please let me know if I am wrong? Thanks for the help, Bikram On 11/7/07, Frédéric BERNON <[EMAIL PROTECTED]> wrote: > > I'm agree with Simon, your recvmbox should be big enought to recv enought > packets (more than TCP_WND - problem, TCP_WND is in bytes, the recvmbox will > contains packets). So, find the good nucleus setting, or implement your own > one (take a look to unix or msvc6 port). > > About the CS8900A driver, take a look to these links > > > http://cvs.savannah.nongnu.org/viewvc/*checkout*/contrib/ports/old/c16x/netif/cs8900if.c?root=lwip > https://savannah.nongnu.org/bugs/index.php?20531 > > ----- Original Message ----- > *From:* Bikram Chatterjee <[EMAIL PROTECTED]> > *To:* Mailing list for lwIP users <[email protected]> > *Sent:* Tuesday, November 06, 2007 8:00 PM > *Subject:* [lwip-users] Deadlock > > Hello everybody, > > If you already have discussed it in some threads please forgive me and > help me with a link to that thread. > > I was porting lwIP (I am using latest code from CVS, not any stable build) > for Nucleus running on a ARM9 core uP. I am stuck with the following > problem; this looks like a deadlock: > > I have a TCP client (a single socket in a single thread) doing HTTP > download from a remote server. I have CS8900A ethernet driver (btw I have > heard in some sites that there is a CS8900A driver implementation available > for lwIP, but could not find any). posting packets throught netif->input > (tcpip_input) into 'mbox' mailbox. After receiving a few segments everything > stops working. I did some investigation and saw that tcpip_thread is waiting > on conn->recvmbox to post received packets as mailbox posts on full > mailboxes are blocking. Driver is waiting on mbox to post packets it has > received. Application is waiting on mbox to post do_recv API message. I have > investigated further and found out that in netconn_recv we should actually > keep emptying conn->recvmbox in order for the tcpip_thread to keep going. > > In the case of Nucleus the mailbox size is only four and if it so happen > that to consume a single TCP segment application thread takes as much time > as 9 segments are produced by the driver then by the time application thread > comes to post do_recv into mbox it is already filled up by driver. > > I have observed that adjusting the priority of three threads properly; it > can be handled but for multiple thread each fetching using a number of > sockets will lead to the same problem. > > Please help me with some light. Am I missing something obvious? > > Thanks in advance, > Bikram > > -- > Bikram Chatterjee > Senior Engineer > Alumnus Software Limited > Kolkata > > ------------------------------ > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users > -- Bikram Chatterjee Senior Engineer Alumnus Software Limited Kolkata
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
