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: Julian Gardner [RSD]
Subject: RE: [lwip-users] Sending large packets
Date: Fri, 3 Aug 2007 11:35:13 +0100

Thanks for that, so is there any way I can help the stack by changing
some pbuf #defines to make it work better, or by making my packet send
smaller?

joolz

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Kieran
Mansley
Sent: 03 August 2007 11:32
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Sending large packets

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



_______________________________________________
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]