[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #46289] tcp_write fails with ERR_MEM if TCP_SND_QUEUEL
From: |
Ambroz Bizjak |
Subject: |
[lwip-devel] [bug #46289] tcp_write fails with ERR_MEM if TCP_SND_QUEUELEN is reached |
Date: |
Mon, 02 Nov 2015 22:15:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 |
Follow-up Comment #2, bug #46289 (project lwip):
Hey,
I think it can be done that way. But, I'm a bit afraid that this would make
the two functions very tightly coupled, and one could change the tcp_write()
logic while forgetting to make the appropriate change in the
tcp_write_partly() calculating the available space, breaking it.
So I have a counter-proposal. We make the partial writes an optional feature
enabled with e.g. LWIP_TCP_PARTIAL_WRITE. With partial writes disabled, the
pretty much stays as it is right now, so just a tcp_write() function. With
partial writes enabled, the current tcp_write() code actually becomes the new
tcp_write_partly(), which works the same as my tcp_write_ext() (flag enabled
partial mode). And in this case we also have a tcp_write() wrapper on top of
tcp_write_partly().
Finally I think I we can get away without a TCP_WRITE_FLAG_PARTIAL flag if we
just look at whether written_len is not NULL.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?46289>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #46289] tcp_write fails with ERR_MEM if TCP_SND_QUEUELEN is reached,
Ambroz Bizjak <=