From cd0c5d8373d04f9e49b2ad630632e7940d841986 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Sat, 12 Oct 2019 18:10:20 -0700 Subject: tcp: improve rate samples for retansmitted segments Type: fix - Initialize max_seq on both transmitted and retransmitted segments - Keep track of segments that have been sacked. - Track new data segments sent during recovery Change-Id: Ice55231a3da200ae6171702e54b2ce155f831143 Signed-off-by: Florin Coras (cherry picked from commit d6ae4bf13a7819d64d128d196d491af4700fa948) --- src/vnet/tcp/tcp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/vnet/tcp/tcp.h') diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 097a1475185..8636a7c85db 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -140,7 +140,6 @@ typedef enum tcp_cfg_flag_ _(DEQ_PENDING, "Dequeue pending ") \ _(PSH_PENDING, "PSH pending") \ _(FINRCVD, "FIN received") \ - _(TRACK_BURST, "Track burst") \ _(ZERO_RWND_SENT, "Zero RWND sent") \ typedef enum tcp_connection_flag_bits_ @@ -256,6 +255,7 @@ typedef enum tcp_bts_flags_ { TCP_BTS_IS_RXT = 1, TCP_BTS_IS_APP_LIMITED = 1 << 1, + TCP_BTS_IS_SACKED = 1 << 2, } __clib_packed tcp_bts_flags_t; typedef struct tcp_bt_sample_ @@ -824,7 +824,7 @@ void tcp_bt_flush_samples (tcp_connection_t * tc); * * @param tc tcp connection */ -void tcp_bt_track_tx (tcp_connection_t * tc); +void tcp_bt_track_tx (tcp_connection_t * tc, u32 len); /** * Track a tcp retransmission * @@ -855,6 +855,7 @@ void tcp_bt_check_app_limited (tcp_connection_t * tc); * @param bt byte tracker */ int tcp_bt_is_sane (tcp_byte_tracker_t * bt); +u8 *format_tcp_bt (u8 * s, va_list * args); always_inline u32 tcp_end_seq (tcp_header_t * th, u32 len) -- cgit 1.2.3-korg