Mark structs as savable in netstack.

PiperOrigin-RevId: 661475603
This commit is contained in:
Nayana Bidari
2024-08-09 18:26:06 -07:00
committed by gVisor bot
parent 876de08e59
commit 979bbf238b
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -25,10 +25,11 @@ import (
var _ stack.LinkEndpoint = (*Endpoint)(nil)
var _ stack.GSOEndpoint = (*Endpoint)(nil)
// +stateify savable
type veth struct {
mu sync.RWMutex
mu sync.RWMutex `state:"nosave"`
closed bool
backlogQueue chan vethPacket
backlogQueue chan vethPacket `state:"nosave"`
mtu uint32
endpoints [2]Endpoint
}
@@ -80,7 +81,7 @@ type Endpoint struct {
// +checklocks:mu
linkAddr tcpip.LinkAddress
// +checklocks:mu
onCloseAction func()
onCloseAction func() `state:"nosave"`
}
// NewPair creates a new veth pair.
+1 -1
View File
@@ -103,7 +103,7 @@ func makeNICStats(global tcpip.NICStats) sharedStats {
// +stateify savable
type packetEndpointList struct {
mu packetEndpointListRWMutex
mu packetEndpointListRWMutex `state:"nosave"`
// eps is protected by mu, but the contained PacketEndpoint values are not.
//