lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Sending large packets


From: Kieran Mansley
Subject: Re: [lwip-users] Sending large packets
Date: Fri, 03 Aug 2007 11:32:27 +0100

On Fri, 2007-08-03 at 11:22 +0100, Julian Gardner [RSD] wrote:
> I need to send 16K packets using tcp and have the code working but
> lwip seems to send the data packets in funny sizes
> 
>  
> 
> 1460 832 1460 344 1460 832 1460 344 … 584 which adds up to my packet
> size of 15792
> 
>  
> 
> Is there some define I missed that would make the stack send as 1460
> blocks and then a small block at the end?

In general, no, as the size of packet sent will be determined by many
things - the amount of data in the send queue, the size of pbufs, the
congestion window, the receive window, the size of write done by the
application, and so on.  lwIP takes a pretty conservative approach to
merging and splitting pbufs in order to make bigger frames on the wire,
and this is something that should be improved (there might even be a
task or bug open on it - I remember it being discussed recently).  I
suspect in your case that the large write you do has been fragmented
into pbufs in a non-ideal way, and this leads to the pattern you see
above.  I'm surprised it's that bad though.

Having scatter-gather support in the driver would help a lot in this
regard, but we assume (I think) for simplicity that such a facility
isn't present.

Kieran





reply via email to

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