lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: lwip-users Digest, Vol 31, Issue 15


From: Jeffery Du
Subject: [lwip-users] Re: lwip-users Digest, Vol 31, Issue 15
Date: Fri, 17 Mar 2006 19:12:12 +0800

Hi,

          Danilo, thank you very much. I'm checking the problem you mentioned. 
But how can I see your 3/1 post? I am a newcomer in this mail list. 
      Kieran, yes, now there are 2 threads access the stack. One is a TX thread 
started from application, another is a RX thread in device driver. You reminded 
me that this infrastructure might cause the problem. I should think it over.

======= 2006-03-17 18:47:12 quote´╝Ü=======

>Send lwip-users mailing list submissions to
>       address@hidden
>
>To subscribe or unsubscribe via the World Wide Web, visit
>       http://lists.nongnu.org/mailman/listinfo/lwip-users
>or, via email, send a message with subject or body 'help' to
>       address@hidden
>
>You can reach the person managing the list at
>       address@hidden
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of lwip-users digest..."
>
>
>Today's Topics:
>
>   1. Assertion failure in tcp_receive (Jeffery Du)
>   2. R: [lwip-users] Assertion failure in tcp_receive (Bessone Danilo)
>   3. Re: Assertion failure in tcp_receive (Kieran Mansley)
>   4. Re: Compilation problem...need info. (Kieran Mansley)
>   5. Need tiny TCP/IP stack (address@hidden)
>   6. [lwip-users] (Mousom Bose)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 17 Mar 2006 08:59:34 +0800
>From: "Jeffery Du" <address@hidden>
>Subject: [lwip-users] Assertion failure in tcp_receive
>To: "lwip-users" <address@hidden>
>Message-ID: <address@hidden>
>Content-Type: text/plain;      charset="gb2312"
>
>Hi,
>
>        I am a software engineer from China. I am working on a set top box 
> project, in which we use TCP/IP protocol to transmit control command and user 
> data. I've ported the LWIP (1.1.0) to our platform (OS20 of ST 
> Microelectronics) and it can work basically. 
>    But I encountered a problem currently. When a large amount of data are 
> transmitting, the program is very easy to crash at an assertion in 
> tcp_receive:
>        if (pcb->snd_queuelen != 0) { 
>LWIP_ASSERT("tcp_receive: valid queue length",
>          pcb->unacked != NULL || pcb->unsent != NULL);
>            }
>      I've checked the bug list on website: 
> http://savannah.nongnu.org/projects/lwip, 
>But I didn't find any report about this problem. I wrote application to use 
>raw API directly.
>      Can anyone give me some hints?
>
>Best regards
>Jeffery Du
>2006-03-17
>
>
>
>
>
>------------------------------
>
>Message: 2
>Date: Fri, 17 Mar 2006 09:00:43 +0100
>From: "Bessone Danilo" <address@hidden>
>Subject: R: [lwip-users] Assertion failure in tcp_receive
>To: "Mailing list for lwIP users" <address@hidden>
>Message-ID:
>       <address@hidden>
>       
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi,
>
>Sorry for my english.
>
>I also encountered a problem in transmitting large amount of data using the 
>raw API interface (version 1.1.0) but in my case the program does not crash. 
>My problem was the transmission of corrupted data. I have discovered that the 
>problem is due of what - I think - is a little bug in the tcp_receive() 
>function. I have found that, as consequence of this bug, the callback function 
>specified with tcp_sent() is erroneously called when an ACK packet is received 
>under particular circumstances (please see my post in date 2006-03-1 for more 
>details). In this rare case the total number of acknowledged bytes computed by 
>the application program is greater than the number of bytes really 
>acknowledged by the lwIP protocol core. If the transmission has been invoked 
>by calling the tcp_write() function (in my case with the NO_COPY option set) 
>and the memory used to store the data to transmit is deallocated or reused 
>immediately after the transmission callback function has computed a number of 
>acknowledged bytes (that can be wrong in some rare cases) that is equal or 
>greater than the data length specified by tcp_write()then many errors 
>conditions can arise as consequence of the same area of memory that can be 
>used at the same time by the application program and the lwIP core.
>
>In my case this problem is disappeared placing the code "pcb->acked = 0" at 
>the beginning of the tcp_receive() function or - perhaps more elegant - at the 
>position specified:
>
>static void tcp_receive() {
>
>  ....
>  ....
>  if (pcb->lastack == ackno) {
>    pcb->acked = 0;
>    ....
>    ....
>  }
>  else if(TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_max)){
>    ....
>    pcb->acked = ackno - pcb->lastack;
>    ....
>  }
>  else             // Code to add in order to complete
>    pcb->acked = 0;   // all checks on the ackno value           
>
>  ....
>  ....
>}
>
>I hope this can help you.
>
>Regards
>
>Danilo Bessone
>
>-----Messaggio originale-----
>Da: address@hidden [mailto:address@hidden Per conto di Jeffery Du
>Inviato: venerd?17 marzo 2006 2.00
>A: lwip-users
>Oggetto: [lwip-users] Assertion failure in tcp_receive
>
>Hi,
>
>        I am a software engineer from China. I am working on a set top box 
> project, in which we use TCP/IP protocol to transmit control command and user 
> data. I've ported the LWIP (1.1.0) to our platform (OS20 of ST 
> Microelectronics) and it can work basically. 
>
>    But I encountered a problem currently. When a large amount of data are 
> transmitting, the program is very easy to crash at an assertion in 
> tcp_receive:
>        if (pcb->snd_queuelen != 0) { 
>LWIP_ASSERT("tcp_receive: valid queue length",
>          pcb->unacked != NULL || pcb->unsent != NULL);
>            }
>      I've checked the bug list on website: 
> http://savannah.nongnu.org/projects/lwip, 
>But I didn't find any report about this problem. I wrote application to use 
>raw API directly.
>      Can anyone give me some hints?
>
>Best regards
>Jeffery Du
>2006-03-17
>
>
>
>_______________________________________________
>lwip-users mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/lwip-users
>--------------------------------------------------------------------
>
>CONFIDENTIALITY NOTICE
>
>This message and its attachments are addressed solely to the persons above and 
>may contain confidential information. If you have received the message in 
>error, be informed that any use of the content hereof is prohibited. Please 
>return it immediately to the sender and delete the message. Should you have 
>any questions, please contact us by replying to address@hidden
>
>        Thank you
>
>                                        www.telecomitalia.it
>
>--------------------------------------------------------------------
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: 
>http://lists.gnu.org/pipermail/lwip-users/attachments/20060317/2566d8f7/attachment.html
>
>------------------------------
>
>Message: 3
>Date: Fri, 17 Mar 2006 09:09:21 +0000
>From: Kieran Mansley <address@hidden>
>Subject: Re: [lwip-users] Assertion failure in tcp_receive
>To: Mailing list for lwIP users <address@hidden>
>Message-ID: <address@hidden>
>Content-Type: text/plain
>
>On Fri, 2006-03-17 at 08:59 +0800, Jeffery Du wrote:
>> Hi,
>> 
>>       I am a software engineer from China. I am working on a set top box 
>> project, in which we use TCP/IP protocol to transmit control command and 
>> user data. I've ported the LWIP (1.1.0) to our platform (OS20 of ST 
>> Microelectronics) and it can work basically. 
>>     But I encountered a problem currently. When a large amount of data are 
>> transmitting, the program is very easy to crash at an assertion in 
>> tcp_receive:
>>       if (pcb->snd_queuelen != 0) { 
>> LWIP_ASSERT("tcp_receive: valid queue length",
>>           pcb->unacked != NULL || pcb->unsent != NULL);
>>             }
>>       I've checked the bug list on website: 
>> http://savannah.nongnu.org/projects/lwip, 
>> But I didn't find any report about this problem. I wrote application to use 
>> raw API directly.
>
>Most likely would be concurrent access to the stack from two different
>threads.  If you're using the raw API you need to protect the stack
>using locks where necessary.
>
>Kieran
>
>
>
>
>
>------------------------------
>
>Message: 4
>Date: Fri, 17 Mar 2006 09:11:11 +0000
>From: Kieran Mansley <address@hidden>
>Subject: Re: [lwip-users] Compilation problem...need info.
>To: Mailing list for lwIP users <address@hidden>
>Message-ID: <address@hidden>
>Content-Type: text/plain
>
>On Thu, 2006-03-16 at 17:26 +0530, address@hidden
>wrote:
>> Hi All,
>>  
>>    I have downloaded lwip-1.1.0.tar.gz from the site. I want following
>> functionalities to work on my system. They are ARP, UDP, ICMP, IP and
>> DHCP client. I can see the code written for all these features in the
>> tar ball. But I am not seeing any Makefile in the tar ball. I tried
>> compiling on red-hat linux-9 (kernel-version 2.4.18), gcc 3.2.Please
>> help me out for the same.
>
>lwIP itself does not have a Makefile as in it's basic form is only
>suitable for integrating into a larger project.  There are however a
>number of ports in the contrib module (which is a separate download)
>that provide the infrastructure necessary to make it stand alone, and
>these provide Makefiles.  There is one for unix which may be of use to
>you, but I would still expect you to have to customise it to your needs
>as it may not do quite what you want.
>
>Kieran
>
>
>
>
>
>------------------------------
>
>Message: 5
>Date: Fri, 17 Mar 2006 15:43:04 +0530
>From: <address@hidden>
>Subject: [lwip-users] Need tiny TCP/IP stack
>To: <address@hidden>
>Message-ID:
>       <address@hidden>
>Content-Type: text/plain; charset="us-ascii"
>
>
>Hi All,
>
>  I need to integrate a TCP/IP stack(only ARP, ICMP, IP and UDP are
>needed). Wether anyone knows the smallest stack available in the open
>source. better if it is compatible for RTOS.
>
>Also  can anyone help me out in integrate it with the OS.
>
>Thanx in Advance.
>
>Regards,
>Raghavendra. S
>
>
>
>
>The information contained in this electronic message and any attachments to 
>this message are intended for the exclusive use of the addressee(s) and may 
>contain proprietary, confidential or privileged information. If you are not 
>the intended recipient, you should not disseminate, distribute or copy this 
>e-mail. Please notify the sender immediately and destroy all copies of this 
>message and any attachments.
>
>WARNING: Computer viruses can be transmitted via email. The recipient should 
>check this email and any attachments for the presence of viruses. The company 
>accepts no liability for any damage caused by any virus transmitted by this 
>email.
>
>www.wipro.com
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: 
>http://lists.gnu.org/pipermail/lwip-users/attachments/20060317/eff17458/attachment.html
>
>------------------------------
>
>Message: 6
>Date: Fri, 17 Mar 2006 02:32:31 -0800 (PST)
>From: Mousom Bose <address@hidden>
>Subject: [lwip-users]
>To: address@hidden
>Message-ID: <address@hidden>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi,
>  In Internet we find an Embedded IPSec implementation for LwIP 
> (http://www.hta-bi.bfh.ch/Projects/ipsec/). 
>  Can anybody please let me know the licensing issues involved in using this 
> software? 
>   
>  With Thanks and Regards,
>  Mousom Bose
>   
>
>                       
>---------------------------------
> Yahoo! Mail
> Use Photomail to share photos without annoying attachments.
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: 
>http://lists.gnu.org/pipermail/lwip-users/attachments/20060317/23b5c918/attachment.html
>
>------------------------------
>
>_______________________________________________
>lwip-users mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>End of lwip-users Digest, Vol 31, Issue 15
>******************************************

= = = = = = = = = = = = = = = = = = = =
Best regards                    
                                 
Jeffery Du
2006-03-17


reply via email to

[Prev in Thread] Current Thread [Next in Thread]