summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-09-12 18:36:44 -0700
committerJohn Lo <loj@cisco.com>2019-09-25 14:54:42 +0000
commit36ebcfffbc7ab0e83b4bb8dfaec16bf16cafb954 (patch)
treefe9803af08fd55cf1c9419d6e58f45394e155a7b /src/vnet/session
parent54c93cfc2556d9c6d2cf472f51d4c2866a556ef6 (diff)
tcp: use sacks for timer based recovery
Type: feature If available, reuse sack scoreboard in timer triggered retransmit to minimize spurious retransmits. Additional changes/refactoring: - limited transmit updates - add sacked rxt count to scoreboard - prr pacing of fast retransmits - startup pacing updates - changed loss window to flight + mss Change-Id: I057de6a9d6401698bd1031d5cf5cfbb62f2bdf61 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/transport.c18
-rw-r--r--src/vnet/session/transport.h9
2 files changed, 26 insertions, 1 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index effd5891e0b..3e723994752 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -578,7 +578,8 @@ spacer_max_burst (spacer_t * pacer, u64 norm_time_now)
u64 n_periods = norm_time_now - pacer->last_update;
u64 inc;
- if (n_periods > 0 && (inc = n_periods * pacer->tokens_per_period) > 10)
+ if (n_periods > 0
+ && (inc = (f32) n_periods * pacer->tokens_per_period) > 10)
{
pacer->last_update = norm_time_now;
pacer->bucket = clib_min (pacer->bucket + inc, pacer->bytes_per_sec);
@@ -608,6 +609,13 @@ spacer_pace_rate (spacer_t * pacer)
return pacer->bytes_per_sec;
}
+static inline void
+spacer_reset_bucket (spacer_t * pacer, u64 norm_time_now)
+{
+ pacer->last_update = norm_time_now;
+ pacer->bucket = 0;
+}
+
void
transport_connection_tx_pacer_reset (transport_connection_t * tc,
u32 rate_bytes_per_sec,
@@ -646,6 +654,14 @@ transport_connection_tx_pacer_burst (transport_connection_t * tc,
return spacer_max_burst (&tc->pacer, time_now);
}
+void
+transport_connection_tx_pacer_reset_bucket (transport_connection_t * tc,
+ u64 time_now)
+{
+ time_now >>= SPACER_CPU_TICKS_PER_PERIOD_SHIFT;
+ spacer_reset_bucket (&tc->pacer, time_now);
+}
+
u32
transport_connection_snd_space (transport_connection_t * tc, u64 time_now,
u16 mss)
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index cbe3c36734c..5b45be0a0be 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -220,6 +220,15 @@ u32 transport_connection_tx_pacer_burst (transport_connection_t * tc,
u64 transport_connection_tx_pacer_rate (transport_connection_t * tc);
/**
+ * Reset tx pacer bucket
+ *
+ * @param tc transport connection
+ * @param time_now current cpu time
+ */
+void transport_connection_tx_pacer_reset_bucket (transport_connection_t * tc,
+ u64 time_now);
+
+/**
* Initialize period for tx pacers
*
* Defines a unit of time with respect to number of cpu cycles that is to