From 487651ac46f302592ccffc9e5a4336a331010e42 Mon Sep 17 00:00:00 2001 From: Nayana Bidari Date: Thu, 7 Oct 2021 16:48:28 -0700 Subject: Add a new metric to detect the number of spurious loss recoveries. - Implements RFC 3522 (Eifel detection algorithm) to detect if the connection entered loss recovery unnecessarily. - Added a new metric to count the total number of spurious loss recoveries. - Added tests to verify the new metric. PiperOrigin-RevId: 401637359 --- pkg/tcpip/stack/tcp.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/tcpip/stack') diff --git a/pkg/tcpip/stack/tcp.go b/pkg/tcpip/stack/tcp.go index dc7289441..a941091b0 100644 --- a/pkg/tcpip/stack/tcp.go +++ b/pkg/tcpip/stack/tcp.go @@ -289,6 +289,12 @@ type TCPSenderState struct { // RACKState holds the state related to RACK loss detection algorithm. RACKState TCPRACKState + + // RetransmitTS records the timestamp used to detect spurious recovery. + RetransmitTS uint32 + + // SpuriousRecovery indicates if the sender entered recovery spuriously. + SpuriousRecovery bool } // TCPSACKInfo holds TCP SACK related information for a given TCP endpoint. -- cgit v1.2.3