Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmasi committed May 9, 2024
1 parent 0827b02 commit 38902f1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dataplane/forwarding/fwdport/ports/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type CPUPort struct {
output fwdaction.Actions // Actions used to process transmitted packets
ctx *fwdcontext.Context // Forwarding context containing the port
export []*fwdpb.PacketFieldId // List of fields to export when writing the packet
desc *fwdpb.PortDesc
desc *fwdpb.PortDesc
remote bool
}

Expand Down Expand Up @@ -287,7 +287,7 @@ func (*cpuBuilder) Build(pd *fwdpb.PortDesc, ctx *fwdcontext.Context) (fwdport.P
queueID: cpu.Cpu.GetQueueId(),
export: cpu.Cpu.GetExportFieldIds(),
remote: cpu.Cpu.GetRemotePort(),
desc: pd,
desc: pd,
}
var err error
if l := cpu.Cpu.GetQueueLength(); l != 0 {
Expand Down
2 changes: 1 addition & 1 deletion dataplane/forwarding/fwdport/ports/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type fakePort struct {
port fwdcontext.Port
input fwdaction.Actions
output fwdaction.Actions
desc *fwdpb.PortDesc
desc *fwdpb.PortDesc
ctx *fwdcontext.Context // Forwarding context containing the port
}

Expand Down
4 changes: 2 additions & 2 deletions dataplane/forwarding/fwdport/ports/genetlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type genetlinkPort struct {
fwdobject.Base
input fwdaction.Actions
output fwdaction.Actions
desc *fwdpb.PortDesc
desc *fwdpb.PortDesc
ctx *fwdcontext.Context // Forwarding context containing the port
}

Expand Down Expand Up @@ -119,7 +119,7 @@ type genetlinkBuilder struct{}
// Build creates a new port.
func (genetlinkBuilder) Build(pd *fwdpb.PortDesc, ctx *fwdcontext.Context) (fwdport.Port, error) {
return &genetlinkPort{
ctx: ctx,
ctx: ctx,
desc: pd,
}, nil
}
4 changes: 2 additions & 2 deletions dataplane/forwarding/fwdport/ports/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type portGroup struct {
hashFn func(key []byte) int // function used to hash a set of bytes
hash fwdpb.AggregateHashAlgorithm // hash algorithm used to select the port
packetFn func(packet fwdpacket.Packet) (fwdaction.State, error) // function used to process packets
desc *fwdpb.PortDesc
desc *fwdpb.PortDesc
ctx *fwdcontext.Context
// list of members used to hash for packets. If a member has two instances
// in the group, it appears twice in this array.
Expand Down Expand Up @@ -445,7 +445,7 @@ func (groupBuilder) Build(pd *fwdpb.PortDesc, ctx *fwdcontext.Context) (fwdport.
p := portGroup{
ctx: ctx,
memberMap: make(map[fwdobject.ID]*member),
desc: pd,
desc: pd,
}

// Store counters for all ports and actions.
Expand Down
4 changes: 2 additions & 2 deletions dataplane/forwarding/fwdport/ports/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type kernelPort struct {
devName string
input fwdaction.Actions
output fwdaction.Actions
desc *fwdpb.Desc
desc *fwdpb.Desc
ctx *fwdcontext.Context // Forwarding context containing the port
handle packetHandle
doneCh chan struct{}
Expand Down Expand Up @@ -202,7 +202,7 @@ func (kernelBuilder) Build(portDesc *fwdpb.PortDesc, ctx *fwdcontext.Context) (f
ctx: ctx,
handle: handle,
devName: kp.Kernel.DeviceName,
desc: portDesc,
desc: portDesc,
doneCh: make(chan struct{}),
linkUpdateCh: make(chan netlink.LinkUpdate),
}
Expand Down
4 changes: 2 additions & 2 deletions dataplane/forwarding/fwdport/ports/tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type tapPort struct {
fwdobject.Base
input fwdaction.Actions
output fwdaction.Actions
desc *fwdpb.PortDesc
desc *fwdpb.PortDesc
ctx *fwdcontext.Context // Forwarding context containing the port
fd int
devName string
Expand Down Expand Up @@ -283,7 +283,7 @@ func (tp tapBuilder) Build(portDesc *fwdpb.PortDesc, ctx *fwdcontext.Context) (f
file: file,
fd: fd,
devName: kp.Tap.GetDeviceName(),
desc: portDesc,
desc: portDesc,
doneCh: make(chan struct{}),
linkUpdateCh: make(chan netlink.LinkUpdate),
}
Expand Down
2 changes: 1 addition & 1 deletion dataplane/forwarding/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func PortInfo(ctx *fwdcontext.Context, arg interface{}) (*fwdpb.PortElementInfo,
for _, c := range port.Counters() {
counters = append(counters, &fwdpb.Counter{Id: c.ID, Value: c.Value})
}
return &fwdpb.PortElementInfo{Desc: [port.Desc(), Counters: counters}, nil
return &fwdpb.PortElementInfo{Desc: port.Desc(), Counters: counters}, nil
}

// TableInfo returns the details of the specified Table as a string.
Expand Down

0 comments on commit 38902f1

Please sign in to comment.