lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Re: [patch #6537] wnd_scale TCP option addition


From: Kieran Mansley
Subject: Re: [lwip-devel] Re: [patch #6537] wnd_scale TCP option addition
Date: Tue, 21 Apr 2009 10:32:01 +0100

On Mon, 2009-04-20 at 15:02 +0200, Wim Dumon wrote:
> On Mon, Apr 20, 2009 at 12:34 PM, Simon Goldschmidt <address@hidden> wrote:
> >> I started doing it that way, but felt that I would end up adding a lot
> >> of complexity for no good reason. pbuf is already a chained structure,
> >> and chaining these chains again would need extra allocated structures
> >> & logic. I'm not too familiar with lwip, maybe there is another
> >> list-like structures that I could use?
> >
> > lwIP allows 2 kinds of pbuf-lists (see top of pbuf.c for a more detailed 
> > description):
> > - single packet: last pbuf has next == NULL and len == tot_len
> > - multiple packets: packets ends where len == tot_len, last pbuf of last 
> > packet has next == NULL
> >
> > The stack already relies on this in other places, so it can be used here, 
> > too.
> >
> 
> The comments in pbuf.c state:
>  * So, a packet queue consists of one or more pbuf chains, each of
>  * which consist of one or more pbufs. CURRENTLY, PACKET QUEUES ARE
>  * NOT SUPPORTED!!! Use helper structs to queue multiple packets.

Simon: can you comment on this?  This comment seems to be saying the
opposite to what you suggested.  I expect it's just that the comment is
out of date.

> I think I can solve it with packet queues too, leaving the tot_len a
> 16 bit counter. Would that be more acceptable?

I'd prefer that: using the multiple-packet type of pbuf list that Simon
describes above was my first thought, and should I think be
straightforward.  If you think this will add lots of complexity, then
lets discuss it further before you go to a lot of effort though.

Kieran





reply via email to

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