summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2021-01-27 16:11:49 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-27 16:14:50 -0800
commit99988e45ed651f64e16e2f2663b06b4a1eee50d4 (patch)
treeb5e4682669273698d6c84fbec56ace958afcf43a /pkg/abi
parentcdf49c4433a83d9be6e8a3fb8b09bf457661d39f (diff)
Add support for more fields in netstack for TCP_INFO
This CL adds support for the following fields: - RTT, RTTVar, RTO - send congestion window (sndCwnd) and send slow start threshold (sndSsthresh) - congestion control state(CaState) - ReorderSeen PiperOrigin-RevId: 354195361
Diffstat (limited to 'pkg/abi')
-rw-r--r--pkg/abi/linux/socket.go12
-rw-r--r--pkg/abi/linux/tcp.go9
2 files changed, 21 insertions, 0 deletions
diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go
index 8591acbf2..cb33c37bd 100644
--- a/pkg/abi/linux/socket.go
+++ b/pkg/abi/linux/socket.go
@@ -416,6 +416,18 @@ type TCPInfo struct {
RwndLimited uint64
// SndBufLimited is the time in microseconds limited by send buffer.
SndBufLimited uint64
+
+ Delievered uint32
+ DelieveredCe uint32
+
+ // BytesSent is RFC4898 tcpEStatsPerfHCDataOctetsOut.
+ BytesSent uint64
+ // BytesRetrans is RFC4898 tcpEStatsPerfOctetsRetrans.
+ BytesRetrans uint64
+ // DSACKDups is RFC4898 tcpEStatsStackDSACKDups.
+ DSACKDups uint32
+ // ReordSeen is the number of reordering events seen.
+ ReordSeen uint32
}
// SizeOfTCPInfo is the binary size of a TCPInfo struct.
diff --git a/pkg/abi/linux/tcp.go b/pkg/abi/linux/tcp.go
index 2a8d4708b..1a3c0916f 100644
--- a/pkg/abi/linux/tcp.go
+++ b/pkg/abi/linux/tcp.go
@@ -59,3 +59,12 @@ const (
MAX_TCP_KEEPINTVL = 32767
MAX_TCP_KEEPCNT = 127
)
+
+// Congestion control states from include/uapi/linux/tcp.h.
+const (
+ TCP_CA_Open = 0
+ TCP_CA_Disorder = 1
+ TCP_CA_CWR = 2
+ TCP_CA_Recovery = 3
+ TCP_CA_Loss = 4
+)