[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7454] add support for pbuf as an argument to tcp_wr
From: |
Matt Dittrich |
Subject: |
[lwip-devel] [patch #7454] add support for pbuf as an argument to tcp_write() |
Date: |
Wed, 02 Feb 2011 19:51:43 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11) Gecko/20101013 Ubuntu/10.10 (maverick) Firefox/3.6.11 |
Follow-up Comment #1, patch #7454 (project lwip):
It seems that these patches are a bit premature, tcp_write() doesn't
correctly handle pbuf chains longer than pcb->mss. I think splitting the
large pbuf into mss sized chunks would require new pbuf_split() and
mem_split() that do much of what pbuf_realloc() and mem_trim() do now, but
without discarding/freeing their remainders. New nodes in the respective
lists would be inserted to maintain the remainder. I think the split lengths
would also have to be restricted to respect alignment. pbuf_split() would
fail when the "split point" of the chain lies within a PBUF_POOL.
Its not a trivial amount of code to get working (FYI: pbuf_realloc() and
mem_trim() occupy ~344 bytes on my -O2 Cortex-M3). Would this code be useful
in other parts of the stack (I am not familiar with the socket
implementation)?
I had not encountered this in my original testing because I was using it for
CGI response generation in httpserver_raw... the TCP_WRITE_FLAG_PBUF output
was always less than mss and at the beginning of a segment. So as they stand,
the patches have limited usefulness.
Thanks,
MD
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7454>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [patch #7454] add support for pbuf as an argument to tcp_write(),
Matt Dittrich <=