summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-09-23 20:16:47 +0000
committergVisor bot <gvisor-bot@google.com>2021-09-23 20:16:47 +0000
commitedc93e9b8253e22b6484e4979d461cbb6559a649 (patch)
tree8a3e9326160992e98a12e599dfbd1ee0c264dc26 /pkg/tcpip/transport
parentc0f381d1560300e0f6bb798aa7b7e503d2b224c3 (diff)
parent1df5ad1c7ac075b4f81021c00e8d68b1e94448d3 (diff)
Merge release-20210921.0-19-g1df5ad1c7 (automated)
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r--pkg/tcpip/transport/icmp/endpoint.go5
-rw-r--r--pkg/tcpip/transport/icmp/icmp_state_autogen.go31
-rw-r--r--pkg/tcpip/transport/packet/endpoint.go2
-rw-r--r--pkg/tcpip/transport/packet/packet_state_autogen.go35
-rw-r--r--pkg/tcpip/transport/raw/endpoint.go2
-rw-r--r--pkg/tcpip/transport/raw/raw_state_autogen.go23
-rw-r--r--pkg/tcpip/transport/udp/endpoint.go5
-rw-r--r--pkg/tcpip/transport/udp/udp_state_autogen.go59
8 files changed, 86 insertions, 76 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go
index b3436e44c..bb0db9f70 100644
--- a/pkg/tcpip/transport/icmp/endpoint.go
+++ b/pkg/tcpip/transport/icmp/endpoint.go
@@ -54,9 +54,8 @@ type endpoint struct {
waiterQueue *waiter.Queue
uniqueID uint64
net network.Endpoint
- // TODO(b/142022063): Add ability to save and restore per endpoint stats.
- stats tcpip.TransportEndpointStats `state:"nosave"`
- ops tcpip.SocketOptions
+ stats tcpip.TransportEndpointStats
+ ops tcpip.SocketOptions
// The following fields are used to manage the receive queue, and are
// protected by rcvMu.
diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
index 84a0d4f3a..5ba2d9925 100644
--- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go
+++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
@@ -56,6 +56,7 @@ func (e *endpoint) StateFields() []string {
"waiterQueue",
"uniqueID",
"net",
+ "stats",
"ops",
"rcvReady",
"rcvList",
@@ -74,13 +75,14 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(2, &e.waiterQueue)
stateSinkObject.Save(3, &e.uniqueID)
stateSinkObject.Save(4, &e.net)
- stateSinkObject.Save(5, &e.ops)
- stateSinkObject.Save(6, &e.rcvReady)
- stateSinkObject.Save(7, &e.rcvList)
- stateSinkObject.Save(8, &e.rcvBufSize)
- stateSinkObject.Save(9, &e.rcvClosed)
- stateSinkObject.Save(10, &e.frozen)
- stateSinkObject.Save(11, &e.ident)
+ stateSinkObject.Save(5, &e.stats)
+ stateSinkObject.Save(6, &e.ops)
+ stateSinkObject.Save(7, &e.rcvReady)
+ stateSinkObject.Save(8, &e.rcvList)
+ stateSinkObject.Save(9, &e.rcvBufSize)
+ stateSinkObject.Save(10, &e.rcvClosed)
+ stateSinkObject.Save(11, &e.frozen)
+ stateSinkObject.Save(12, &e.ident)
}
// +checklocksignore
@@ -90,13 +92,14 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(2, &e.waiterQueue)
stateSourceObject.Load(3, &e.uniqueID)
stateSourceObject.Load(4, &e.net)
- stateSourceObject.Load(5, &e.ops)
- stateSourceObject.Load(6, &e.rcvReady)
- stateSourceObject.Load(7, &e.rcvList)
- stateSourceObject.Load(8, &e.rcvBufSize)
- stateSourceObject.Load(9, &e.rcvClosed)
- stateSourceObject.Load(10, &e.frozen)
- stateSourceObject.Load(11, &e.ident)
+ stateSourceObject.Load(5, &e.stats)
+ stateSourceObject.Load(6, &e.ops)
+ stateSourceObject.Load(7, &e.rcvReady)
+ stateSourceObject.Load(8, &e.rcvList)
+ stateSourceObject.Load(9, &e.rcvBufSize)
+ stateSourceObject.Load(10, &e.rcvClosed)
+ stateSourceObject.Load(11, &e.frozen)
+ stateSourceObject.Load(12, &e.ident)
stateSourceObject.AfterLoad(e.afterLoad)
}
diff --git a/pkg/tcpip/transport/packet/endpoint.go b/pkg/tcpip/transport/packet/endpoint.go
index e4a64e191..689427d53 100644
--- a/pkg/tcpip/transport/packet/endpoint.go
+++ b/pkg/tcpip/transport/packet/endpoint.go
@@ -67,7 +67,7 @@ type endpoint struct {
waiterQueue *waiter.Queue
cooked bool
ops tcpip.SocketOptions
- stats tcpip.TransportEndpointStats `state:"nosave"`
+ stats tcpip.TransportEndpointStats
// The following fields are used to manage the receive queue.
rcvMu sync.Mutex `state:"nosave"`
diff --git a/pkg/tcpip/transport/packet/packet_state_autogen.go b/pkg/tcpip/transport/packet/packet_state_autogen.go
index 9c6623ffd..b1e685bb4 100644
--- a/pkg/tcpip/transport/packet/packet_state_autogen.go
+++ b/pkg/tcpip/transport/packet/packet_state_autogen.go
@@ -58,6 +58,7 @@ func (ep *endpoint) StateFields() []string {
"waiterQueue",
"cooked",
"ops",
+ "stats",
"rcvList",
"rcvBufSize",
"rcvClosed",
@@ -76,14 +77,15 @@ func (ep *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(1, &ep.waiterQueue)
stateSinkObject.Save(2, &ep.cooked)
stateSinkObject.Save(3, &ep.ops)
- stateSinkObject.Save(4, &ep.rcvList)
- stateSinkObject.Save(5, &ep.rcvBufSize)
- stateSinkObject.Save(6, &ep.rcvClosed)
- stateSinkObject.Save(7, &ep.rcvDisabled)
- stateSinkObject.Save(8, &ep.closed)
- stateSinkObject.Save(9, &ep.boundNetProto)
- stateSinkObject.Save(10, &ep.boundNIC)
- stateSinkObject.Save(11, &ep.lastError)
+ stateSinkObject.Save(4, &ep.stats)
+ stateSinkObject.Save(5, &ep.rcvList)
+ stateSinkObject.Save(6, &ep.rcvBufSize)
+ stateSinkObject.Save(7, &ep.rcvClosed)
+ stateSinkObject.Save(8, &ep.rcvDisabled)
+ stateSinkObject.Save(9, &ep.closed)
+ stateSinkObject.Save(10, &ep.boundNetProto)
+ stateSinkObject.Save(11, &ep.boundNIC)
+ stateSinkObject.Save(12, &ep.lastError)
}
// +checklocksignore
@@ -92,14 +94,15 @@ func (ep *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(1, &ep.waiterQueue)
stateSourceObject.Load(2, &ep.cooked)
stateSourceObject.Load(3, &ep.ops)
- stateSourceObject.Load(4, &ep.rcvList)
- stateSourceObject.Load(5, &ep.rcvBufSize)
- stateSourceObject.Load(6, &ep.rcvClosed)
- stateSourceObject.Load(7, &ep.rcvDisabled)
- stateSourceObject.Load(8, &ep.closed)
- stateSourceObject.Load(9, &ep.boundNetProto)
- stateSourceObject.Load(10, &ep.boundNIC)
- stateSourceObject.Load(11, &ep.lastError)
+ stateSourceObject.Load(4, &ep.stats)
+ stateSourceObject.Load(5, &ep.rcvList)
+ stateSourceObject.Load(6, &ep.rcvBufSize)
+ stateSourceObject.Load(7, &ep.rcvClosed)
+ stateSourceObject.Load(8, &ep.rcvDisabled)
+ stateSourceObject.Load(9, &ep.closed)
+ stateSourceObject.Load(10, &ep.boundNetProto)
+ stateSourceObject.Load(11, &ep.boundNIC)
+ stateSourceObject.Load(12, &ep.lastError)
stateSourceObject.AfterLoad(ep.afterLoad)
}
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go
index 3040a445b..bfef75da7 100644
--- a/pkg/tcpip/transport/raw/endpoint.go
+++ b/pkg/tcpip/transport/raw/endpoint.go
@@ -70,7 +70,7 @@ type endpoint struct {
associated bool
net network.Endpoint
- stats tcpip.TransportEndpointStats `state:"nosave"`
+ stats tcpip.TransportEndpointStats
ops tcpip.SocketOptions
// The following fields are used to manage the receive queue and are
diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go
index 0de2d2264..0775faa58 100644
--- a/pkg/tcpip/transport/raw/raw_state_autogen.go
+++ b/pkg/tcpip/transport/raw/raw_state_autogen.go
@@ -56,6 +56,7 @@ func (e *endpoint) StateFields() []string {
"waiterQueue",
"associated",
"net",
+ "stats",
"ops",
"rcvList",
"rcvBufSize",
@@ -72,11 +73,12 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(2, &e.waiterQueue)
stateSinkObject.Save(3, &e.associated)
stateSinkObject.Save(4, &e.net)
- stateSinkObject.Save(5, &e.ops)
- stateSinkObject.Save(6, &e.rcvList)
- stateSinkObject.Save(7, &e.rcvBufSize)
- stateSinkObject.Save(8, &e.rcvClosed)
- stateSinkObject.Save(9, &e.frozen)
+ stateSinkObject.Save(5, &e.stats)
+ stateSinkObject.Save(6, &e.ops)
+ stateSinkObject.Save(7, &e.rcvList)
+ stateSinkObject.Save(8, &e.rcvBufSize)
+ stateSinkObject.Save(9, &e.rcvClosed)
+ stateSinkObject.Save(10, &e.frozen)
}
// +checklocksignore
@@ -86,11 +88,12 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(2, &e.waiterQueue)
stateSourceObject.Load(3, &e.associated)
stateSourceObject.Load(4, &e.net)
- stateSourceObject.Load(5, &e.ops)
- stateSourceObject.Load(6, &e.rcvList)
- stateSourceObject.Load(7, &e.rcvBufSize)
- stateSourceObject.Load(8, &e.rcvClosed)
- stateSourceObject.Load(9, &e.frozen)
+ stateSourceObject.Load(5, &e.stats)
+ stateSourceObject.Load(6, &e.ops)
+ stateSourceObject.Load(7, &e.rcvList)
+ stateSourceObject.Load(8, &e.rcvBufSize)
+ stateSourceObject.Load(9, &e.rcvClosed)
+ stateSourceObject.Load(10, &e.frozen)
stateSourceObject.AfterLoad(e.afterLoad)
}
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go
index b355fa7eb..049957b81 100644
--- a/pkg/tcpip/transport/udp/endpoint.go
+++ b/pkg/tcpip/transport/udp/endpoint.go
@@ -60,9 +60,8 @@ type endpoint struct {
waiterQueue *waiter.Queue
uniqueID uint64
net network.Endpoint
- // TODO(b/142022063): Add ability to save and restore per endpoint stats.
- stats tcpip.TransportEndpointStats `state:"nosave"`
- ops tcpip.SocketOptions
+ stats tcpip.TransportEndpointStats
+ ops tcpip.SocketOptions
// The following fields are used to manage the receive queue, and are
// protected by rcvMu.
diff --git a/pkg/tcpip/transport/udp/udp_state_autogen.go b/pkg/tcpip/transport/udp/udp_state_autogen.go
index e25607e3f..3a661e327 100644
--- a/pkg/tcpip/transport/udp/udp_state_autogen.go
+++ b/pkg/tcpip/transport/udp/udp_state_autogen.go
@@ -67,6 +67,7 @@ func (e *endpoint) StateFields() []string {
"waiterQueue",
"uniqueID",
"net",
+ "stats",
"ops",
"rcvReady",
"rcvList",
@@ -91,20 +92,21 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(1, &e.waiterQueue)
stateSinkObject.Save(2, &e.uniqueID)
stateSinkObject.Save(3, &e.net)
- stateSinkObject.Save(4, &e.ops)
- stateSinkObject.Save(5, &e.rcvReady)
- stateSinkObject.Save(6, &e.rcvList)
- stateSinkObject.Save(7, &e.rcvBufSize)
- stateSinkObject.Save(8, &e.rcvClosed)
- stateSinkObject.Save(9, &e.lastError)
- stateSinkObject.Save(10, &e.portFlags)
- stateSinkObject.Save(11, &e.boundBindToDevice)
- stateSinkObject.Save(12, &e.boundPortFlags)
- stateSinkObject.Save(13, &e.readShutdown)
- stateSinkObject.Save(14, &e.effectiveNetProtos)
- stateSinkObject.Save(15, &e.frozen)
- stateSinkObject.Save(16, &e.localPort)
- stateSinkObject.Save(17, &e.remotePort)
+ stateSinkObject.Save(4, &e.stats)
+ stateSinkObject.Save(5, &e.ops)
+ stateSinkObject.Save(6, &e.rcvReady)
+ stateSinkObject.Save(7, &e.rcvList)
+ stateSinkObject.Save(8, &e.rcvBufSize)
+ stateSinkObject.Save(9, &e.rcvClosed)
+ stateSinkObject.Save(10, &e.lastError)
+ stateSinkObject.Save(11, &e.portFlags)
+ stateSinkObject.Save(12, &e.boundBindToDevice)
+ stateSinkObject.Save(13, &e.boundPortFlags)
+ stateSinkObject.Save(14, &e.readShutdown)
+ stateSinkObject.Save(15, &e.effectiveNetProtos)
+ stateSinkObject.Save(16, &e.frozen)
+ stateSinkObject.Save(17, &e.localPort)
+ stateSinkObject.Save(18, &e.remotePort)
}
// +checklocksignore
@@ -113,20 +115,21 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(1, &e.waiterQueue)
stateSourceObject.Load(2, &e.uniqueID)
stateSourceObject.Load(3, &e.net)
- stateSourceObject.Load(4, &e.ops)
- stateSourceObject.Load(5, &e.rcvReady)
- stateSourceObject.Load(6, &e.rcvList)
- stateSourceObject.Load(7, &e.rcvBufSize)
- stateSourceObject.Load(8, &e.rcvClosed)
- stateSourceObject.Load(9, &e.lastError)
- stateSourceObject.Load(10, &e.portFlags)
- stateSourceObject.Load(11, &e.boundBindToDevice)
- stateSourceObject.Load(12, &e.boundPortFlags)
- stateSourceObject.Load(13, &e.readShutdown)
- stateSourceObject.Load(14, &e.effectiveNetProtos)
- stateSourceObject.Load(15, &e.frozen)
- stateSourceObject.Load(16, &e.localPort)
- stateSourceObject.Load(17, &e.remotePort)
+ stateSourceObject.Load(4, &e.stats)
+ stateSourceObject.Load(5, &e.ops)
+ stateSourceObject.Load(6, &e.rcvReady)
+ stateSourceObject.Load(7, &e.rcvList)
+ stateSourceObject.Load(8, &e.rcvBufSize)
+ stateSourceObject.Load(9, &e.rcvClosed)
+ stateSourceObject.Load(10, &e.lastError)
+ stateSourceObject.Load(11, &e.portFlags)
+ stateSourceObject.Load(12, &e.boundBindToDevice)
+ stateSourceObject.Load(13, &e.boundPortFlags)
+ stateSourceObject.Load(14, &e.readShutdown)
+ stateSourceObject.Load(15, &e.effectiveNetProtos)
+ stateSourceObject.Load(16, &e.frozen)
+ stateSourceObject.Load(17, &e.localPort)
+ stateSourceObject.Load(18, &e.remotePort)
stateSourceObject.AfterLoad(e.afterLoad)
}