lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Delayed Ack causing problems? Where to call tcp_nagle_d


From: FreeRTOS Info
Subject: Re: [lwip-users] Delayed Ack causing problems? Where to call tcp_nagle_disable()?
Date: Sat, 06 Aug 2011 19:30:00 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0

I think I have answered my own question.  I put it before these lines,
and everything is fine now.

  /* Tell TCP that this is the structure we wish to be passed for our
     callbacks. */
  tcp_nagle_disable(pcb);//<<<<<<<<<<<<<<<<Added line
  tcp_arg(pcb, hs);

  /* Set up the various callback functions */
  tcp_recv(pcb, http_recv);
  tcp_err(pcb, http_err);
  tcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL);
  tcp_sent(pcb, http_sent);


Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.




On 06/08/2011 18:12, FreeRTOS Info wrote:
> Hi,
> 
> lwIP V1.4.0.
> 
> I have moved the demo FreeRTOS example from the Windoze simulator onto
> real hardware in order to check the timing behaviour (which can't really
> be done in the simulator), and found a timing problem.
> 
> Using an umodified raw http server from the contrib distribution, I am
> attempting to retrieve a large jpg file (approx 37K).  The file is
> retrieved in tact, but very slowly.  I am using a point to point connection.
> 
> Taking a Wireshark log I see that data is only being sent by lwIP  after
> an ACK from Windows.  I have attached the log for good measure.
> 192.168.0.200 is the lwIP end.
> 
> I have considered three things to fix this.  First I have set
> TCP_SND_QUEUELEN to (8 * TCP_SND_BUF/TCP_MSS), but that made no
> difference.  Second I considered the calls to tcp_output() after
> tcp_write() to make sure data is actually going out immediately, but
> don't think that is the issue as I'm using an unmodified HTTP server
> from the contrib distribution.
> 
> Finally, I want to try disabling the nagle algorithm, and see this can
> be done by calling tcp_nagle_disable(), but I am unsure where and how to
> do this?  I don't want to modify the core lwIP code, so assume it should
> be in the http server code.  It is using the raw API version, so it is
> not obvious how or where to do to call the macro correctly.
> 
> I would be grateful for advise or an example.  Thanks.
> 
> 
> Regards,
> Richard.
> 
> + http://www.FreeRTOS.org
> Designed for Microcontrollers.
> More than 7000 downloads per month.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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