Merge pull request #10363 from avagin:typos

PiperOrigin-RevId: 630148721
This commit is contained in:
gVisor bot
2024-05-02 12:48:23 -07:00
15 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ type Registers struct {
}
const (
// SyscallWidth is the width of insturctions.
// SyscallWidth is the width of instructions.
SyscallWidth = 4
)
+1 -1
View File
@@ -38,7 +38,7 @@ type Registers struct {
// System-related constants for x86.
const (
// SyscallWidth is the width of syscall, sysenter, and int 80 insturctions.
// SyscallWidth is the width of syscall, sysenter, and int 80 instructions.
SyscallWidth = 2
)
+3 -3
View File
@@ -32,7 +32,7 @@ import (
const (
// VFIO_MINOR is the VFIO minor number from include/linux/miscdevice.h.
VFIO_MINOR = 196
// VFIOPath is the path to a VFIO device, it is ususally used to
// VFIOPath is the path to a VFIO device, it is usually used to
// construct a VFIO container.
VFIOPath = "/dev/vfio/vfio"
@@ -49,7 +49,7 @@ type tpuDevice struct {
minor uint32
}
// Open implememnts vfs.Device.Open.
// Open implements vfs.Device.Open.
func (dev *tpuDevice) Open(ctx context.Context, mnt *vfs.Mount, d *vfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) {
devClient := devutil.GoferClientFromContext(ctx)
if devClient == nil {
@@ -133,7 +133,7 @@ func RegisterTPUDevice(vfsObj *vfs.VirtualFilesystem, minor uint32) error {
})
}
// RegisterVfioDevice registers VFIO devices that are implemented by this pacakge in vfsObj.
// RegisterVfioDevice registers VFIO devices that are implemented by this package in vfsObj.
func RegisterVfioDevice(vfsObj *vfs.VirtualFilesystem) error {
return vfsObj.RegisterDevice(vfs.CharDevice, linux.MISC_MAJOR, VFIO_MINOR, &vfioDevice{}, &vfs.RegisterDeviceOptions{
GroupName: vfioDeviceGroupName,
+1 -1
View File
@@ -15,7 +15,7 @@
#include "textflag.h"
// GetCPU makes the getcpu(unsigned *cpu, unsigned *node, NULL) syscall for
// the lack of an optimazed way of getting the current CPU number on arm64.
// the lack of an optimized way of getting the current CPU number on arm64.
// func GetCPU() uint32
TEXT ·GetCPU(SB), NOSPLIT, $0-4
+1 -1
View File
@@ -18,5 +18,5 @@ type contextID int
// CtxIPCNamespace is the context.Value key used to retrieve an IPC namespace.
// We define it here because it's needed in several packages, and is not
// possible to use otherwise without causing a circular depenedency.
// possible to use otherwise without causing a circular dependency.
const CtxIPCNamespace contextID = iota
@@ -32,7 +32,7 @@ func fpsimdPtr(addr *byte) *arch.FpsimdContext {
return (*arch.FpsimdContext)(unsafe.Pointer(addr))
}
// dieArchSetup initialies the state for dieTrampoline.
// dieArchSetup initializes the state for dieTrampoline.
//
// The arm64 dieTrampoline requires the vCPU to be set in R1, and the last PC
// to be in R0. The trampoline then simulates a call to dieHandler from the
+1 -1
View File
@@ -287,7 +287,7 @@ func (p *Protocol) dumpAddrs(ctx context.Context, msg *nlmsg.Message, ms *nlmsg.
}
// commonPrefixLen reports the length of the longest IP address prefix.
// This is a simplied version from Golang's src/net/addrselect.go.
// This is a simplified version from Golang's src/net/addrselect.go.
func commonPrefixLen(a, b []byte) (cpl int) {
for len(a) > 0 {
if a[0] == b[0] {
+1 -1
View File
@@ -160,7 +160,7 @@ func TestErrorCorrection(t *testing.T) {
t.Errorf("Discontinuous time; ComputeTime(%v) got %v want %v", tc.samples[2].after, newProjected, projected)
}
// As the reference clock stablizes, ensure that the clock error
// As the reference clock stabilizes, ensure that the clock error
// decreases.
initialErr := c.errorNS
t.Logf("initial error: %v ns", initialErr)
+1 -1
View File
@@ -571,7 +571,7 @@ func IsV4LoopbackAddress(addr tcpip.Address) bool {
// ========================= Options ==========================
// An IPv4OptionType can hold the valuse for the Type in an IPv4 option.
// An IPv4OptionType can hold the value for the Type in an IPv4 option.
type IPv4OptionType byte
// These constants are needed to identify individual options in the option list.
+2 -2
View File
@@ -492,7 +492,7 @@ func TestLotsOfReceptions(t *testing.T) {
}
func TestRxEnableNotification(t *testing.T) {
// Check that enabling nofifications results in properly updated state.
// Check that enabling notifications results in properly updated state.
pb1 := make([]byte, 100)
pb2 := make([]byte, 100)
@@ -507,7 +507,7 @@ func TestRxEnableNotification(t *testing.T) {
}
func TestRxDisableNotification(t *testing.T) {
// Check that disabling nofifications results in properly updated state.
// Check that disabling notifications results in properly updated state.
pb1 := make([]byte, 100)
pb2 := make([]byte, 100)
+1 -1
View File
@@ -729,7 +729,7 @@ func TestReceiveIPv6ExtHdrs(t *testing.T) {
pointer: header.IPv6FixedHeaderSize + 8,
},
{
name: "destination with unknown option discard and send icmp action (muilticast)",
name: "destination with unknown option discard and send icmp action (multicast)",
extHdr: func(nextHdr uint8) ([]byte, uint8) {
return []byte{
nextHdr, 1,
+4 -4
View File
@@ -3532,7 +3532,7 @@ func TestAutoGenAddrDeprecateFromPI(t *testing.T) {
}
expectPrimaryAddr(addr1)
// Deprecate addr for prefix1 immedaitely.
// Deprecate addr for prefix1 immediately.
e.InjectInbound(header.IPv6ProtocolNumber, raBufWithPI(llAddr2, 0, prefix1, true, true, 100, 0))
expectAutoGenAddrEvent(t, ndpDisp, addr1, deprecatedAddr)
if !containsV6Addr(s.NICInfo()[nicID].ProtocolAddresses, addr1) {
@@ -3560,7 +3560,7 @@ func TestAutoGenAddrDeprecateFromPI(t *testing.T) {
}
expectPrimaryAddr(addr2)
// Deprecate addr for prefix2 immedaitely.
// Deprecate addr for prefix2 immediately.
e.InjectInbound(header.IPv6ProtocolNumber, raBufWithPI(llAddr2, 0, prefix2, true, true, 100, 0))
expectAutoGenAddrEvent(t, ndpDisp, addr2, deprecatedAddr)
if !containsV6Addr(s.NICInfo()[nicID].ProtocolAddresses, addr2) {
@@ -5969,7 +5969,7 @@ func TestStopStartSolicitingRouters(t *testing.T) {
},
// Tests that when a NIC is removed, router solicitations are stopped. We
// cannot start router solications on a removed NIC.
// cannot start router solicitations on a removed NIC.
{
name: "Remove NIC",
stopFn: func(t *testing.T, s *stack.Stack, first bool) {
@@ -6046,7 +6046,7 @@ func TestStopStartSolicitingRouters(t *testing.T) {
t.Fatal("unexpectedly got a packet after router solicitation has been stopepd")
}
// If test.startFn is nil, there is no way to restart router solications.
// If test.startFn is nil, there is no way to restart router solicitations.
if test.startFn == nil {
return
}
+1 -1
View File
@@ -7229,7 +7229,7 @@ func TestReceiveBufferAutoTuningApplicationLimited(t *testing.T) {
}
// Verify that we receive a non-zero window update ACK. When running
// under thread santizer this test can end up sending more than 1
// under thread sanitizer this test can end up sending more than 1
// ack, 1 for the non-zero window
p := c.GetPacket()
defer p.Release()
+1 -1
View File
@@ -39,7 +39,7 @@ type UMEM struct {
// sockfd is the underlying AF_XDP socket.
sockfd uint32
// frameMask masks the lower bits of an adderess to get the frame's
// frameMask masks the lower bits of an address to get the frame's
// address.
frameMask uint64
+1 -1
View File
@@ -26,7 +26,7 @@
// with an incoming packet. The packet is filled by the kernel, which
// places a descriptor to the same UMEM area in the RX queue, signifying
// that userspace may read the packet.
// - Trasmit: Userspace adds a descriptor to TX queue. The kernel
// - Transmit: Userspace adds a descriptor to TX queue. The kernel
// sends the packet (stored in UMEM) pointed to by the descriptor.
// Upon completion, the kernel places a descriptor in the completion
// queue to notify userspace that the packet is sent and the UMEM