File: gro_state_autogen.go

package info (click to toggle)
golang-gvisor-gvisor 0.0~20240729.0-4~bpo12%2B2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 21,296 kB
  • sloc: asm: 3,361; ansic: 1,197; cpp: 348; makefile: 92; python: 89; sh: 83
file content (70 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// automatically generated by stateify.

package gro

import (
	"context"

	"gvisor.dev/gvisor/pkg/state"
)

func (l *groPacketList) StateTypeName() string {
	return "pkg/tcpip/stack/gro.groPacketList"
}

func (l *groPacketList) StateFields() []string {
	return []string{
		"head",
		"tail",
	}
}

func (l *groPacketList) beforeSave() {}

// +checklocksignore
func (l *groPacketList) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.head)
	stateSinkObject.Save(1, &l.tail)
}

func (l *groPacketList) afterLoad(context.Context) {}

// +checklocksignore
func (l *groPacketList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.head)
	stateSourceObject.Load(1, &l.tail)
}

func (e *groPacketEntry) StateTypeName() string {
	return "pkg/tcpip/stack/gro.groPacketEntry"
}

func (e *groPacketEntry) StateFields() []string {
	return []string{
		"next",
		"prev",
	}
}

func (e *groPacketEntry) beforeSave() {}

// +checklocksignore
func (e *groPacketEntry) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.next)
	stateSinkObject.Save(1, &e.prev)
}

func (e *groPacketEntry) afterLoad(context.Context) {}

// +checklocksignore
func (e *groPacketEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.next)
	stateSourceObject.Load(1, &e.prev)
}

func init() {
	state.Register((*groPacketList)(nil))
	state.Register((*groPacketEntry)(nil))
}