Skip to content

Commit 979bbf2

Browse files
nybidarigvisor-bot
authored andcommitted
Mark structs as savable in netstack.
PiperOrigin-RevId: 661475603
1 parent 876de08 commit 979bbf2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pkg/tcpip/link/veth/veth.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ import (
2525
var _ stack.LinkEndpoint = (*Endpoint)(nil)
2626
var _ stack.GSOEndpoint = (*Endpoint)(nil)
2727

28+
// +stateify savable
2829
type veth struct {
29-
mu sync.RWMutex
30+
mu sync.RWMutex `state:"nosave"`
3031
closed bool
31-
backlogQueue chan vethPacket
32+
backlogQueue chan vethPacket `state:"nosave"`
3233
mtu uint32
3334
endpoints [2]Endpoint
3435
}
@@ -80,7 +81,7 @@ type Endpoint struct {
8081
// +checklocks:mu
8182
linkAddr tcpip.LinkAddress
8283
// +checklocks:mu
83-
onCloseAction func()
84+
onCloseAction func() `state:"nosave"`
8485
}
8586

8687
// NewPair creates a new veth pair.

pkg/tcpip/stack/nic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func makeNICStats(global tcpip.NICStats) sharedStats {
103103

104104
// +stateify savable
105105
type packetEndpointList struct {
106-
mu packetEndpointListRWMutex
106+
mu packetEndpointListRWMutex `state:"nosave"`
107107

108108
// eps is protected by mu, but the contained PacketEndpoint values are not.
109109
//

0 commit comments

Comments
 (0)