lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #3031] Implement a new fully pool-based pbuf implement


From: Jonathan Larmour
Subject: [lwip-devel] [bug #3031] Implement a new fully pool-based pbuf implementation.
Date: Thu, 26 Jul 2007 15:12:10 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12

Follow-up Comment #23, bug #3031 (project lwip):

> Ah, OK. But there are two problems with counting the segments:
> - you have no control of how many pbufs you need to configure

That is true.

> - snd_queuelen is decremented using pbuf_clen (because when
> sending with copy=0, a segment will consists of one PBUF_REF for
> the data and one PBUF_RAM for the header) so it must be
> incremented using pbuf_clen also, I think.

Before your changes it wasn't decremented using pbuf_clen either.

But I guess if pbuf_clen becomes a macro, it's not worth worrying about - the
only problem being now that I'm not sure it can be made a macro. Perhaps we
need a different name for the macro version:

#define pbuf_clen_p( p, c ) 
{                           
  struct pbuf *_p = (p);    
  u8_t _len = 0;            
  while (_p != NULL) {      
    ++_len;                 
    _p = _p->next;          
  }                         
  (*c) = _len;              
}


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?3031>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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