Commit ed65721
committed
net: P5-C — atomic cutover from TcpConnection to Pcb enum-of-structs
Delete TcpConnection, TcpConnectionTable, TCP_TABLE, TcpInputResult,
and the five process_* handler functions. tcp_input now locks PCB_TABLE
and dispatches through Pcb::on_segment, returning Actions that callers
drain for segments, timer ops, and socket wake-ups.
Architecture: buffers live in a parallel static array
(PcbTable.buffers[64]) separate from the small Pcb structs
(PcbTable.slots[Option<Pcb>; 64]), matching Linux's sk_buff separation
and preventing stack overflow on construct/drop of the ~75 KB
TcpBufferPair.
Key changes:
- All lifecycle/query/data-path functions take ConnId, drop tcp_ prefix
- TcpState kept as derived read-only view via PcbState::tcp_state()
- SegmentBuilder: delete &TcpConnection methods, rename _raw to canon
- socket.rs: ConnId threading, socket_notify_tcp_activity takes &Actions
- sync_socket_state uses observed_socket_state() directly
- tcp_socket shim deleted from lib.rs
- Keepalive scheduling wired into tcp_input glue
- RttEstimator gains consecutive_timeouts for retransmit-max detection
- with_data_state! macro + with_pcb closure API for test ergonomics
- All 24 files updated, 2351/2351 tests green (1 deleted: empty defaults)
Grep audits: TcpInputResult=0, TcpConnection=0, tcp_get_connection=0,
tcp::tcp_=0, pub mod tcp_socket=0 in code.1 parent 761e09b commit ed65721
24 files changed
Lines changed: 1947 additions & 2774 deletions
File tree
- drivers/src
- net/src
- tcp
- pcb
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | | - | |
658 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
659 | 659 | | |
660 | | - | |
| 660 | + | |
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | | - | |
248 | | - | |
| 247 | + | |
| 248 | + | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 35 | | |
45 | 36 | | |
46 | 37 | | |
| |||
0 commit comments