tcp: task #14128 - Appropriate Byte Counting support

This commit adds TCP Appropriate Byte Counting (ABC) support based on
RFC 3465

ABC replaces the previous congestion window growth mechanism and has been
configured with limit of 2 SMSS.  See task #14128 for discussion on
defaults, but the goal is to mitigate the performance impact of delayed
ACKs on congestion window growth

This commit also introduces a mechanism to track when the stack is
undergoing a period following an RTO where data is being retransmitted.

Lastly, this adds a unit test to verify RTO period tracking and some
basic ABC cwnd checking
This commit is contained in:
Joel Cunningham
2017-04-12 19:29:38 -05:00
parent e1f2c8b30c
commit de90d03e48
5 changed files with 171 additions and 4 deletions

View File

@@ -209,6 +209,7 @@ struct tcp_pcb {
#if LWIP_TCP_TIMESTAMPS
#define TF_TIMESTAMP 0x0400U /* Timestamp option enabled */
#endif
#define TF_RTO 0x0800U /* RTO timer has fired, in-flight data moved to unsent and being retransmitted */
/* the rest of the fields are in host byte order
as we have to do some math with them */
@@ -245,6 +246,9 @@ struct tcp_pcb {
tcpwnd_size_t cwnd;
tcpwnd_size_t ssthresh;
/* first byte following last rto byte */
u32_t rto_end;
/* sender variables */
u32_t snd_nxt; /* next new seqno to be sent */
u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last
@@ -262,6 +266,8 @@ struct tcp_pcb {
u16_t unsent_oversize;
#endif /* TCP_OVERSIZE */
tcpwnd_size_t bytes_acked;
/* These are ordered by sequence number: */
struct tcp_seg *unsent; /* Unsent (queued) segments. */
struct tcp_seg *unacked; /* Sent but unacknowledged segments. */