[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Follow-up Comment #1, bug #2942 (project lwip):

Do we need this? If not, it would only add unnecessary code lines and binary
size...

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Follow-up Comment #2, bug #2942 (project lwip):

Simon says:
>Do we need this? If not, it would only add unnecessary code >lines and
binary size...

Well, I'd have to say since we don't have it now, and things are apparently
working okay, we must not really need it. ;)

The only real issue I see here is that pbuf_realloc() SOUNDS like it should
be able to construct a larger payload area... and it can't, hence the
well-documented shortcoming. Why bug #2942 was entered, I don't know... Did
Leon want this functionality for some specific purpose?

Perhaps simply renaming it from pbuf_realloc() to pbuf_trim() or something
along those lines would be sufficient to put this one to rest?




    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Follow-up Comment #3, bug #2942 (project lwip):

There doesn't seem to be any point to me since you can grow a pbuf chain by
simply pbuf_chain()'ing another pbuf, and that would almost certainly be more
efficient.

I did happen to notice though that pbuf_realloc uses an s16_t to express the
difference in size between the old and new sizes, but you could be e.g.
shrinking a 64K pbuf to 16K, which can't be expressed in an s16_t. I'll fix
that right now by making it an s32_t.


    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Follow-up Comment #4, bug #2942 (project lwip):

> Perhaps simply renaming it from pbuf_realloc() to pbuf_trim() or something
along those lines would be sufficient to put this one to rest?

That sounds like a good and simple idea to me! But it seems like this could
possibly break applications, if they use pbuf_realloc().

Kieran, what do you think?

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Update of bug #2942 (project lwip):

                  Status:                    None => Wont Fix              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #5:

I suggest leave it as is.  The limitations are documented (I think) and
changing it would have only minor benefit.

Closing this "WONT FIX"



    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #2942] pbuf_realloc cannot not grow chains (can only shrink chains).

Ashley Duncan

Follow-up Comment #6, bug #2942 (project lwip):

I've checked in a comment-change for pbuf_realloc():

Changed the comment to pbuf_realloc() that it can't grow (only shrink) chains
to reflect the fact that we decided not to change this.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel