Add TCP protocol support with congestion control#1
Open
Conversation
This commit introduces TCP transport protocol support to the Machnet networking stack, which previously only supported UDP. The implementation includes: - tcp.h: TCP header structure with standard fields (ports, seq/ack numbers, flags, window, checksum, urgent pointer) following RFC 793 - tcp.cc: TCP header ToString() and FlagsToString() utility methods - tcp_cc.h: TCP congestion control with: - Slow start (exponential cwnd growth) - Congestion avoidance (AIMD) - Fast retransmit (on 3 duplicate ACKs) - Fast recovery (NewReno-style) - RTT estimation using Jacobson/Karels algorithm - RTO calculation per RFC 6298 - SACK support - tcp_flow.h: TCP flow management including: - Full TCP state machine (CLOSED through TIME_WAIT) - Three-way handshake (active and passive open) - Connection teardown with FIN/RST - Data transmission with congestion control - Out-of-order packet handling and reassembly - flow_key.h: Extended to support TCP flow keys alongside existing UDP The implementation follows the existing code style and integrates with the DPDK-based packet processing infrastructure. https://claude.ai/code/session_01FawDCUwRcn1X6wwsfGjfxC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive TCP (Transmission Control Protocol) support to the juggler networking library, including TCP header definitions, flow key structures, and a complete TCP congestion control implementation following RFC 5681 standards.
Key Changes
TCP Header Implementation
tcp.hwith complete TCP header structure (RFC 793) including:ToString(),FlagsToString())tcp.ccwith implementations of string conversion methodsTCP Congestion Control
tcp_cc.hwith full TCP congestion control implementation:Flow Key Structures
flow_key.hwith TCP-specific flow definitions:Protocolenum for transport layer identification (UDP/TCP)tcp_flow::Listenerstruct for TCP listener endpointstcp_flow::Keystruct for TCP 5-tuple flow identificationNotable Implementation Details
Testing Considerations
https://claude.ai/code/session_01FawDCUwRcn1X6wwsfGjfxC