[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs |
Date: |
Fri, 23 Dec 2016 07:54:40 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14 |
Follow-up Comment #3, bug #49914 (project lwip):
Good point on the PBUF_RAM which is normally in a chain as a header. I think
for writing a netif that did asynchronous output, it would be a good practice
to copy the entire chain and not just any PBUF_REF pbufs. We've discussed this
before, but a TCP segment is still referenced after output. During
retransmission, the TCP header (contained in a PBUF_RAM) is modified without
checking the reference count. Given this behavior, it seems unsafe for a
netif to hold a reference to a pbuf after the output function has completed.
Maybe any netif developers that have written asynchronous output can share
their approach.
I would prefer to preserve the current PBUF_REF behavior, but I think more
importantly, the UDP sendmsg and sendto paths should behave the same. So if
using PBUF_REFs in this manner is no longer considered a desirable use case, I
would encourage also modifying lwip_sendto
Simon and I did discuss this issue in the original bug (I should have used a
patch/task :P) for adding sendmsg support and the conclusion was that since
sendmsg followed the same practice as sendto, it was ok.
https://savannah.nongnu.org/bugs/?func=detailitem&item_id=44805
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?49914>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Dirk Ziegelmeier, 2016/12/22
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Dirk Ziegelmeier, 2016/12/22
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Joel Cunningham, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Simon Goldschmidt, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs,
Joel Cunningham <=
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Dirk Ziegelmeier, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, David van Moolenbroek, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Joel Cunningham, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, David van Moolenbroek, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Dirk Ziegelmeier, 2016/12/23
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Joel Cunningham, 2016/12/27
- [lwip-devel] [bug #49914] lwip_sendmsg uses PBUF_REF pbufs, Simon Goldschmidt, 2016/12/27