From eb0505cdf1e38b16dcf0e66ead91a5140abb9819 Mon Sep 17 00:00:00 2001 From: Nayana Bidari Date: Fri, 10 May 2024 15:35:04 -0700 Subject: [PATCH] Remove TODOs for supporting TCP_INFO option. TCP_INFO option is supported in gVisor, but does not return all the fields in struct TCP_INFO. The fields which were required for debugging are added. The support for other fields in the struct can be added when required. PiperOrigin-RevId: 632621246 --- pkg/sentry/socket/netstack/netstack.go | 2 -- pkg/tcpip/tcpip.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index 43a8c651e..b60143476 100644 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -1201,8 +1201,6 @@ func getSockOptTCP(t *kernel.Task, s socket.Socket, ep commonEndpoint, name, out return nil, syserr.TranslateNetstackError(err) } - // TODO(b/64800844): Translate fields once they are added to - // tcpip.TCPInfoOption. info := linux.TCPInfo{ State: uint8(v.State), RTO: uint32(v.RTO / time.Microsecond), diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 7c21c43c1..ae5e02776 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -1190,8 +1190,6 @@ const ( ) // TCPInfoOption is used by GetSockOpt to expose TCP statistics. -// -// TODO(b/64800844): Add and populate stat fields. type TCPInfoOption struct { // RTT is the smoothed round trip time. RTT time.Duration