Skip to content

Commit

Permalink
Merge pull request #2225 from neiljerram/fix-spell
Browse files Browse the repository at this point in the history
Fix misspellings reported by goreport
  • Loading branch information
Neil Jerram authored Mar 3, 2020
2 parents 9de8f5a + ac15a32 commit 9125496
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bpf/asm/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (b *Block) LoadImm64(dst Reg, imm int64) {

// LoadMapFD special variant of LoadImm64 for loading map FDs.
func (b *Block) LoadMapFD(dst Reg, fd uint32) {
// Have to use LoadImm64 with the special psuedo-register even though FDs are only 32 bits.
// Have to use LoadImm64 with the special pseudo-register even though FDs are only 32 bits.
b.add(LoadImm64, dst, RPseudoMapFD, 0, int32(fd))
b.add(LoadImm64Pt2, 0, 0, 0, 0)
}
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ func hexToCIDRMapValue(hexStrings []string) (uint32, error) {
}

// cidrMapValueToHex takes a ref count as unsigned 32 bit number and
// turns it into an array of hex strings, whic bpftool can understand.
// turns it into an array of hex strings, which bpftool can understand.
func cidrMapValueToHex(refCount uint32) []string {
refCountBytes := make([]byte, 4)
nativeEndian.PutUint32(refCountBytes, refCount)
Expand Down
2 changes: 1 addition & 1 deletion bpf/nat/maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ func NewAffinityValue(ts uint64, backend BackendValue) AffinityValue {

// Timestamp returns the timestamp of the entry. It is generated by
// bpf_ktime_get_ns which returns the time since the system boot in nanoseconds
// - it is the monotonic clock reading, whic is compatible with time operations
// - it is the monotonic clock reading, which is compatible with time operations
// in time package.
func (v AffinityValue) Timestamp() time.Duration {
nano := binary.LittleEndian.Uint64(v[backendValueSize : backendValueSize+8])
Expand Down
2 changes: 1 addition & 1 deletion bpf/proxy/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (s *Syncer) applyDerived(sname k8sp.ServicePortName, t svcType, sinfo k8sp.

svc, ok := s.newSvcMap[getSvcKey(sname, "")]
if !ok {
// this should not happend
// this should not happen
return errors.Errorf("no ClusterIP for derived service type %d", t)
}

Expand Down
4 changes: 2 additions & 2 deletions dataplane/linux/vxlan_mgr.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved.
// Copyright (c) 2016-2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -425,7 +425,7 @@ func (m *vxlanManager) configureVXLANDevice(mtu int, localVTEP *proto.VXLANTunne
// already. Check for mismatched configuration. If they don't match, recreate the device.
if incompat := vxlanLinksIncompat(vxlan, link); incompat != "" {
// Existing device doesn't match desired configuration - delete it and recreate.
logrus.Warningf("%q exists with incompatable configuration: %v; recreating device", vxlan.Name, incompat)
logrus.Warningf("%q exists with incompatible configuration: %v; recreating device", vxlan.Name, incompat)
if err = m.nlHandle.LinkDel(link); err != nil {
return fmt.Errorf("failed to delete interface: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion fv/bpf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ func describeBPFTests(opts ...bpfTestOpt) bool {
nodePortsTest(false)
})

// FIXME connect time shares the same NAT table and it is a loterry whic one is gets
// FIXME connect time shares the same NAT table and it is a lottery which one is gets
if !testOpts.connTimeEnabled {
Context("with test-service being a nodeport @ "+strconv.Itoa(int(npPort))+
" ExternalTrafficPolicy=local", func() {
Expand Down
4 changes: 2 additions & 2 deletions fv/policysync_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build fvtests

// Copyright (c) 2019 Tigera, Inc. All rights reserved.
// Copyright (c) 2019-2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -295,7 +295,7 @@ var _ = Context("_POL-SYNC_ _BPF-SAFE_ policy sync API tests", func() {
doChurn := func(wlIndexes ...int) {
for i := 0; i < 100; i++ {
wlIdx := wlIndexes[i%len(wlIndexes)]
By(fmt.Sprintf("Churn %d; targetting workload %d", i, wlIdx))
By(fmt.Sprintf("Churn %d; targeting workload %d", i, wlIdx))

policy := api.NewGlobalNetworkPolicy()
policy.SetName("policy-0")
Expand Down
2 changes: 1 addition & 1 deletion k8sfv/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ push gateway - run in a GKE container cluster, "k8sfv", in the

- Create a GKE container cluster with 2 nodes. Follow the web UI
instructions to get credentials so you can run `kubectl` on your own
machine, targetting that cluster.
machine, targeting that cluster.

- Run `kubectl apply -f monitoring.yaml` repeatedly, with intervening
pauses, until it completely succeeds (where `monitoring.yaml` is in
Expand Down
4 changes: 2 additions & 2 deletions rules/policy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2018 Tigera, Inc. All rights reserved.
// Copyright (c) 2016-2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -136,7 +136,7 @@ func (r *DefaultRuleRenderer) ProtoRuleToIptablesRules(pRule *proto.Rule, ipVers
// positive matches on dest address
// negated matches on source address
// negated matches on dest address
// rule containing rest of match critera
// rule containing rest of match criteria
//
// We use one match bit to record whether all the blocks accept the packet and one as a
// scratch bit for each block to use. As an invariant, at the end of each block, the
Expand Down

0 comments on commit 9125496

Please sign in to comment.