Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic/pull dctcp #536

Closed
wants to merge 8 commits into from
Closed

Conversation

screw
Copy link
Contributor

@screw screw commented May 31, 2020

This is a DCTCP implementation based on RFC 8257.

It based on the TCP Reno (slow start, fast retransmit, fast recovery, congestion avoidance).
In case of ECN (Explicit Congestion Notification) the DCTCP behaves differently than typical TCP.
Each ECN marked data packet is reflected in one Ack packet (normal TCP sends ECE marked Acks until it receives CWR).

The sender then uses two equations to reduce cwnd

  1. DCTCP.Alpha = DCTCP.Alpha * (1 - g) + g * M
    where g is preconfigured variable and M is the ration of bytesMarked/bytesAcked.
    and
  2. cwnd = cwnd * (1 - DCTCP.Alpha / 2)

Also included is one scenario (Incast) with DcTcp config and TcpReno for easy comparison.

screw added 5 commits June 3, 2020 12:18
The initial value for Slow Start threshold is now configurable
via NED parameter initialSsthresh in Tcp.ned.
The default value is set arbitrarily high (0xFFFFFFFF)
Raw amount of payload bytes received at the Tcp including duplicates, out of order, etc) for TCP throughput calculation
Additional handling of IP/ECN (on top of settig gotCeIndication)
can be implemented by overriding processEcnInEstablished()

Marking strategy can be implemented by overriding shouldMarkAck().

The default implementaion (in TcpAlgorithm) marks an Ack when in
ecnEchoState. ecnEchoState is reset when CWR (congestion window reduced)
is received.
Since DcTcp MUST adhere to standard Tcp behaviour (Slow Start, Fast-Retransmit,
Congestion Avoidance, Fast-Recovery, packet drops, ...) the implementation is based on TcpReno class
by overriding receivedDataAck().

It reduces the cwnd window by a fraction of marked data

DCTCP.Alpha = DCTCP.Alpha * (1 - g) + g * M

cwnd = cwnd * (1 - DCTCP.Alpha / 2)

Addional state variables are in dedicated class.

Overrides processEcnInEstablished()
 - set state->dctcp_ce based on gotCeIndication
 - set ack_now if necessary

It also overrides shouldMarkAck()
 - marks only when state->dctcp_ce is set (only one marked Ack for one received marked data segment)

Tcp.ned extended with configurable dtcpGamma (default 0.0625 (1/16))
@ZoltanBojthe
Copy link
Contributor

merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants