Commit 2c920ee
committed
net: tcp: change unsent queue from packets to temporary_buffer:s
The unsent queue is currently a queue of packets. This is awkward
because the packets queued don't correspond to packets to be sent;
they have to be cut and pasted to fit the send window or maximum
packet size, whichever is greater.
The recent change to data_sink to work in terms of temporary_buffer:s
rather than packets provides an additional incentive to fix this.
The fix is simple: change the queue type to hold temporary buffers.
The compatibility code to construct a packet out of the data_sink
temporary_buffer:s is no longer needed.
The code to reshape the unsent packets to a packet to be sent is
simplified: we append buffers to the packet until a complete
buffer will overflow the maximum send size, then split the last
buffer (if available and needed) to complete the packet.
Tested with httpd on a tap device, seems to work.1 parent 99e07a1 commit 2c920ee
File tree
3 files changed
+22
-33
lines changed- demos
- include/seastar/net
- src/net
3 files changed
+22
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
439 | | - | |
| 440 | + | |
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| |||
689 | 690 | | |
690 | 691 | | |
691 | 692 | | |
692 | | - | |
693 | | - | |
| 693 | + | |
| 694 | + | |
694 | 695 | | |
695 | 696 | | |
696 | 697 | | |
| |||
1590 | 1591 | | |
1591 | 1592 | | |
1592 | 1593 | | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
1614 | 1597 | | |
1615 | 1598 | | |
1616 | 1599 | | |
| |||
1813 | 1796 | | |
1814 | 1797 | | |
1815 | 1798 | | |
1816 | | - | |
| 1799 | + | |
1817 | 1800 | | |
1818 | 1801 | | |
1819 | 1802 | | |
1820 | 1803 | | |
1821 | 1804 | | |
1822 | | - | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1823 | 1808 | | |
1824 | 1809 | | |
1825 | | - | |
| 1810 | + | |
| 1811 | + | |
1826 | 1812 | | |
1827 | 1813 | | |
1828 | 1814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | 210 | | |
212 | | - | |
213 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
0 commit comments