lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Optimizing TCP writes


From: Bill Auerbach
Subject: RE: [lwip-users] Optimizing TCP writes
Date: Thu, 6 Mar 2008 08:45:00 -0500

Thanks Jonathan,

I see that it outputs a segment in tcp_output, but I'm not calling
tcp_output.  I'm calling tcp_write multiple times.  I do see it append a
segment in tcp_enqueue.  Shouldn't tcp_output pass a linked pbuf chain with
enough data up to the MSS?  If I call tcp_write 10 times with 10 "Hello
World"s, I would think one Ethernet frame would be sent with a call to
ip_output with one pbuf pointer with 11 payloads (the header and 10 data
payloads).

Bill
 
> I believe tcp_output always outputs a segment. What tcp_output_nagle does
> is choose times _not_ to - i.e. to wait a bit and save it up. You can see
> if defined in include/lwip/tcp.h.
> 
> In other words, only call tcp_output when you do want to output something.
> And arguably the same for tcp_output_nagle (although it won't guarantee
> you
> will). Obviously you may need some care you don't keep enqueuing data and
> never sending it, until you run out of buffers!
> 
> Jifl
> --
> eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
>  **  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
>  **  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
> Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
> Registered in England and Wales: Reg No 4422071.
> ------["Si fractum non sit, noli id reficere"]------       Opinions==mine
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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