[En-Nut-Discussion] Re: TCP stops working after some time

Dusan Ferbas dferbas at dfsoft.cz
Thu Dec 16 09:57:11 CET 2004


Hi Harald,

thanks for info.


> >Do you think it is sufficient to do only periodic connects ? I think more
> >important is a case with multiple TCP connections with concurrent traffic
> >and larger files (more segments). So for testing there should be also
> >multithreaded client (like a web browser).
>
>I strongly disagree.

That's your right. I am prepared to be convinced :-)

>It is most essential to reproduce the problem with
>the most simple test case, which is possible.
>
>In general, there is no such thing like a single
>threaded application, because the idle thread is
>part of every Nut/OS code. Additional threads
>are created by the TCP stack.
>
>
>At least this shows, that you're using the UARTs too.
>Which driver? devUart or devUsartAvr?

devUsartAvr, we are using its half duplex pin toggle feature

---
>We are currently testing with socket timeouts, which had
>been excluded from our initial test case. We plan to setup
>additional tests with UART communication.

---
#define HTTPD_TCP_MSS   1320    /*DF 12.5.2004 - special request from 
Oliver Schulz for testing, formerly: (1500 - 40)*/
                                 //TCP_MSS/*1024/*(1500 - 40)*/  //override 
default TCP_MSS == 536
                                 //IP portion, +14 -> whole packet (1514)

#define HTTP_PRIO               80

         static const u_short
                 tcp_mss = HTTPD_TCP_MSS;
         static const u_long
                 tcp_tmout = 5000;       /* timeout for sending & receiving 
data on TCP socket */
                                         /* DF 7.12.2004 - was 3000 */
...
         (void)NutTcpSetSockOpt(sock, TCP_MAXSEG, &tcp_mss, sizeof(tcp_mss));
         (void)NutTcpSetSockOpt(sock, SO_SNDBUF, &tcp_mss, sizeof(tcp_mss));

         (void)NutTcpSetSockOpt (sock, SO_SNDTIMEO, &tcp_tmout, 
sizeof(tcp_tmout));
         (void)NutTcpSetSockOpt (sock, SO_RCVTIMEO, &tcp_tmout, 
sizeof(tcp_tmout));



>HTTP is no issue, at least not yet. Our problem appears
>without using HTTP.

I thought that problem can appear when multiple simultaneous TCP streams 
are handled. Because when we were doing only 1 http (TCP) request at a 
time, there were no problems. Are you sure that there cannot be any issue 
with timers, events, lingering etc. ?

>I also did some (unstructured) tests with heavy usage of
>events and timeouts. No problems were found.
>
>Harald

Dusan



Dusan Ferbas
www.dfsoft.cz 




More information about the En-Nut-Discussion mailing list