lwIP - A Lightweight TCP/IP stack - Patches: patch #7454, add support for pbuf as an...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7454: add support for pbuf as an argument to tcp_write()
Submitter: | Matt Dittrich <mdittrich> | ||
Submitted: | Mon 31 Jan 2011 06:32:18 AM UTC | ||
Category: | TCP | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | goldsimon | Open/Closed: | Closed |
Planned Release: | None |
Fri 09 Dec 2016 11:28:05 AM UTC, comment #3: |
Simon Goldschmidt <goldsimon> |
Sat 29 Oct 2011 08:23:46 PM UTC, comment #2: I don't think splitting pbufs would make sense. And mem_slit() wouldn't even work, as you need control structures between every heap element (the 'next' pointer, at least). I think an application should simply allocate a pbuf in the correct length (i.e. a pbuf >= MSS should be rejected and there should be a way to get the amount of free space in the last unsent segment to create pbufs of appropriate size).
|
Simon Goldschmidt <goldsimon> |
Wed 02 Feb 2011 07:51:43 PM UTC, comment #1: 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.
|
Matt Dittrich <mdittrich> |
Mon 31 Jan 2011 06:32:18 AM UTC, original submission:
The attached tcp_write_pbuf1/2.patch extend tcp_write() to accept a pbuf chain as the data source. This allows the application to allocate memory and have the stack manage freeing the pbufs, possibly saving the memcpy() that TCP_WRITE_FLAG_COPY uses. I only tested with PBUF_RAM, with LWIP_CHECKSUM_ON_COPY off.
|
Matt Dittrich <mdittrich> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-12-09 | goldsimon | Status | None | Wont Do | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
2013-01-15 | goldsimon | Category | None | TCP | |
2011-01-31 | mdittrich | Attached File | - | Added tcp_write_pbuf1.patch, #22562 | |
Attached File | - | Added pbuf_memcpy1.patch, #22563 | |||
Attached File | - | Added tcp_write_pbuf2.patch, #22564 | |||
Attached File | - | Added pbuf_memcpy2.patch, #22565 |
Powered by Savane 3.13-f8d8.
Corresponding source code
By now, I don't think the way this patch solves it is good. We need a type-safe (new) function to pass pbufs to tcp (i.e. tcp_write_pbuf() or slt.).
After all, we have task #10273 for this issue.