diff --git a/dataplane/forwarding/fwdport/ports/cpu.go b/dataplane/forwarding/fwdport/ports/cpu.go index 9327ba54..89879b9b 100644 --- a/dataplane/forwarding/fwdport/ports/cpu.go +++ b/dataplane/forwarding/fwdport/ports/cpu.go @@ -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 } @@ -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 { diff --git a/dataplane/forwarding/fwdport/ports/fake.go b/dataplane/forwarding/fwdport/ports/fake.go index 014c9d32..7321062d 100644 --- a/dataplane/forwarding/fwdport/ports/fake.go +++ b/dataplane/forwarding/fwdport/ports/fake.go @@ -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 } diff --git a/dataplane/forwarding/fwdport/ports/genetlink.go b/dataplane/forwarding/fwdport/ports/genetlink.go index 2593527d..3669beaf 100644 --- a/dataplane/forwarding/fwdport/ports/genetlink.go +++ b/dataplane/forwarding/fwdport/ports/genetlink.go @@ -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 } @@ -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 } diff --git a/dataplane/forwarding/fwdport/ports/group.go b/dataplane/forwarding/fwdport/ports/group.go index 602a6765..6999724a 100644 --- a/dataplane/forwarding/fwdport/ports/group.go +++ b/dataplane/forwarding/fwdport/ports/group.go @@ -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. @@ -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. diff --git a/dataplane/forwarding/fwdport/ports/kernel.go b/dataplane/forwarding/fwdport/ports/kernel.go index 366a8229..66d1c204 100644 --- a/dataplane/forwarding/fwdport/ports/kernel.go +++ b/dataplane/forwarding/fwdport/ports/kernel.go @@ -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{} @@ -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), } diff --git a/dataplane/forwarding/fwdport/ports/tap.go b/dataplane/forwarding/fwdport/ports/tap.go index ac7a3675..6e457e38 100644 --- a/dataplane/forwarding/fwdport/ports/tap.go +++ b/dataplane/forwarding/fwdport/ports/tap.go @@ -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 @@ -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), } diff --git a/dataplane/forwarding/info.go b/dataplane/forwarding/info.go index d1d36f09..dc19225b 100644 --- a/dataplane/forwarding/info.go +++ b/dataplane/forwarding/info.go @@ -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.