Skip to content

Commit 5016f0c

Browse files
cfergeauopenshift-merge-robot
authored andcommitted
go.mod: Update gvisor-tap-vsock to 0.5.0
1 parent c179f73 commit 5016f0c

File tree

134 files changed

+5319
-2045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5319
-2045
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
1212
github.com/cavaliergopher/grab/v3 v3.0.1
1313
github.com/cheggaaa/pb/v3 v3.1.0
14-
github.com/containers/gvisor-tap-vsock v0.4.1-0.20220908123107-8d91f6d62de2
14+
github.com/containers/gvisor-tap-vsock v0.5.0
1515
github.com/containers/image/v5 v5.24.1
1616
github.com/coreos/go-systemd/v22 v22.5.0
1717
github.com/crc-org/admin-helper v0.0.12-0.20221012143549-fd5acd1c478e
@@ -197,7 +197,7 @@ require (
197197
gopkg.in/ini.v1 v1.67.0 // indirect
198198
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
199199
gopkg.in/yaml.v3 v3.0.1 // indirect
200-
gvisor.dev/gvisor v0.0.0-20220908032458-edc830a43ba6 // indirect
200+
gvisor.dev/gvisor v0.0.0-20221216231429-a78e892a26d2 // indirect
201201
inet.af/tcpproxy v0.0.0-20220326234310-be3ee21c9fa0 // indirect
202202
k8s.io/klog/v2 v2.80.1 // indirect
203203
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect

go.sum

Lines changed: 5 additions & 222 deletions
Large diffs are not rendered by default.

vendor/github.com/containers/gvisor-tap-vsock/pkg/sshclient/ssh_forwarder.go

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containers/gvisor-tap-vsock/pkg/tap/link.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containers/gvisor-tap-vsock/pkg/tap/switch.go

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containers/gvisor-tap-vsock/pkg/transport/listen_windows.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gvisor.dev/gvisor/pkg/atomicbitops/atomicbitops_state_autogen.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,36 @@
66
// +build !arm64
77

88
package atomicbitops
9+
10+
import (
11+
"gvisor.dev/gvisor/pkg/state"
12+
)
13+
14+
func (b *Bool) StateTypeName() string {
15+
return "pkg/atomicbitops.Bool"
16+
}
17+
18+
func (b *Bool) StateFields() []string {
19+
return []string{
20+
"Uint32",
21+
}
22+
}
23+
24+
func (b *Bool) beforeSave() {}
25+
26+
// +checklocksignore
27+
func (b *Bool) StateSave(stateSinkObject state.Sink) {
28+
b.beforeSave()
29+
stateSinkObject.Save(0, &b.Uint32)
30+
}
31+
32+
func (b *Bool) afterLoad() {}
33+
34+
// +checklocksignore
35+
func (b *Bool) StateLoad(stateSourceObject state.Source) {
36+
stateSourceObject.Load(0, &b.Uint32)
37+
}
38+
39+
func init() {
40+
state.Register((*Bool)(nil))
41+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright 2022 The gVisor Authors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package atomicbitops
16+
17+
import "sync/atomic"
18+
19+
// Bool is an atomic Boolean.
20+
//
21+
// It is implemented by a Uint32, with value 0 indicating false, and 1
22+
// indicating true.
23+
//
24+
// +stateify savable
25+
type Bool struct {
26+
Uint32
27+
}
28+
29+
// FromBool returns an Bool initialized to value val.
30+
//
31+
//go:nosplit
32+
func FromBool(val bool) Bool {
33+
var u uint32
34+
if val {
35+
u = 1
36+
}
37+
return Bool{
38+
Uint32{
39+
value: u,
40+
},
41+
}
42+
}
43+
44+
// Load is analogous to atomic.LoadBool, if such a thing existed.
45+
//
46+
//go:nosplit
47+
func (b *Bool) Load() bool {
48+
return atomic.LoadUint32(&b.value) == 1
49+
}
50+
51+
// Store is analogous to atomic.StoreBool, if such a thing existed.
52+
//
53+
//go:nosplit
54+
func (b *Bool) Store(val bool) {
55+
var u uint32
56+
if val {
57+
u = 1
58+
}
59+
atomic.StoreUint32(&b.value, u)
60+
}
61+
62+
// Swap is analogous to atomic.SwapBool, if such a thing existed.
63+
//
64+
//go:nosplit
65+
func (b *Bool) Swap(val bool) bool {
66+
var u uint32
67+
if val {
68+
u = 1
69+
}
70+
return atomic.SwapUint32(&b.value, u) == 1
71+
}

vendor/gvisor.dev/gvisor/pkg/bufferv2/buffer.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ package bufferv2
2020
import (
2121
"fmt"
2222
"io"
23+
24+
"gvisor.dev/gvisor/pkg/tcpip/checksum"
2325
)
2426

2527
// Buffer is a non-linear buffer.
@@ -443,6 +445,24 @@ func (b *Buffer) SubApply(offset, length int, fn func(*View)) {
443445
}
444446
}
445447

448+
// Checksum calculates a checksum over the buffer's payload starting at offset.
449+
func (b *Buffer) Checksum(offset int) uint16 {
450+
if offset >= int(b.size) {
451+
return 0
452+
}
453+
var v *View
454+
for v = b.data.Front(); v != nil && offset >= v.Size(); v = v.Next() {
455+
offset -= v.Size()
456+
}
457+
458+
var cs checksum.Checksumer
459+
cs.Add(v.AsSlice()[offset:])
460+
for v = v.Next(); v != nil; v = v.Next() {
461+
cs.Add(v.AsSlice())
462+
}
463+
return cs.Checksum()
464+
}
465+
446466
// Merge merges the provided Buffer with this one.
447467
//
448468
// The other Buffer will be appended to v, and other will be empty after this

vendor/gvisor.dev/gvisor/pkg/bufferv2/bufferv2_state_autogen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (b *Buffer) afterLoad() {}
3333
// +checklocksignore
3434
func (b *Buffer) StateLoad(stateSourceObject state.Source) {
3535
stateSourceObject.Load(1, &b.size)
36-
stateSourceObject.LoadValue(0, new([]byte), func(y interface{}) { b.loadData(y.([]byte)) })
36+
stateSourceObject.LoadValue(0, new([]byte), func(y any) { b.loadData(y.([]byte)) })
3737
}
3838

3939
func (c *chunk) StateTypeName() string {

0 commit comments

Comments
 (0)