Change goloxi dependency to opencord/goloxi.

Remove explicit length calculation.

Change-Id: Ie3c7643ed0d1e076e85f050d2b3e354b77b9eb0f
diff --git a/go.mod b/go.mod
index 37db7dc..44c2ac3 100644
--- a/go.mod
+++ b/go.mod
@@ -3,8 +3,8 @@
 go 1.13
 
 require (
-	github.com/donNewtonAlpha/goloxi v1.0.0
 	github.com/golang/protobuf v1.3.2
+	github.com/opencord/goloxi v1.0.1
 	github.com/opencord/voltha-lib-go/v3 v3.1.5
 	github.com/opencord/voltha-protos/v3 v3.3.0
 	github.com/stretchr/testify v1.4.0
diff --git a/go.sum b/go.sum
index 062ffc7..77e52b4 100644
--- a/go.sum
+++ b/go.sum
@@ -46,8 +46,6 @@
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/donNewtonAlpha/goloxi v1.0.0 h1:aMRErR0P1PXN0JqfWwhjn33gD/NS5YB7bHi/ydsC36I=
-github.com/donNewtonAlpha/goloxi v1.0.0/go.mod h1:mf2669Q9OEthwDwxdgO6fmRVZhM/3F+hhlvkFD7V/JI=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
 github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
@@ -198,6 +196,8 @@
 github.com/opencord/voltha-lib-go/v3 v3.1.5/go.mod h1:ad7C/5/09RcYvGQrxUH4AuOiO8OSQqGmCgEJNEpaag8=
 github.com/opencord/voltha-protos/v3 v3.3.0 h1:1Q1C6nWSkjaJY87GQgc7hWU6kqjkWdM+rzqSXBKb0cQ=
 github.com/opencord/voltha-protos/v3 v3.3.0/go.mod h1:nl1ETp5Iw3avxOaKD8BJlYY5wYI4KeV95aT1pL63nto=
+github.com/opencord/goloxi v1.0.1 h1:QCOZUqgNLi72ylaIPWSLvSvGVDB2FHyatIkAePXr+Dk=
+github.com/opencord/goloxi v1.0.1/go.mod h1:A5U6uO6EaPuQkB5N1RjIV66tYgsKejiGTsEZrU/c19A=
 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
 github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
 github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
diff --git a/internal/pkg/ofagent/changeEvent.go b/internal/pkg/ofagent/changeEvent.go
index fdf99e1..b114d36 100644
--- a/internal/pkg/ofagent/changeEvent.go
+++ b/internal/pkg/ofagent/changeEvent.go
@@ -21,8 +21,8 @@
 	"encoding/json"
 	"net"
 
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
 	"github.com/golang/protobuf/ptypes/empty"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"google.golang.org/grpc"
diff --git a/internal/pkg/ofagent/packetIn.go b/internal/pkg/ofagent/packetIn.go
index 685ab43..3744307 100644
--- a/internal/pkg/ofagent/packetIn.go
+++ b/internal/pkg/ofagent/packetIn.go
@@ -20,9 +20,9 @@
 	"context"
 	"encoding/json"
 
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
 	"github.com/golang/protobuf/ptypes/empty"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
@@ -81,7 +81,7 @@
 
 			if logger.V(log.DebugLevel) {
 				js, _ := json.Marshal(packetIn)
-				logger.Debugw("packet-in recieved", log.Fields{"packet-in": js})
+				logger.Debugw("packet-in received", log.Fields{"packet-in": js})
 			}
 			deviceID := packet.GetId()
 			ofPacketIn := ofp.NewPacketIn()
@@ -93,53 +93,40 @@
 			match := ofp.NewMatchV3()
 			inMatch := packetIn.GetMatch()
 			match.SetType(uint16(inMatch.GetType()))
-			//oxFields := inMatch.GetOxmFields()
 			var fields []goloxi.IOxm
-			size := uint16(4)
 			for _, oxmField := range inMatch.GetOxmFields() {
-				/*
-					for i := 0; i < len(oxFields); i++ {
-						oxmField := oxFields[i]
-				*/
 				field := oxmField.GetField()
 				ofbField := field.(*openflow_13.OfpOxmField_OfbField).OfbField
-				size += 4 //header for oxm
 				switch ofbField.Type {
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT:
 					ofpInPort := ofp.NewOxmInPort()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_Port)
 					ofpInPort.Value = ofp.Port(val.Port)
-					size += 4
 					fields = append(fields, ofpInPort)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE:
 					ofpEthType := ofp.NewOxmEthType()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_EthType)
 					ofpEthType.Value = ofp.EthernetType(val.EthType)
-					size += 2
 					fields = append(fields, ofpEthType)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT:
 					ofpInPhyPort := ofp.NewOxmInPhyPort()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_PhysicalPort)
 					ofpInPhyPort.Value = ofp.Port(val.PhysicalPort)
-					size += 4
 					fields = append(fields, ofpInPhyPort)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO:
 					ofpIpProto := ofp.NewOxmIpProto()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_IpProto)
 					ofpIpProto.Value = ofp.IpPrototype(val.IpProto)
-					size += 1
 					fields = append(fields, ofpIpProto)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC:
 					ofpUdpSrc := ofp.NewOxmUdpSrc()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_UdpSrc)
 					ofpUdpSrc.Value = uint16(val.UdpSrc)
-					size += 2
 					fields = append(fields, ofpUdpSrc)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST:
 					ofpUdpDst := ofp.NewOxmUdpDst()
 					val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_UdpDst)
 					ofpUdpDst.Value = uint16(val.UdpDst)
-					size += 2
 					fields = append(fields, ofpUdpDst)
 				case voltha.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID:
 					ofpVlanVid := ofp.NewOxmVlanVid()
@@ -147,7 +134,6 @@
 					if val != nil {
 						vlanId := val.(*openflow_13.OfpOxmOfbField_VlanVid)
 						ofpVlanVid.Value = uint16(vlanId.VlanVid) + 0x1000
-						size += 2
 					} else {
 						ofpVlanVid.Value = uint16(0)
 					}
@@ -158,14 +144,12 @@
 						log.Fields{"field": ofbField.Type})
 				}
 			}
-			match.SetLength(size)
 
 			match.SetOxmList(fields)
 
 			ofPacketIn.SetMatch(*match)
 			ofPacketIn.SetReason(uint8(packetIn.GetReason()))
 			ofPacketIn.SetTableId(uint8(packetIn.GetTableId()))
-			ofPacketIn.SetTotalLen(uint16(len(ofPacketIn.GetData())))
 			ofc := ofa.getOFClient(deviceID)
 			if err := ofc.SendMessage(ofPacketIn); err != nil {
 				logger.Errorw("send-message-failed", log.Fields{
diff --git a/internal/pkg/openflow/barrier.go b/internal/pkg/openflow/barrier.go
index 4775d2c..deba220 100644
--- a/internal/pkg/openflow/barrier.go
+++ b/internal/pkg/openflow/barrier.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/client.go b/internal/pkg/openflow/client.go
index 3f48e0c..5b44fa4 100644
--- a/internal/pkg/openflow/client.go
+++ b/internal/pkg/openflow/client.go
@@ -22,7 +22,7 @@
 	"sync"
 	"time"
 
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
diff --git a/internal/pkg/openflow/connection.go b/internal/pkg/openflow/connection.go
index af388b2..209990d 100644
--- a/internal/pkg/openflow/connection.go
+++ b/internal/pkg/openflow/connection.go
@@ -25,8 +25,8 @@
 	"net"
 	"time"
 
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
@@ -240,11 +240,20 @@
 			// Read 8 bytes, the standard OF header
 			read, err := io.ReadFull(fromController, headerBuf)
 			if err != nil {
-				logger.Errorw("bad-of-header",
-					log.Fields{
-						"byte-count": read,
-						"device-id":  ofc.DeviceID,
-						"error":      err})
+				if err == io.EOF {
+					logger.Infow("controller-disconnected",
+						log.Fields{
+							"device-id":  ofc.DeviceID,
+							"controller": ofc.OFControllerEndPoint,
+						})
+				} else {
+					logger.Errorw("bad-of-header",
+						log.Fields{
+							"byte-count": read,
+							"device-id":  ofc.DeviceID,
+							"controller": ofc.OFControllerEndPoint,
+							"error":      err})
+				}
 				break top
 			}
 
diff --git a/internal/pkg/openflow/echo.go b/internal/pkg/openflow/echo.go
index 7358a0f..3b1f774 100644
--- a/internal/pkg/openflow/echo.go
+++ b/internal/pkg/openflow/echo.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/error.go b/internal/pkg/openflow/error.go
index 0472ad8..d7b4e43 100644
--- a/internal/pkg/openflow/error.go
+++ b/internal/pkg/openflow/error.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/feature.go b/internal/pkg/openflow/feature.go
index 99da50c..d897958 100644
--- a/internal/pkg/openflow/feature.go
+++ b/internal/pkg/openflow/feature.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/common"
 )
diff --git a/internal/pkg/openflow/flowMod.go b/internal/pkg/openflow/flowMod.go
index 08c0b98..bd8ea4a 100644
--- a/internal/pkg/openflow/flowMod.go
+++ b/internal/pkg/openflow/flowMod.go
@@ -20,9 +20,7 @@
 	"context"
 	"encoding/binary"
 	"encoding/json"
-	"unsafe"
-
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
@@ -261,7 +259,6 @@
 		binary.BigEndian.PutUint64(cookie, flowAdd.Cookie)
 		bs = append(bs, cookie...)
 		message.SetData(bs)
-		message.Length = uint16(unsafe.Sizeof(*message))
 		err := ofc.SendMessage(message)
 		if err != nil {
 			logger.Errorw("Error reporting failure of FlowUpdate to controller",
diff --git a/internal/pkg/openflow/getConfig.go b/internal/pkg/openflow/getConfig.go
index 6425246..26f9f89 100644
--- a/internal/pkg/openflow/getConfig.go
+++ b/internal/pkg/openflow/getConfig.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/group.go b/internal/pkg/openflow/group.go
index a1e09c7..b9d107b 100644
--- a/internal/pkg/openflow/group.go
+++ b/internal/pkg/openflow/group.go
@@ -18,8 +18,8 @@
 
 import (
 	"context"
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
@@ -125,11 +125,8 @@
 	outBuckets := make([]*ofp.Bucket, len(buckets))
 
 	for i, bucket := range buckets {
-		actions, length := volthaActionsToOpenflow(bucket.Actions)
+		actions := volthaActionsToOpenflow(bucket.Actions)
 		b := &ofp.Bucket{
-			// TODO loxi should set lengths automatically
-			// last 4 is padding
-			Len:        2 + 2 + 4 + 4 + length + 4, // length field  + weight + watchPort + watchGroup + actions
 			Weight:     uint16(bucket.Weight),
 			WatchPort:  ofp.Port(bucket.WatchPort),
 			WatchGroup: bucket.WatchGroup,
@@ -141,16 +138,12 @@
 	return outBuckets
 }
 
-func volthaActionsToOpenflow(actions []*openflow_13.OfpAction) ([]goloxi.IAction, uint16) {
+func volthaActionsToOpenflow(actions []*openflow_13.OfpAction) []goloxi.IAction {
 	outActions := make([]goloxi.IAction, len(actions))
 
-	var length uint16
-
 	for i, action := range actions {
-		a, l := parseAction(action)
-		length += l
-		outActions[i] = a
+		outActions[i] = parseAction(action)
 	}
 
-	return outActions, length
+	return outActions
 }
diff --git a/internal/pkg/openflow/meter.go b/internal/pkg/openflow/meter.go
index 574e505..a6411bb 100644
--- a/internal/pkg/openflow/meter.go
+++ b/internal/pkg/openflow/meter.go
@@ -18,7 +18,7 @@
 import (
 	"encoding/json"
 
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
 	"golang.org/x/net/context"
diff --git a/internal/pkg/openflow/packet.go b/internal/pkg/openflow/packet.go
index 7596d4a..9a13de2 100644
--- a/internal/pkg/openflow/packet.go
+++ b/internal/pkg/openflow/packet.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
 )
diff --git a/internal/pkg/openflow/parseGrpcReturn.go b/internal/pkg/openflow/parseGrpcReturn.go
index beff0be..b9e4e29 100644
--- a/internal/pkg/openflow/parseGrpcReturn.go
+++ b/internal/pkg/openflow/parseGrpcReturn.go
@@ -19,14 +19,14 @@
 	"bytes"
 	"encoding/binary"
 	"encoding/json"
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
 )
 
-func parseOxm(ofbField *openflow_13.OfpOxmOfbField) (goloxi.IOxm, uint16) {
+func parseOxm(ofbField *openflow_13.OfpOxmOfbField) goloxi.IOxm {
 	if logger.V(log.DebugLevel) {
 		js, _ := json.Marshal(ofbField)
 		logger.Debugw("parseOxm called",
@@ -38,22 +38,22 @@
 		ofpInPort := ofp.NewOxmInPort()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_Port)
 		ofpInPort.Value = ofp.Port(val.Port)
-		return ofpInPort, 4
+		return ofpInPort
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE:
 		ofpEthType := ofp.NewOxmEthType()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_EthType)
 		ofpEthType.Value = ofp.EthernetType(val.EthType)
-		return ofpEthType, 2
+		return ofpEthType
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT:
 		ofpInPhyPort := ofp.NewOxmInPhyPort()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_PhysicalPort)
 		ofpInPhyPort.Value = ofp.Port(val.PhysicalPort)
-		return ofpInPhyPort, 4
+		return ofpInPhyPort
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO:
 		ofpIpProto := ofp.NewOxmIpProto()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_IpProto)
 		ofpIpProto.Value = ofp.IpPrototype(val.IpProto)
-		return ofpIpProto, 1
+		return ofpIpProto
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_IPV4_DST:
 		ofpIpv4Dst := ofp.NewOxmIpv4Dst()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_Ipv4Dst)
@@ -64,23 +64,23 @@
 				log.Fields{"error": err})
 		}
 		ofpIpv4Dst.Value = buf.Bytes()
-		return ofpIpv4Dst, 4
+		return ofpIpv4Dst
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC:
 		ofpUdpSrc := ofp.NewOxmUdpSrc()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_UdpSrc)
 		ofpUdpSrc.Value = uint16(val.UdpSrc)
-		return ofpUdpSrc, 2
+		return ofpUdpSrc
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST:
 		ofpUdpDst := ofp.NewOxmUdpDst()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_UdpDst)
 		ofpUdpDst.Value = uint16(val.UdpDst)
-		return ofpUdpDst, 2
+		return ofpUdpDst
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID:
 		ofpVlanVid := ofp.NewOxmVlanVid()
 		val := ofbField.GetValue()
 		if val == nil {
 			ofpVlanVid.Value = uint16(0)
-			return ofpVlanVid, 2
+			return ofpVlanVid
 		}
 		vlanId := val.(*openflow_13.OfpOxmOfbField_VlanVid)
 		if ofbField.HasMask {
@@ -95,15 +95,15 @@
 				ofpVlanVidMasked.ValueMask = uint16(vlanMask.VlanVidMask)
 
 			}
-			return ofpVlanVidMasked, 4
+			return ofpVlanVidMasked
 		}
 		ofpVlanVid.Value = uint16(vlanId.VlanVid) | 0x1000
-		return ofpVlanVid, 2
+		return ofpVlanVid
 	case voltha.OxmOfbFieldTypes_OFPXMT_OFB_METADATA:
 		ofpMetadata := ofp.NewOxmMetadata()
 		val := ofbField.GetValue().(*openflow_13.OfpOxmOfbField_TableMetadata)
 		ofpMetadata.Value = val.TableMetadata
-		return ofpMetadata, 8
+		return ofpMetadata
 	default:
 		if logger.V(log.WarnLevel) {
 			js, _ := json.Marshal(ofbField)
@@ -111,10 +111,10 @@
 				log.Fields{"OfbField": js})
 		}
 	}
-	return nil, 0
+	return nil
 }
 
-func parseInstructions(ofpInstruction *openflow_13.OfpInstruction) (ofp.IInstruction, uint16) {
+func parseInstructions(ofpInstruction *openflow_13.OfpInstruction) ofp.IInstruction {
 	if logger.V(log.DebugLevel) {
 		js, _ := json.Marshal(ofpInstruction)
 		logger.Debugw("parseInstructions called",
@@ -125,50 +125,41 @@
 	switch instType {
 	case ofp.OFPITWriteMetadata:
 		instruction := ofp.NewInstructionWriteMetadata()
-		instruction.Len = 24
 		metadata := data.(*openflow_13.OfpInstruction_WriteMetadata).WriteMetadata
 		instruction.Metadata = uint64(metadata.Metadata)
-		return instruction, 24
+		return instruction
 	case ofp.OFPITMeter:
 		instruction := ofp.NewInstructionMeter()
-		instruction.Len = 8
 		meter := data.(*openflow_13.OfpInstruction_Meter).Meter
 		instruction.MeterId = meter.MeterId
-		return instruction, 8
+		return instruction
 	case ofp.OFPITGotoTable:
 		instruction := ofp.NewInstructionGotoTable()
-		instruction.Len = 8
 		gotoTable := data.(*openflow_13.OfpInstruction_GotoTable).GotoTable
 		instruction.TableId = uint8(gotoTable.TableId)
-		return instruction, 8
+		return instruction
 	case ofp.OFPITApplyActions:
 		instruction := ofp.NewInstructionApplyActions()
-		var instructionSize uint16
-		instructionSize = 8
-		//ofpActions := ofpInstruction.GetActions().Actions
+
 		var actions []goloxi.IAction
 		for _, ofpAction := range ofpInstruction.GetActions().Actions {
-			action, actionSize := parseAction(ofpAction)
+			action := parseAction(ofpAction)
 			actions = append(actions, action)
-			instructionSize += actionSize
-
 		}
 		instruction.Actions = actions
-		instruction.SetLen(instructionSize)
 		if logger.V(log.DebugLevel) {
 			js, _ := json.Marshal(instruction)
 			logger.Debugw("parseInstructions returning",
 				log.Fields{
-					"size":               instructionSize,
 					"parsed-instruction": js})
 		}
-		return instruction, instructionSize
+		return instruction
 	}
 	//shouldn't have reached here :<
-	return nil, 0
+	return nil
 }
 
-func parseAction(ofpAction *openflow_13.OfpAction) (goloxi.IAction, uint16) {
+func parseAction(ofpAction *openflow_13.OfpAction) goloxi.IAction {
 	if logger.V(log.DebugLevel) {
 		js, _ := json.Marshal(ofpAction)
 		logger.Debugw("parseAction called",
@@ -180,31 +171,26 @@
 		outputAction := ofp.NewActionOutput()
 		outputAction.Port = ofp.Port(ofpOutputAction.Port)
 		outputAction.MaxLen = uint16(ofpOutputAction.MaxLen)
-		outputAction.Len = 16
-		return outputAction, 16
+		return outputAction
 	case openflow_13.OfpActionType_OFPAT_PUSH_VLAN:
 		ofpPushVlanAction := ofp.NewActionPushVlan()
 		ofpPushVlanAction.Ethertype = uint16(ofpAction.GetPush().Ethertype)
-		ofpPushVlanAction.Len = 8
-		return ofpPushVlanAction, 8
+		return ofpPushVlanAction
 	case openflow_13.OfpActionType_OFPAT_POP_VLAN:
 		ofpPopVlanAction := ofp.NewActionPopVlan()
-		ofpPopVlanAction.Len = 8
-		return ofpPopVlanAction, 8
+		return ofpPopVlanAction
 	case openflow_13.OfpActionType_OFPAT_SET_FIELD:
 		ofpActionSetField := ofpAction.GetSetField()
 		setFieldAction := ofp.NewActionSetField()
 
-		iOxm, _ := parseOxm(ofpActionSetField.GetField().GetOfbField())
+		iOxm := parseOxm(ofpActionSetField.GetField().GetOfbField())
 		setFieldAction.Field = iOxm
-		setFieldAction.Len = 16
-		return setFieldAction, 16
+		return setFieldAction
 	case openflow_13.OfpActionType_OFPAT_GROUP:
 		ofpGroupAction := ofpAction.GetGroup()
 		groupAction := ofp.NewActionGroup()
 		groupAction.GroupId = ofpGroupAction.GroupId
-		groupAction.Len = 8
-		return groupAction, 8
+		return groupAction
 	default:
 		if logger.V(log.WarnLevel) {
 			js, _ := json.Marshal(ofpAction)
@@ -212,7 +198,7 @@
 				log.Fields{"action": js})
 		}
 	}
-	return nil, 0
+	return nil
 }
 
 func parsePortStats(port *voltha.LogicalPort) *ofp.PortStatsEntry {
diff --git a/internal/pkg/openflow/role.go b/internal/pkg/openflow/role.go
index 6d86fe9..1ea82c8 100644
--- a/internal/pkg/openflow/role.go
+++ b/internal/pkg/openflow/role.go
@@ -18,8 +18,8 @@
 
 import (
 	"encoding/json"
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/role_test.go b/internal/pkg/openflow/role_test.go
index 5eb3ba5..66a0387 100644
--- a/internal/pkg/openflow/role_test.go
+++ b/internal/pkg/openflow/role_test.go
@@ -17,7 +17,7 @@
 package openflow
 
 import (
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/stretchr/testify/assert"
 	"testing"
 )
diff --git a/internal/pkg/openflow/setConfig.go b/internal/pkg/openflow/setConfig.go
index 64be03f..96d77ce 100644
--- a/internal/pkg/openflow/setConfig.go
+++ b/internal/pkg/openflow/setConfig.go
@@ -18,7 +18,7 @@
 
 import (
 	"encoding/json"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
diff --git a/internal/pkg/openflow/stats.go b/internal/pkg/openflow/stats.go
index 9b642ce..8330d10 100644
--- a/internal/pkg/openflow/stats.go
+++ b/internal/pkg/openflow/stats.go
@@ -19,14 +19,12 @@
 import (
 	"context"
 	"encoding/json"
-	"net"
-	"unsafe"
-
-	"github.com/donNewtonAlpha/goloxi"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	"github.com/opencord/goloxi"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/common"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
+	"net"
 )
 
 func (ofc *OFConnection) handleStatsRequest(request ofp.IHeader, statType uint16) error {
@@ -62,7 +60,6 @@
 		if err != nil {
 			return err
 		}
-		response.Length = uint16(unsafe.Sizeof(*response))
 		if logger.V(log.DebugLevel) {
 			reqJs, _ := json.Marshal(statsReq)
 			resJs, _ := json.Marshal(response)
@@ -341,39 +338,25 @@
 		entry.SetCookie(item.GetCookie())
 		entry.SetPacketCount(item.GetPacketCount())
 		entry.SetByteCount(item.GetByteCount())
-		entrySize := uint16(48)
 		match := ofp.NewMatchV3()
 		pbMatch := item.GetMatch()
 		match.SetType(uint16(pbMatch.GetType()))
-		size := uint16(4)
 		var fields []goloxi.IOxm
 		for _, oxmField := range pbMatch.GetOxmFields() {
 			field := oxmField.GetField()
 			ofbField := field.(*openflow_13.OfpOxmField_OfbField).OfbField
-			iOxm, oxmSize := parseOxm(ofbField)
+			iOxm := parseOxm(ofbField)
 			fields = append(fields, iOxm)
-			if oxmSize > 0 {
-				size += 4 //header for oxm
-			}
-			size += oxmSize
 		}
 
 		match.OxmList = fields
-		match.Length = uint16(size)
-		//account for 8 byte alignment
-		if size%8 != 0 {
-			size = ((size / 8) + 1) * 8
-		}
-		entrySize += size
 		entry.SetMatch(*match)
 		var instructions []ofp.IInstruction
 		for _, ofpInstruction := range item.Instructions {
-			instruction, size := parseInstructions(ofpInstruction)
+			instruction := parseInstructions(ofpInstruction)
 			instructions = append(instructions, instruction)
-			entrySize += size
 		}
 		entry.Instructions = instructions
-		entry.Length = entrySize
 		flow = append(flow, entry)
 	}
 	response.SetEntries(flow)
@@ -426,10 +409,6 @@
 			bucketStatsList = append(bucketStatsList, &bucketCounter)
 		}
 		entry.SetBucketStats(bucketStatsList)
-		// TODO loxi should set lengths automatically
-		// last 2 + 4 are padding
-		length := 2 + 4 + 4 + 8 + 8 + 4 + 4 + len(bucketStatsList)*16 + 2 + 4
-		entry.SetLength(uint16(length))
 		groupStatsEntries = append(groupStatsEntries, &entry)
 	}
 	response.SetEntries(groupStatsEntries)
@@ -455,15 +434,8 @@
 		desc := item.GetDesc()
 
 		buckets := volthaBucketsToOpenflow(desc.Buckets)
-		var bucketsLength uint16
-		for _, b := range buckets {
-			bucketsLength += b.Len
-		}
 
 		groupDesc := &ofp.GroupDescStatsEntry{
-			// TODO loxi should set lengths automatically
-			// last 1 is padding
-			Length:    2 + 1 + 4 + bucketsLength + 1, // length field + groupType + groupId + buckets
 			GroupType: volthaGroupTypeToOpenflow(desc.Type),
 			GroupId:   desc.GroupId,
 			Buckets:   buckets,
@@ -497,10 +469,8 @@
 	if err != nil {
 		return nil, err
 	}
-	size := uint16(5) // size of stats header
 	var meterStats []*ofp.MeterStats
 	for _, item := range resp.Items {
-		entrySize := uint16(40) // size of entry header
 		meterStat := ofp.NewMeterStats()
 		stats := item.Stats
 		meterStat.DurationNsec = stats.DurationNsec
@@ -514,15 +484,11 @@
 			bandStat.ByteBandCount = bStat.ByteBandCount
 			bandStat.PacketBandCount = bStat.PacketBandCount
 			bandStats = append(bandStats, bandStat)
-			entrySize += uint16(16) // size of each band stat
 		}
 		meterStat.SetBandStats(bandStats)
-		meterStat.Len = entrySize
 		meterStats = append(meterStats, meterStat)
-		size += entrySize
 	}
 	response.SetEntries(meterStats)
-	response.SetLength(size)
 	return response, nil
 }
 
diff --git a/internal/pkg/openflow/utils.go b/internal/pkg/openflow/utils.go
index dac2f22..8745087 100644
--- a/internal/pkg/openflow/utils.go
+++ b/internal/pkg/openflow/utils.go
@@ -18,7 +18,7 @@
 
 import (
 	"fmt"
-	ofp "github.com/donNewtonAlpha/goloxi/of13"
+	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/voltha-protos/v3/go/openflow_13"
 	"strings"
 	"sync"
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/LICENSE b/vendor/github.com/donNewtonAlpha/goloxi/LICENSE
deleted file mode 100644
index dd5b3a5..0000000
--- a/vendor/github.com/donNewtonAlpha/goloxi/LICENSE
+++ /dev/null
@@ -1,174 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/README.md b/vendor/github.com/donNewtonAlpha/goloxi/README.md
deleted file mode 100644
index 11b551f..0000000
--- a/vendor/github.com/donNewtonAlpha/goloxi/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Goloxi - OpenFlow library for golang
-
-Goloxi is generated using [loxigen](https://github.com/floodlight/loxigen). Is it still in
-an experimental state.
-
-It supports serializing and deserializing OpenFlow messages and structures from version
-1.0 to version 1.5. It supports Big Switch and Nicira extensions.
-
-## License
-
-This software is licensed under the Apache License, Version 2.0 (the
-"License"); you may not use this software except in compliance with the
-License.
-You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
\ No newline at end of file
diff --git a/vendor/github.com/opencord/goloxi/.gitreview b/vendor/github.com/opencord/goloxi/.gitreview
new file mode 100644
index 0000000..6fedb57
--- /dev/null
+++ b/vendor/github.com/opencord/goloxi/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=goloxi.git
+defaultremote=origin
diff --git a/vendor/github.com/opencord/goloxi/Makefile b/vendor/github.com/opencord/goloxi/Makefile
new file mode 100644
index 0000000..ed2e2ae
--- /dev/null
+++ b/vendor/github.com/opencord/goloxi/Makefile
@@ -0,0 +1,18 @@
+#
+# Copyright 2020 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+test:
+	@echo ""
diff --git a/vendor/github.com/opencord/goloxi/VERSION b/vendor/github.com/opencord/goloxi/VERSION
new file mode 100644
index 0000000..7dea76e
--- /dev/null
+++ b/vendor/github.com/opencord/goloxi/VERSION
@@ -0,0 +1 @@
+1.0.1
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/decoder.go b/vendor/github.com/opencord/goloxi/decoder.go
similarity index 86%
rename from vendor/github.com/donNewtonAlpha/goloxi/decoder.go
rename to vendor/github.com/opencord/goloxi/decoder.go
index aa974b9..63cccac 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/decoder.go
+++ b/vendor/github.com/opencord/goloxi/decoder.go
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+ * Copyright (c) 2011, 2012 Open Networking Foundation
+ * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler.
+ * Copyright 2018, Red Hat, Inc.
+ */
 package goloxi
 
 import (
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/encoder.go b/vendor/github.com/opencord/goloxi/encoder.go
similarity index 77%
rename from vendor/github.com/donNewtonAlpha/goloxi/encoder.go
rename to vendor/github.com/opencord/goloxi/encoder.go
index e67b2f8..9e064ff 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/encoder.go
+++ b/vendor/github.com/opencord/goloxi/encoder.go
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+ * Copyright (c) 2011, 2012 Open Networking Foundation
+ * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler.
+ * Copyright 2018, Red Hat, Inc.
+ */
 package goloxi
 
 import (
@@ -55,8 +61,3 @@
 func (e *Encoder) Bytes() []byte {
 	return e.buffer.Bytes()
 }
-
-func (e *Encoder) SkipAlign() {
-	length := len(e.buffer.Bytes())
-	e.Write(bytes.Repeat([]byte{0}, (length+7)/8*8-length))
-}
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/globals.go b/vendor/github.com/opencord/goloxi/globals.go
similarity index 85%
rename from vendor/github.com/donNewtonAlpha/goloxi/globals.go
rename to vendor/github.com/opencord/goloxi/globals.go
index cb8c54c..9d87dea 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/globals.go
+++ b/vendor/github.com/opencord/goloxi/globals.go
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+ * Copyright (c) 2011, 2012 Open Networking Foundation
+ * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler.
+ * Copyright 2018, Red Hat, Inc.
+ */
 package goloxi
 
 import "fmt"
diff --git a/vendor/github.com/opencord/goloxi/go.mod b/vendor/github.com/opencord/goloxi/go.mod
new file mode 100644
index 0000000..c19bf71
--- /dev/null
+++ b/vendor/github.com/opencord/goloxi/go.mod
@@ -0,0 +1,5 @@
+// empty go.mod file required to trigger go-based tag format
+// for tagged releases
+module github.com/opencord/goloxi
+
+go 1.13
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/action.go b/vendor/github.com/opencord/goloxi/of13/action.go
similarity index 91%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/action.go
rename to vendor/github.com/opencord/goloxi/of13/action.go
index d5459a7..e89aa7d 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/action.go
+++ b/vendor/github.com/opencord/goloxi/of13/action.go
@@ -16,7 +16,7 @@
 	"fmt"
 	"net"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type Action struct {
@@ -276,13 +276,15 @@
 }
 
 func (self *ActionBsnChecksum) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Checksum.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -349,6 +351,7 @@
 }
 
 func (self *ActionBsnGentable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionBsn.Serialize(encoder); err != nil {
 		return err
 	}
@@ -359,8 +362,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -448,6 +452,7 @@
 }
 
 func (self *ActionBsnMirror) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionBsn.Serialize(encoder); err != nil {
 		return err
 	}
@@ -456,8 +461,9 @@
 	encoder.PutUint32(uint32(self.VlanTag))
 	encoder.PutUint8(uint8(self.CopyStage))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -519,13 +525,15 @@
 }
 
 func (self *ActionBsnSetTunnelDst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Dst))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -572,13 +580,15 @@
 }
 
 func (self *ActionCopyTtlIn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -623,13 +633,15 @@
 }
 
 func (self *ActionCopyTtlOut) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -674,13 +686,15 @@
 }
 
 func (self *ActionDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -725,13 +739,15 @@
 }
 
 func (self *ActionDecNwTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -786,13 +802,15 @@
 }
 
 func (self *ActionGroup) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.GroupId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1001,14 +1019,16 @@
 }
 
 func (self *ActionNiciraDecTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1124,6 +1144,7 @@
 }
 
 func (self *ActionNxBundle) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1136,8 +1157,9 @@
 	encoder.PutUint16(uint16(self.OfsNbits))
 	self.Dst.Serialize(encoder)
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1427,6 +1449,7 @@
 }
 
 func (self *ActionNxBundleLoadInPort) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1444,8 +1467,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1469,7 +1493,8 @@
 
 	decoder.Skip(4)
 
-	for i := 0; i < int(_actionnxbundleloadinport.NSlaves); i++ {
+	end := decoder.Offset() + int(_actionnxbundleloadinport.NSlaves)
+	for decoder.Offset() < end {
 		item, err := DecodeActionNxBundleLoadSlave(decoder)
 		if err != nil {
 			return nil, err
@@ -1531,6 +1556,7 @@
 }
 
 func (self *ActionNxClone) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1541,8 +1567,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1629,6 +1656,7 @@
 }
 
 func (self *ActionNxConjunction) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1636,8 +1664,9 @@
 	encoder.PutUint8(uint8(self.Clause))
 	encoder.PutUint8(uint8(self.NClauses))
 	encoder.PutUint32(uint32(self.Id))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1718,6 +1747,7 @@
 }
 
 func (self *ActionNxController) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1726,8 +1756,9 @@
 	encoder.PutUint16(uint16(self.ControllerId))
 	encoder.PutUint8(uint8(self.Reason))
 	encoder.Write(bytes.Repeat([]byte{0}, 1))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1789,6 +1820,7 @@
 }
 
 func (self *ActionNxController2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1799,8 +1831,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1917,6 +1950,7 @@
 }
 
 func (self *ActionNxCt) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1932,8 +1966,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2005,11 +2040,13 @@
 }
 
 func (self *ActionNxCtClear) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2050,11 +2087,13 @@
 }
 
 func (self *ActionNxDebugRecirc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2095,11 +2134,13 @@
 }
 
 func (self *ActionNxDebugSlow) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2140,11 +2181,13 @@
 }
 
 func (self *ActionNxDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2185,11 +2228,13 @@
 }
 
 func (self *ActionNxDecNshTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2240,14 +2285,16 @@
 }
 
 func (self *ActionNxDecTtlCntIds) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.NControllers))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2305,14 +2352,16 @@
 }
 
 func (self *ActionNxDecap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint32(uint32(self.NewPktType))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2390,6 +2439,7 @@
 }
 
 func (self *ActionNxEncap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2401,8 +2451,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2462,11 +2513,13 @@
 }
 
 func (self *ActionNxExit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2527,6 +2580,7 @@
 }
 
 func (self *ActionNxFinTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2534,8 +2588,9 @@
 	encoder.PutUint16(uint16(self.FinIdleTimeout))
 	encoder.PutUint16(uint16(self.FinHardTimeout))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2595,13 +2650,15 @@
 }
 
 func (self *ActionNxGroup) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2738,6 +2795,7 @@
 }
 
 func (self *ActionNxLearn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2756,8 +2814,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2830,11 +2889,13 @@
 }
 
 func (self *ActionNxLearn2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2945,6 +3006,7 @@
 }
 
 func (self *ActionNxMultipath) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2958,8 +3020,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint16(uint16(self.OfsNbits))
 	self.Dst.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3105,6 +3168,7 @@
 }
 
 func (self *ActionNxNat) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3118,8 +3182,9 @@
 	encoder.Write(self.Ipv6Max.To16())
 	encoder.PutUint32(uint32(self.ProtoMin))
 	encoder.PutUint32(uint32(self.ProtoMax))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3203,13 +3268,15 @@
 }
 
 func (self *ActionNxNote) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Note)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3283,6 +3350,7 @@
 }
 
 func (self *ActionNxOutputReg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3291,8 +3359,9 @@
 	encoder.PutUint32(uint32(self.Src))
 	encoder.PutUint16(uint16(self.MaxLen))
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3364,6 +3433,7 @@
 }
 
 func (self *ActionNxOutputReg2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3371,8 +3441,9 @@
 	encoder.PutUint16(uint16(self.OfsNbits))
 	encoder.PutUint16(uint16(self.MaxLen))
 	encoder.Write(bytes.Repeat([]byte{0}, 10))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3442,14 +3513,16 @@
 }
 
 func (self *ActionNxOutputTrunc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Port))
 	encoder.PutUint32(uint32(self.MaxLen))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3508,13 +3581,15 @@
 }
 
 func (self *ActionNxPopMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3561,11 +3636,13 @@
 }
 
 func (self *ActionNxPopQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3616,13 +3693,15 @@
 }
 
 func (self *ActionNxPushMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3699,6 +3778,7 @@
 }
 
 func (self *ActionNxRegLoad) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3706,8 +3786,9 @@
 	encoder.PutUint16(uint16(self.OfsNbits))
 	self.SrcField.Serialize(encoder)
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3763,13 +3844,15 @@
 }
 
 func (self *ActionNxRegLoad2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3864,6 +3947,7 @@
 }
 
 func (self *ActionNxRegMove) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3873,8 +3957,12 @@
 	encoder.PutUint16(uint16(self.DstOfs))
 	self.Src.Serialize(encoder)
 	self.Dst.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -3949,13 +4037,15 @@
 }
 
 func (self *ActionNxResubmit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4022,6 +4112,7 @@
 }
 
 func (self *ActionNxResubmitTable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4029,8 +4120,9 @@
 	encoder.PutUint16(uint16(self.InPort))
 	encoder.PutUint8(uint8(self.Table))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4100,6 +4192,7 @@
 }
 
 func (self *ActionNxResubmitTableCt) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4107,8 +4200,9 @@
 	encoder.PutUint16(uint16(self.InPort))
 	encoder.PutUint8(uint8(self.Table))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4198,6 +4292,7 @@
 }
 
 func (self *ActionNxSample) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4206,8 +4301,9 @@
 	encoder.PutUint32(uint32(self.CollectorSetId))
 	encoder.PutUint32(uint32(self.ObsDomainId))
 	encoder.PutUint32(uint32(self.ObsPointId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4320,6 +4416,7 @@
 }
 
 func (self *ActionNxSample2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4331,8 +4428,9 @@
 	encoder.PutUint16(uint16(self.SamplingPort))
 	encoder.PutUint8(uint8(self.Direction))
 	encoder.Write(bytes.Repeat([]byte{0}, 5))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4450,6 +4548,7 @@
 }
 
 func (self *ActionNxSample3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4461,8 +4560,9 @@
 	encoder.PutUint16(uint16(self.SamplingPort))
 	encoder.PutUint8(uint8(self.Direction))
 	encoder.Write(bytes.Repeat([]byte{0}, 5))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4530,13 +4630,15 @@
 }
 
 func (self *ActionNxSetMplsLabel) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4593,13 +4695,15 @@
 }
 
 func (self *ActionNxSetMplsTc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4656,13 +4760,15 @@
 }
 
 func (self *ActionNxSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4719,13 +4825,15 @@
 }
 
 func (self *ActionNxSetQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4782,13 +4890,15 @@
 }
 
 func (self *ActionNxSetTunnel) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4845,13 +4955,15 @@
 }
 
 func (self *ActionNxSetTunnel64) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4928,6 +5040,7 @@
 }
 
 func (self *ActionNxStackPop) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4935,8 +5048,9 @@
 	encoder.PutUint16(uint16(self.Offset))
 	self.Field.Serialize(encoder)
 	encoder.PutUint16(uint16(self.NBits))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5022,6 +5136,7 @@
 }
 
 func (self *ActionNxStackPush) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5029,8 +5144,12 @@
 	encoder.PutUint16(uint16(self.Offset))
 	self.Field.Serialize(encoder)
 	encoder.PutUint16(uint16(self.NBits))
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 23) / 24 * 24)
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -5106,6 +5225,7 @@
 }
 
 func (self *ActionNxWriteMetadata) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5113,8 +5233,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
 	encoder.PutUint64(uint64(self.Metadata))
 	encoder.PutUint64(uint64(self.Mask))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5184,6 +5305,7 @@
 }
 
 func (self *ActionOutput) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5191,8 +5313,9 @@
 	self.Port.Serialize(encoder)
 	encoder.PutUint16(uint16(self.MaxLen))
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5252,14 +5375,16 @@
 }
 
 func (self *ActionPopMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Ethertype))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5307,13 +5432,15 @@
 }
 
 func (self *ActionPopPbb) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5358,13 +5485,15 @@
 }
 
 func (self *ActionPopVlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5419,14 +5548,16 @@
 }
 
 func (self *ActionPushMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Ethertype))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5484,14 +5615,16 @@
 }
 
 func (self *ActionPushPbb) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Ethertype))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5549,14 +5682,16 @@
 }
 
 func (self *ActionPushVlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Ethertype))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5624,6 +5759,7 @@
 }
 
 func (self *ActionResubmit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNicira.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5631,8 +5767,9 @@
 	encoder.PutUint16(uint16(self.InPort))
 	encoder.PutUint8(uint8(self.Table))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5692,14 +5829,18 @@
 }
 
 func (self *ActionSetField) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Field.Serialize(encoder)
-	encoder.SkipAlign()
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(alignedLength))
+
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -5761,14 +5902,16 @@
 }
 
 func (self *ActionSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.MplsTtl))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5826,14 +5969,16 @@
 }
 
 func (self *ActionSetNwTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.NwTtl))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5891,13 +6036,15 @@
 }
 
 func (self *ActionSetQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Action.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.QueueId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/action_id.go b/vendor/github.com/opencord/goloxi/of13/action_id.go
similarity index 82%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/action_id.go
rename to vendor/github.com/opencord/goloxi/of13/action_id.go
index e99e42b..b6f905e 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/action_id.go
+++ b/vendor/github.com/opencord/goloxi/of13/action_id.go
@@ -13,7 +13,7 @@
 	"encoding/binary"
 	"fmt"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type ActionId struct {
@@ -227,11 +227,13 @@
 }
 
 func (self *ActionIdBsnChecksum) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -257,11 +259,13 @@
 }
 
 func (self *ActionIdBsnGentable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -287,11 +291,13 @@
 }
 
 func (self *ActionIdBsnMirror) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -317,11 +323,13 @@
 }
 
 func (self *ActionIdBsnSetTunnelDst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -347,11 +355,13 @@
 }
 
 func (self *ActionIdCopyTtlIn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -377,11 +387,13 @@
 }
 
 func (self *ActionIdCopyTtlOut) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -407,11 +419,13 @@
 }
 
 func (self *ActionIdDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -437,11 +451,13 @@
 }
 
 func (self *ActionIdDecNwTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -467,11 +483,13 @@
 }
 
 func (self *ActionIdGroup) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -642,11 +660,13 @@
 }
 
 func (self *ActionIdNiciraDecTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -672,11 +692,13 @@
 }
 
 func (self *ActionIdNxBundle) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -767,14 +789,16 @@
 }
 
 func (self *ActionIdNxBundleLoadInPort) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.SlaveType))
 	encoder.PutUint16(uint16(self.NSlaves))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -805,11 +829,13 @@
 }
 
 func (self *ActionIdNxClone) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -835,11 +861,13 @@
 }
 
 func (self *ActionIdNxConjunction) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -865,11 +893,13 @@
 }
 
 func (self *ActionIdNxController) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -895,11 +925,13 @@
 }
 
 func (self *ActionIdNxController2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -925,11 +957,13 @@
 }
 
 func (self *ActionIdNxCt) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -955,11 +989,13 @@
 }
 
 func (self *ActionIdNxCtClear) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -985,11 +1021,13 @@
 }
 
 func (self *ActionIdNxDebugRecirc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1015,11 +1053,13 @@
 }
 
 func (self *ActionIdNxDebugSlow) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1045,11 +1085,13 @@
 }
 
 func (self *ActionIdNxDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1075,11 +1117,13 @@
 }
 
 func (self *ActionIdNxDecNshTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1105,11 +1149,13 @@
 }
 
 func (self *ActionIdNxDecTtlCntIds) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1135,11 +1181,13 @@
 }
 
 func (self *ActionIdNxDecap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1165,11 +1213,13 @@
 }
 
 func (self *ActionIdNxEncap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1195,11 +1245,13 @@
 }
 
 func (self *ActionIdNxExit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1225,11 +1277,13 @@
 }
 
 func (self *ActionIdNxFinTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1255,11 +1309,13 @@
 }
 
 func (self *ActionIdNxGroup) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1285,11 +1341,13 @@
 }
 
 func (self *ActionIdNxLearn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1315,11 +1373,13 @@
 }
 
 func (self *ActionIdNxLearn2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1345,11 +1405,13 @@
 }
 
 func (self *ActionIdNxMultipath) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1375,11 +1437,13 @@
 }
 
 func (self *ActionIdNxNat) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1405,11 +1469,13 @@
 }
 
 func (self *ActionIdNxNote) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1435,11 +1501,13 @@
 }
 
 func (self *ActionIdNxOutputReg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1465,11 +1533,13 @@
 }
 
 func (self *ActionIdNxOutputReg2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1495,11 +1565,13 @@
 }
 
 func (self *ActionIdNxOutputTrunc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1525,11 +1597,13 @@
 }
 
 func (self *ActionIdNxPopMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1555,11 +1629,13 @@
 }
 
 func (self *ActionIdNxPopQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1585,11 +1661,13 @@
 }
 
 func (self *ActionIdNxPushMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1615,11 +1693,13 @@
 }
 
 func (self *ActionIdNxRegLoad) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1645,11 +1725,13 @@
 }
 
 func (self *ActionIdNxRegLoad2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1675,11 +1757,13 @@
 }
 
 func (self *ActionIdNxRegMove) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1705,11 +1789,13 @@
 }
 
 func (self *ActionIdNxResubmit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1735,11 +1821,13 @@
 }
 
 func (self *ActionIdNxResubmitTable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1765,11 +1853,13 @@
 }
 
 func (self *ActionIdNxResubmitTableCt) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1795,11 +1885,13 @@
 }
 
 func (self *ActionIdNxSample) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1825,11 +1917,13 @@
 }
 
 func (self *ActionIdNxSample2) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1855,11 +1949,13 @@
 }
 
 func (self *ActionIdNxSample3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1885,11 +1981,13 @@
 }
 
 func (self *ActionIdNxSetMplsLabel) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1915,11 +2013,13 @@
 }
 
 func (self *ActionIdNxSetMplsTc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1945,11 +2045,13 @@
 }
 
 func (self *ActionIdNxSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1975,11 +2077,13 @@
 }
 
 func (self *ActionIdNxSetQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2005,11 +2109,13 @@
 }
 
 func (self *ActionIdNxSetTunnel) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2035,11 +2141,13 @@
 }
 
 func (self *ActionIdNxSetTunnel64) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2065,11 +2173,13 @@
 }
 
 func (self *ActionIdNxStackPop) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2095,11 +2205,13 @@
 }
 
 func (self *ActionIdNxStackPush) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2125,11 +2237,13 @@
 }
 
 func (self *ActionIdNxWriteMetadata) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2155,11 +2269,13 @@
 }
 
 func (self *ActionIdOutput) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2185,11 +2301,13 @@
 }
 
 func (self *ActionIdPopMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2215,11 +2333,13 @@
 }
 
 func (self *ActionIdPopPbb) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2245,11 +2365,13 @@
 }
 
 func (self *ActionIdPopVlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2275,11 +2397,13 @@
 }
 
 func (self *ActionIdPushMpls) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2305,11 +2429,13 @@
 }
 
 func (self *ActionIdPushPbb) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2335,11 +2461,13 @@
 }
 
 func (self *ActionIdPushVlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2365,11 +2493,13 @@
 }
 
 func (self *ActionIdResubmit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionIdNicira.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2395,11 +2525,13 @@
 }
 
 func (self *ActionIdSetField) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2425,11 +2557,13 @@
 }
 
 func (self *ActionIdSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2455,11 +2589,13 @@
 }
 
 func (self *ActionIdSetNwTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2485,11 +2621,13 @@
 }
 
 func (self *ActionIdSetQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/common.go b/vendor/github.com/opencord/goloxi/of13/common.go
similarity index 92%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/common.go
rename to vendor/github.com/opencord/goloxi/of13/common.go
index 978d369..d21219d 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/common.go
+++ b/vendor/github.com/opencord/goloxi/of13/common.go
@@ -15,7 +15,7 @@
 	"fmt"
 	"net"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type OxmId struct {
@@ -927,13 +927,16 @@
 }
 
 func (self *ActionNxController2PropertyControllerId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.ControllerId))
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -975,13 +978,16 @@
 }
 
 func (self *ActionNxController2PropertyMaxLen) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.MaxLen))
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -1023,13 +1029,16 @@
 }
 
 func (self *ActionNxController2PropertyMeterId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.MeterId))
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -1061,11 +1070,14 @@
 }
 
 func (self *ActionNxController2PropertyPause) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -1103,13 +1115,16 @@
 }
 
 func (self *ActionNxController2PropertyReason) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Reason))
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -1161,16 +1176,19 @@
 }
 
 func (self *ActionNxController2PropertyUserdata) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ActionNxController2Property.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.Write(self.Userdata)
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -1451,6 +1469,7 @@
 }
 
 func (self *BsnGenericStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	for _, obj := range self.Tlvs {
@@ -1458,8 +1477,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -1587,6 +1607,7 @@
 }
 
 func (self *BsnGentableDescStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint16(uint16(self.TableId))
@@ -1594,8 +1615,9 @@
 	encoder.PutUint32(uint32(self.BucketsSize))
 	encoder.PutUint32(uint32(self.MaxEntries))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -1680,6 +1702,7 @@
 }
 
 func (self *BsnGentableEntryDescStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint16(uint16(self.KeyLength))
@@ -1694,8 +1717,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -1712,7 +1736,8 @@
 	_bsngentableentrydescstatsentry.KeyLength = uint16(decoder.ReadUint16())
 	_bsngentableentrydescstatsentry.Checksum.Decode(decoder)
 
-	for i := 0; i < int(_bsngentableentrydescstatsentry.KeyLength); i++ {
+	end := decoder.Offset() + int(_bsngentableentrydescstatsentry.KeyLength)
+	for decoder.Offset() < end {
 		item, err := DecodeBsnTlv(decoder)
 		if err != nil {
 			return nil, err
@@ -1787,6 +1812,7 @@
 }
 
 func (self *BsnGentableEntryStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint16(uint16(self.KeyLength))
@@ -1800,8 +1826,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -1817,7 +1844,8 @@
 	decoder = decoder.SliceDecoder(int(_bsngentableentrystatsentry.Length), 2+0)
 	_bsngentableentrystatsentry.KeyLength = uint16(decoder.ReadUint16())
 
-	for i := 0; i < int(_bsngentableentrystatsentry.KeyLength); i++ {
+	end := decoder.Offset() + int(_bsngentableentrystatsentry.KeyLength)
+	for decoder.Offset() < end {
 		item, err := DecodeBsnTlv(decoder)
 		if err != nil {
 			return nil, err
@@ -2196,6 +2224,7 @@
 }
 
 func (self *BsnPortCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
@@ -2205,8 +2234,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -2743,6 +2773,28 @@
 		return DecodeBsnTlvFlowIdentifier(_bsntlv, decoder)
 	case 184:
 		return DecodeBsnTlvFlowClassifier(_bsntlv, decoder)
+	case 185:
+		return DecodeBsnTlvDisableXmit(_bsntlv, decoder)
+	case 186:
+		return DecodeBsnTlvPreserveVlan(_bsntlv, decoder)
+	case 187:
+		return DecodeBsnTlvDropControl(_bsntlv, decoder)
+	case 188:
+		return DecodeBsnTlvLossless(_bsntlv, decoder)
+	case 189:
+		return DecodeBsnTlvRedundantMgmt(_bsntlv, decoder)
+	case 190:
+		return DecodeBsnTlvDnsAnalytics(_bsntlv, decoder)
+	case 191:
+		return DecodeBsnTlvSrcMacCml(_bsntlv, decoder)
+	case 192:
+		return DecodeBsnTlvActive(_bsntlv, decoder)
+	case 193:
+		return DecodeBsnTlvLinkUp(_bsntlv, decoder)
+	case 194:
+		return DecodeBsnTlvFailCount(_bsntlv, decoder)
+	case 195:
+		return DecodeBsnTlvEgressSamplingRate(_bsntlv, decoder)
 	default:
 		return nil, fmt.Errorf("Invalid type '%d' for 'BsnTlv'", _bsntlv.Type)
 	}
@@ -2754,6 +2806,38 @@
 	return obj
 }
 
+type BsnTlvActive struct {
+	*BsnTlv
+}
+
+type IBsnTlvActive interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvActive) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvActive(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActive, error) {
+	_bsntlvactive := &BsnTlvActive{BsnTlv: parent}
+	return _bsntlvactive, nil
+}
+
+func NewBsnTlvActive() *BsnTlvActive {
+	obj := &BsnTlvActive{
+		BsnTlv: NewBsnTlv(192),
+	}
+	return obj
+}
+
 type BsnTlvActorKey struct {
 	*BsnTlv
 	Value uint16
@@ -2773,13 +2857,15 @@
 }
 
 func (self *BsnTlvActorKey) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2819,13 +2905,15 @@
 }
 
 func (self *BsnTlvActorPortNum) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2865,13 +2953,15 @@
 }
 
 func (self *BsnTlvActorPortPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2911,13 +3001,15 @@
 }
 
 func (self *BsnTlvActorState) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2957,13 +3049,15 @@
 }
 
 func (self *BsnTlvActorSystemMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3003,13 +3097,15 @@
 }
 
 func (self *BsnTlvActorSystemPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3049,13 +3145,15 @@
 }
 
 func (self *BsnTlvAnchor) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3095,13 +3193,15 @@
 }
 
 func (self *BsnTlvApplyBytes) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3141,13 +3241,15 @@
 }
 
 func (self *BsnTlvApplyPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3187,13 +3289,15 @@
 }
 
 func (self *BsnTlvAutoNegotiation) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3233,13 +3337,15 @@
 }
 
 func (self *BsnTlvBfdEndpoint) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3279,13 +3385,15 @@
 }
 
 func (self *BsnTlvBfdState) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3325,13 +3433,15 @@
 }
 
 func (self *BsnTlvBroadcastQueryTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3371,13 +3481,15 @@
 }
 
 func (self *BsnTlvBroadcastRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3417,6 +3529,7 @@
 }
 
 func (self *BsnTlvBucket) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3426,8 +3539,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3473,13 +3587,15 @@
 }
 
 func (self *BsnTlvCircuitId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3516,13 +3632,15 @@
 }
 
 func (self *BsnTlvConvergenceStatus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3552,11 +3670,13 @@
 }
 
 func (self *BsnTlvCpuLag) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3592,13 +3712,15 @@
 }
 
 func (self *BsnTlvCrcEnabled) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3638,13 +3760,15 @@
 }
 
 func (self *BsnTlvData) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3681,13 +3805,15 @@
 }
 
 func (self *BsnTlvDataMask) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3724,13 +3850,15 @@
 }
 
 func (self *BsnTlvDecap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3760,11 +3888,13 @@
 }
 
 func (self *BsnTlvDisableSrcMacCheck) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3781,6 +3911,70 @@
 	return obj
 }
 
+type BsnTlvDisableXmit struct {
+	*BsnTlv
+}
+
+type IBsnTlvDisableXmit interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvDisableXmit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvDisableXmit(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDisableXmit, error) {
+	_bsntlvdisablexmit := &BsnTlvDisableXmit{BsnTlv: parent}
+	return _bsntlvdisablexmit, nil
+}
+
+func NewBsnTlvDisableXmit() *BsnTlvDisableXmit {
+	obj := &BsnTlvDisableXmit{
+		BsnTlv: NewBsnTlv(185),
+	}
+	return obj
+}
+
+type BsnTlvDnsAnalytics struct {
+	*BsnTlv
+}
+
+type IBsnTlvDnsAnalytics interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvDnsAnalytics) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvDnsAnalytics(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDnsAnalytics, error) {
+	_bsntlvdnsanalytics := &BsnTlvDnsAnalytics{BsnTlv: parent}
+	return _bsntlvdnsanalytics, nil
+}
+
+func NewBsnTlvDnsAnalytics() *BsnTlvDnsAnalytics {
+	obj := &BsnTlvDnsAnalytics{
+		BsnTlv: NewBsnTlv(190),
+	}
+	return obj
+}
+
 type BsnTlvDrop struct {
 	*BsnTlv
 }
@@ -3790,11 +3984,13 @@
 }
 
 func (self *BsnTlvDrop) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3811,6 +4007,38 @@
 	return obj
 }
 
+type BsnTlvDropControl struct {
+	*BsnTlv
+}
+
+type IBsnTlvDropControl interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvDropControl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvDropControl(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDropControl, error) {
+	_bsntlvdropcontrol := &BsnTlvDropControl{BsnTlv: parent}
+	return _bsntlvdropcontrol, nil
+}
+
+func NewBsnTlvDropControl() *BsnTlvDropControl {
+	obj := &BsnTlvDropControl{
+		BsnTlv: NewBsnTlv(187),
+	}
+	return obj
+}
+
 type BsnTlvDscp struct {
 	*BsnTlv
 	Value uint16
@@ -3830,13 +4058,15 @@
 }
 
 func (self *BsnTlvDscp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3876,13 +4106,15 @@
 }
 
 func (self *BsnTlvEcn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3912,11 +4144,13 @@
 }
 
 func (self *BsnTlvEgressOnly) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3952,13 +4186,15 @@
 }
 
 func (self *BsnTlvEgressPortGroupId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3979,6 +4215,54 @@
 	return obj
 }
 
+type BsnTlvEgressSamplingRate struct {
+	*BsnTlv
+	Value uint32
+}
+
+type IBsnTlvEgressSamplingRate interface {
+	IBsnTlv
+	GetValue() uint32
+}
+
+func (self *BsnTlvEgressSamplingRate) GetValue() uint32 {
+	return self.Value
+}
+
+func (self *BsnTlvEgressSamplingRate) SetValue(v uint32) {
+	self.Value = v
+}
+
+func (self *BsnTlvEgressSamplingRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+
+	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvEgressSamplingRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEgressSamplingRate, error) {
+	_bsntlvegresssamplingrate := &BsnTlvEgressSamplingRate{BsnTlv: parent}
+	if decoder.Length() < 4 {
+		return nil, fmt.Errorf("BsnTlvEgressSamplingRate packet too short: %d < 4", decoder.Length())
+	}
+	_bsntlvegresssamplingrate.Value = uint32(decoder.ReadUint32())
+	return _bsntlvegresssamplingrate, nil
+}
+
+func NewBsnTlvEgressSamplingRate() *BsnTlvEgressSamplingRate {
+	obj := &BsnTlvEgressSamplingRate{
+		BsnTlv: NewBsnTlv(195),
+	}
+	return obj
+}
+
 type BsnTlvEncap struct {
 	*BsnTlv
 	Value BsnEncap
@@ -3998,13 +4282,15 @@
 }
 
 func (self *BsnTlvEncap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4044,13 +4330,15 @@
 }
 
 func (self *BsnTlvEnhancedHashCapability) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4090,13 +4378,15 @@
 }
 
 func (self *BsnTlvEthDst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4136,13 +4426,15 @@
 }
 
 func (self *BsnTlvEthSrc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4182,13 +4474,15 @@
 }
 
 func (self *BsnTlvEthType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4228,13 +4522,15 @@
 }
 
 func (self *BsnTlvExternalGatewayIp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4274,13 +4570,15 @@
 }
 
 func (self *BsnTlvExternalGatewayMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4320,13 +4618,15 @@
 }
 
 func (self *BsnTlvExternalIp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4366,13 +4666,15 @@
 }
 
 func (self *BsnTlvExternalMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4412,13 +4714,15 @@
 }
 
 func (self *BsnTlvExternalNetmask) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4458,13 +4762,15 @@
 }
 
 func (self *BsnTlvFabricPortRole) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4485,6 +4791,54 @@
 	return obj
 }
 
+type BsnTlvFailCount struct {
+	*BsnTlv
+	Value uint64
+}
+
+type IBsnTlvFailCount interface {
+	IBsnTlv
+	GetValue() uint64
+}
+
+func (self *BsnTlvFailCount) GetValue() uint64 {
+	return self.Value
+}
+
+func (self *BsnTlvFailCount) SetValue(v uint64) {
+	self.Value = v
+}
+
+func (self *BsnTlvFailCount) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+
+	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvFailCount(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFailCount, error) {
+	_bsntlvfailcount := &BsnTlvFailCount{BsnTlv: parent}
+	if decoder.Length() < 8 {
+		return nil, fmt.Errorf("BsnTlvFailCount packet too short: %d < 8", decoder.Length())
+	}
+	_bsntlvfailcount.Value = uint64(decoder.ReadUint64())
+	return _bsntlvfailcount, nil
+}
+
+func NewBsnTlvFailCount() *BsnTlvFailCount {
+	obj := &BsnTlvFailCount{
+		BsnTlv: NewBsnTlv(194),
+	}
+	return obj
+}
+
 type BsnTlvFlood struct {
 	*BsnTlv
 }
@@ -4494,11 +4848,13 @@
 }
 
 func (self *BsnTlvFlood) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4534,13 +4890,15 @@
 }
 
 func (self *BsnTlvFlowClassifier) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4570,11 +4928,13 @@
 }
 
 func (self *BsnTlvFlowClassify) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4610,13 +4970,15 @@
 }
 
 func (self *BsnTlvFlowIdentifier) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4646,11 +5008,13 @@
 }
 
 func (self *BsnTlvForceLinkUp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4686,13 +5050,15 @@
 }
 
 func (self *BsnTlvForwardErrorCorrection) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4732,13 +5098,15 @@
 }
 
 func (self *BsnTlvGenerationId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4778,13 +5146,15 @@
 }
 
 func (self *BsnTlvHashAlgorithm) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4834,14 +5204,16 @@
 }
 
 func (self *BsnTlvHashGtpHeaderMatch) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.FirstHeaderByte))
 	encoder.PutUint8(uint8(self.FirstHeaderMask))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4902,6 +5274,7 @@
 }
 
 func (self *BsnTlvHashGtpPortMatch) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4909,8 +5282,9 @@
 	encoder.PutUint8(uint8(self.Match))
 	encoder.PutUint16(uint16(self.SrcPort))
 	encoder.PutUint16(uint16(self.DstPort))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4952,13 +5326,15 @@
 }
 
 func (self *BsnTlvHashPacketField) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4998,13 +5374,15 @@
 }
 
 func (self *BsnTlvHashPacketType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5054,14 +5432,16 @@
 }
 
 func (self *BsnTlvHashSeed) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Seed1))
 	encoder.PutUint32(uint32(self.Seed2))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5102,13 +5482,15 @@
 }
 
 func (self *BsnTlvHashType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5148,13 +5530,15 @@
 }
 
 func (self *BsnTlvHeaderSize) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5194,13 +5578,15 @@
 }
 
 func (self *BsnTlvIcmpCode) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5240,13 +5626,15 @@
 }
 
 func (self *BsnTlvIcmpId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5286,13 +5674,15 @@
 }
 
 func (self *BsnTlvIcmpType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5332,13 +5722,15 @@
 }
 
 func (self *BsnTlvIcmpv6Chksum) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5378,13 +5770,15 @@
 }
 
 func (self *BsnTlvIdentifier) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5414,11 +5808,13 @@
 }
 
 func (self *BsnTlvIdleNotification) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5454,13 +5850,15 @@
 }
 
 func (self *BsnTlvIdleTime) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5500,13 +5898,15 @@
 }
 
 func (self *BsnTlvIdleTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5536,11 +5936,13 @@
 }
 
 func (self *BsnTlvIgmpSnooping) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5576,13 +5978,15 @@
 }
 
 func (self *BsnTlvIngressPortGroupId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5622,13 +6026,15 @@
 }
 
 func (self *BsnTlvInternalGatewayMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5668,13 +6074,15 @@
 }
 
 func (self *BsnTlvInternalMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5714,13 +6122,15 @@
 }
 
 func (self *BsnTlvInterval) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5760,13 +6170,15 @@
 }
 
 func (self *BsnTlvIpProto) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5806,13 +6218,15 @@
 }
 
 func (self *BsnTlvIpTunnelType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5852,13 +6266,15 @@
 }
 
 func (self *BsnTlvIpv4) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5898,13 +6314,15 @@
 }
 
 func (self *BsnTlvIpv4Dst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5944,13 +6362,15 @@
 }
 
 func (self *BsnTlvIpv4Netmask) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5990,13 +6410,15 @@
 }
 
 func (self *BsnTlvIpv4Src) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6036,13 +6458,15 @@
 }
 
 func (self *BsnTlvIpv6) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To16())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6082,13 +6506,15 @@
 }
 
 func (self *BsnTlvIpv6Dst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To16())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6138,14 +6564,16 @@
 }
 
 func (self *BsnTlvIpv6Prefix) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To16())
 	encoder.PutUint8(uint8(self.PrefixLength))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6186,13 +6614,15 @@
 }
 
 func (self *BsnTlvIpv6Src) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To16())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6232,13 +6662,15 @@
 }
 
 func (self *BsnTlvKnownMulticastRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6268,11 +6700,13 @@
 }
 
 func (self *BsnTlvL2MulticastLookup) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6298,11 +6732,13 @@
 }
 
 func (self *BsnTlvL3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6338,13 +6774,15 @@
 }
 
 func (self *BsnTlvL3DstClassId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6384,13 +6822,15 @@
 }
 
 func (self *BsnTlvL3InterfaceClassId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6430,13 +6870,15 @@
 }
 
 func (self *BsnTlvL3SrcClassId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6476,13 +6918,15 @@
 }
 
 func (self *BsnTlvLagOptions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Flags))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6503,6 +6947,38 @@
 	return obj
 }
 
+type BsnTlvLinkUp struct {
+	*BsnTlv
+}
+
+type IBsnTlvLinkUp interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvLinkUp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvLinkUp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLinkUp, error) {
+	_bsntlvlinkup := &BsnTlvLinkUp{BsnTlv: parent}
+	return _bsntlvlinkup, nil
+}
+
+func NewBsnTlvLinkUp() *BsnTlvLinkUp {
+	obj := &BsnTlvLinkUp{
+		BsnTlv: NewBsnTlv(193),
+	}
+	return obj
+}
+
 type BsnTlvLoopbackMode struct {
 	*BsnTlv
 	Value BsnLoopbackMode
@@ -6522,13 +6998,15 @@
 }
 
 func (self *BsnTlvLoopbackMode) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6568,13 +7046,15 @@
 }
 
 func (self *BsnTlvLoopbackPort) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Value.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6595,6 +7075,38 @@
 	return obj
 }
 
+type BsnTlvLossless struct {
+	*BsnTlv
+}
+
+type IBsnTlvLossless interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvLossless) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvLossless(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLossless, error) {
+	_bsntlvlossless := &BsnTlvLossless{BsnTlv: parent}
+	return _bsntlvlossless, nil
+}
+
+func NewBsnTlvLossless() *BsnTlvLossless {
+	obj := &BsnTlvLossless{
+		BsnTlv: NewBsnTlv(188),
+	}
+	return obj
+}
+
 type BsnTlvLrAllEnabled struct {
 	*BsnTlv
 }
@@ -6604,11 +7116,13 @@
 }
 
 func (self *BsnTlvLrAllEnabled) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6644,13 +7158,15 @@
 }
 
 func (self *BsnTlvMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6690,13 +7206,15 @@
 }
 
 func (self *BsnTlvMacMask) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6726,11 +7244,13 @@
 }
 
 func (self *BsnTlvMcgTypeVxlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6766,13 +7286,15 @@
 }
 
 func (self *BsnTlvMissPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6812,13 +7334,15 @@
 }
 
 func (self *BsnTlvMplsControlWord) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6858,13 +7382,15 @@
 }
 
 func (self *BsnTlvMplsLabel) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6904,13 +7430,15 @@
 }
 
 func (self *BsnTlvMplsSequenced) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6950,13 +7478,15 @@
 }
 
 func (self *BsnTlvMulticastInterfaceId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6996,13 +7526,15 @@
 }
 
 func (self *BsnTlvMulticastPacket) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7042,13 +7574,15 @@
 }
 
 func (self *BsnTlvMultiplier) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7088,13 +7622,15 @@
 }
 
 func (self *BsnTlvName) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7121,11 +7657,13 @@
 }
 
 func (self *BsnTlvNdpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7151,11 +7689,13 @@
 }
 
 func (self *BsnTlvNdpStatic) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7181,11 +7721,13 @@
 }
 
 func (self *BsnTlvNegate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7221,13 +7763,15 @@
 }
 
 func (self *BsnTlvNextHopIpv4) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7267,13 +7811,15 @@
 }
 
 func (self *BsnTlvNextHopMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7303,11 +7849,13 @@
 }
 
 func (self *BsnTlvNexthopTypeVxlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7333,11 +7881,13 @@
 }
 
 func (self *BsnTlvNoArpResponse) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7363,11 +7913,13 @@
 }
 
 func (self *BsnTlvNoNsResponse) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7403,13 +7955,15 @@
 }
 
 func (self *BsnTlvOffset) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7439,11 +7993,13 @@
 }
 
 func (self *BsnTlvOpticsAlwaysEnabled) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7479,13 +8035,15 @@
 }
 
 func (self *BsnTlvOuterSrcMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7525,13 +8083,15 @@
 }
 
 func (self *BsnTlvParentPort) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Value.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7571,13 +8131,15 @@
 }
 
 func (self *BsnTlvPartnerKey) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7617,13 +8179,15 @@
 }
 
 func (self *BsnTlvPartnerPortNum) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7663,13 +8227,15 @@
 }
 
 func (self *BsnTlvPartnerPortPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7709,13 +8275,15 @@
 }
 
 func (self *BsnTlvPartnerState) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7755,13 +8323,15 @@
 }
 
 func (self *BsnTlvPartnerSystemMac) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7801,13 +8371,15 @@
 }
 
 func (self *BsnTlvPartnerSystemPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7837,11 +8409,13 @@
 }
 
 func (self *BsnTlvPassive) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7877,13 +8451,15 @@
 }
 
 func (self *BsnTlvPduaRxInstance) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7910,11 +8486,13 @@
 }
 
 func (self *BsnTlvPimDr) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7940,11 +8518,13 @@
 }
 
 func (self *BsnTlvPimHelloFlood) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7980,13 +8560,15 @@
 }
 
 func (self *BsnTlvPort) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Value.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8026,13 +8608,15 @@
 }
 
 func (self *BsnTlvPortMode) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8072,13 +8656,15 @@
 }
 
 func (self *BsnTlvPortSpeedGbps) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8118,13 +8704,15 @@
 }
 
 func (self *BsnTlvPortUsage) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8164,13 +8752,15 @@
 }
 
 func (self *BsnTlvPortVxlanMode) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8191,6 +8781,38 @@
 	return obj
 }
 
+type BsnTlvPreserveVlan struct {
+	*BsnTlv
+}
+
+type IBsnTlvPreserveVlan interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvPreserveVlan) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvPreserveVlan(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPreserveVlan, error) {
+	_bsntlvpreservevlan := &BsnTlvPreserveVlan{BsnTlv: parent}
+	return _bsntlvpreservevlan, nil
+}
+
+func NewBsnTlvPreserveVlan() *BsnTlvPreserveVlan {
+	obj := &BsnTlvPreserveVlan{
+		BsnTlv: NewBsnTlv(186),
+	}
+	return obj
+}
+
 type BsnTlvPriority struct {
 	*BsnTlv
 	Value uint32
@@ -8210,13 +8832,15 @@
 }
 
 func (self *BsnTlvPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8246,11 +8870,13 @@
 }
 
 func (self *BsnTlvPushVlanOnEgress) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8286,13 +8912,15 @@
 }
 
 func (self *BsnTlvPushVlanOnIngress) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Flags))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8332,13 +8960,15 @@
 }
 
 func (self *BsnTlvQosPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8378,13 +9008,15 @@
 }
 
 func (self *BsnTlvQueueId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8424,13 +9056,15 @@
 }
 
 func (self *BsnTlvQueueWeight) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8470,13 +9104,15 @@
 }
 
 func (self *BsnTlvRateLimit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8516,13 +9152,15 @@
 }
 
 func (self *BsnTlvRateUnit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8562,13 +9200,15 @@
 }
 
 func (self *BsnTlvRecordPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8589,6 +9229,38 @@
 	return obj
 }
 
+type BsnTlvRedundantMgmt struct {
+	*BsnTlv
+}
+
+type IBsnTlvRedundantMgmt interface {
+	IBsnTlv
+}
+
+func (self *BsnTlvRedundantMgmt) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvRedundantMgmt(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRedundantMgmt, error) {
+	_bsntlvredundantmgmt := &BsnTlvRedundantMgmt{BsnTlv: parent}
+	return _bsntlvredundantmgmt, nil
+}
+
+func NewBsnTlvRedundantMgmt() *BsnTlvRedundantMgmt {
+	obj := &BsnTlvRedundantMgmt{
+		BsnTlv: NewBsnTlv(189),
+	}
+	return obj
+}
+
 type BsnTlvReference struct {
 	*BsnTlv
 	TableId uint16
@@ -8618,6 +9290,7 @@
 }
 
 func (self *BsnTlvReference) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8628,8 +9301,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8679,13 +9353,15 @@
 }
 
 func (self *BsnTlvReplyPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8725,13 +9401,15 @@
 }
 
 func (self *BsnTlvRequestPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8761,11 +9439,13 @@
 }
 
 func (self *BsnTlvRestServer) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8801,13 +9481,15 @@
 }
 
 func (self *BsnTlvRoutingParam) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8847,13 +9529,15 @@
 }
 
 func (self *BsnTlvRxBytes) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8893,13 +9577,15 @@
 }
 
 func (self *BsnTlvRxPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8939,13 +9625,15 @@
 }
 
 func (self *BsnTlvSamplingRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8975,11 +9663,13 @@
 }
 
 func (self *BsnTlvSetLoopbackMode) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8996,6 +9686,54 @@
 	return obj
 }
 
+type BsnTlvSrcMacCml struct {
+	*BsnTlv
+	Value BsnCml
+}
+
+type IBsnTlvSrcMacCml interface {
+	IBsnTlv
+	GetValue() BsnCml
+}
+
+func (self *BsnTlvSrcMacCml) GetValue() BsnCml {
+	return self.Value
+}
+
+func (self *BsnTlvSrcMacCml) SetValue(v BsnCml) {
+	self.Value = v
+}
+
+func (self *BsnTlvSrcMacCml) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
+	if err := self.BsnTlv.Serialize(encoder); err != nil {
+		return err
+	}
+
+	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
+
+	return nil
+}
+
+func DecodeBsnTlvSrcMacCml(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvSrcMacCml, error) {
+	_bsntlvsrcmaccml := &BsnTlvSrcMacCml{BsnTlv: parent}
+	if decoder.Length() < 2 {
+		return nil, fmt.Errorf("BsnTlvSrcMacCml packet too short: %d < 2", decoder.Length())
+	}
+	_bsntlvsrcmaccml.Value = BsnCml(decoder.ReadUint16())
+	return _bsntlvsrcmaccml, nil
+}
+
+func NewBsnTlvSrcMacCml() *BsnTlvSrcMacCml {
+	obj := &BsnTlvSrcMacCml{
+		BsnTlv: NewBsnTlv(191),
+	}
+	return obj
+}
+
 type BsnTlvStatus struct {
 	*BsnTlv
 	Value BsnStatus
@@ -9015,13 +9753,15 @@
 }
 
 func (self *BsnTlvStatus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9051,11 +9791,13 @@
 }
 
 func (self *BsnTlvStripMplsL2OnIngress) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9081,11 +9823,13 @@
 }
 
 func (self *BsnTlvStripMplsL3OnIngress) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9121,13 +9865,15 @@
 }
 
 func (self *BsnTlvStripVlanOnEgress) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Flags))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9167,13 +9913,15 @@
 }
 
 func (self *BsnTlvSubAgentId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9213,13 +9961,15 @@
 }
 
 func (self *BsnTlvTcpDst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9259,13 +10009,15 @@
 }
 
 func (self *BsnTlvTcpFlags) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9305,13 +10057,15 @@
 }
 
 func (self *BsnTlvTcpSrc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9351,13 +10105,15 @@
 }
 
 func (self *BsnTlvTimestamp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9397,13 +10153,15 @@
 }
 
 func (self *BsnTlvTtl) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9443,13 +10201,15 @@
 }
 
 func (self *BsnTlvTunnelCapability) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9489,13 +10249,15 @@
 }
 
 func (self *BsnTlvTxBytes) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9535,13 +10297,15 @@
 }
 
 func (self *BsnTlvTxPackets) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9581,13 +10345,15 @@
 }
 
 func (self *BsnTlvUdfAnchor) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9627,13 +10393,15 @@
 }
 
 func (self *BsnTlvUdfCapability) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9673,13 +10441,15 @@
 }
 
 func (self *BsnTlvUdfId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9719,13 +10489,15 @@
 }
 
 func (self *BsnTlvUdfLength) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9765,13 +10537,15 @@
 }
 
 func (self *BsnTlvUdfOffset) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9811,13 +10585,15 @@
 }
 
 func (self *BsnTlvUdpDst) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9857,13 +10633,15 @@
 }
 
 func (self *BsnTlvUdpSrc) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9903,13 +10681,15 @@
 }
 
 func (self *BsnTlvUint32) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9949,6 +10729,7 @@
 }
 
 func (self *BsnTlvUint64List) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9958,8 +10739,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10005,13 +10787,15 @@
 }
 
 func (self *BsnTlvUnicastQueryTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10051,13 +10835,15 @@
 }
 
 func (self *BsnTlvUnicastRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10097,13 +10883,15 @@
 }
 
 func (self *BsnTlvUnknownMulticastRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10133,11 +10921,13 @@
 }
 
 func (self *BsnTlvUntagged) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10173,13 +10963,15 @@
 }
 
 func (self *BsnTlvUpgrade) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10219,13 +11011,15 @@
 }
 
 func (self *BsnTlvUriScheme) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10262,13 +11056,15 @@
 }
 
 func (self *BsnTlvUsePacketState) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10298,11 +11094,13 @@
 }
 
 func (self *BsnTlvUserConfigured) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10338,13 +11136,15 @@
 }
 
 func (self *BsnTlvVfi) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10384,13 +11184,15 @@
 }
 
 func (self *BsnTlvVfpClassId) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10420,11 +11222,13 @@
 }
 
 func (self *BsnTlvVirtual) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10460,6 +11264,7 @@
 }
 
 func (self *BsnTlvVlanMacList) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10469,8 +11274,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10516,13 +11322,15 @@
 }
 
 func (self *BsnTlvVlanPcp) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10562,13 +11370,15 @@
 }
 
 func (self *BsnTlvVlanVid) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10608,13 +11418,15 @@
 }
 
 func (self *BsnTlvVlanVidMask) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10654,13 +11466,15 @@
 }
 
 func (self *BsnTlvVni) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10700,13 +11514,15 @@
 }
 
 func (self *BsnTlvVpnKey) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10746,13 +11562,15 @@
 }
 
 func (self *BsnTlvVrf) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10782,11 +11600,13 @@
 }
 
 func (self *BsnTlvVxlanEgressLag) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnTlv.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10895,6 +11715,7 @@
 }
 
 func (self *BsnVlanCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint16(uint16(self.VlanVid))
@@ -10904,8 +11725,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -11118,6 +11940,7 @@
 }
 
 func (self *BsnVportL2Gre) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnVport.Serialize(encoder); err != nil {
 		return err
 	}
@@ -11135,8 +11958,9 @@
 	encoder.PutUint32(uint32(self.Vpn))
 	encoder.PutUint32(uint32(self.RateLimit))
 	encoder.Write([]byte(self.IfName))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -11238,6 +12062,7 @@
 }
 
 func (self *BsnVportQInQ) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnVport.Serialize(encoder); err != nil {
 		return err
 	}
@@ -11248,8 +12073,9 @@
 	encoder.PutUint16(uint16(self.EgressTpid))
 	encoder.PutUint16(uint16(self.EgressVlanId))
 	encoder.Write([]byte(self.IfName))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -11313,6 +12139,7 @@
 }
 
 func (self *BsnVrfCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
@@ -11322,8 +12149,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -11415,6 +12243,7 @@
 }
 
 func (self *Bucket) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Len))
 	encoder.PutUint16(uint16(self.Weight))
@@ -11426,8 +12255,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -11594,8 +12424,6 @@
 	encoder.PutUint8(uint8(self.Type))
 	encoder.PutUint8(uint8(self.Len))
 
-	encoder.SkipAlign()
-
 	return nil
 }
 
@@ -11649,14 +12477,16 @@
 }
 
 func (self *EdPropNshMdType) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.EdPropNsh.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.MdType))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	encoder.Bytes()[3] = uint8(len(encoder.Bytes()))
+	encoder.Bytes()[startIndex+3] = uint8(length)
 
 	return nil
 }
@@ -11727,6 +12557,7 @@
 }
 
 func (self *EdPropNshTlv) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.EdPropNsh.Serialize(encoder); err != nil {
 		return err
 	}
@@ -11735,8 +12566,9 @@
 	encoder.PutUint8(uint8(self.TlvType))
 	encoder.PutUint8(uint8(self.TlvLen))
 	encoder.Write(self.Value)
+	length := len(encoder.Bytes()) - startIndex
 
-	encoder.Bytes()[3] = uint8(len(encoder.Bytes()))
+	encoder.Bytes()[startIndex+3] = uint8(length)
 
 	return nil
 }
@@ -12354,6 +13186,7 @@
 }
 
 func (self *FlowStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint8(uint8(self.TableId))
@@ -12377,8 +13210,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -12475,6 +13309,7 @@
 }
 
 func (self *GroupDescStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint8(uint8(self.GroupType))
@@ -12485,8 +13320,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -12609,6 +13445,7 @@
 }
 
 func (self *GroupStatsEntry) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
@@ -12624,8 +13461,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -12744,6 +13582,7 @@
 }
 
 func (self *HelloElemVersionbitmap) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.HelloElem.Serialize(encoder); err != nil {
 		return err
 	}
@@ -12753,8 +13592,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -12862,11 +13702,13 @@
 }
 
 func (self *InstructionIdApplyActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13026,11 +13868,13 @@
 }
 
 func (self *InstructionIdBsnArpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13056,11 +13900,13 @@
 }
 
 func (self *InstructionIdBsnAutoNegotiation) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13086,11 +13932,13 @@
 }
 
 func (self *InstructionIdBsnDeny) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13116,11 +13964,13 @@
 }
 
 func (self *InstructionIdBsnDhcpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13146,11 +13996,13 @@
 }
 
 func (self *InstructionIdBsnDirectedBroadcast) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13176,11 +14028,13 @@
 }
 
 func (self *InstructionIdBsnDisableL3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13206,11 +14060,13 @@
 }
 
 func (self *InstructionIdBsnDisableSplitHorizonCheck) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13236,11 +14092,13 @@
 }
 
 func (self *InstructionIdBsnDisableSrcMacCheck) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13266,11 +14124,13 @@
 }
 
 func (self *InstructionIdBsnDisableVlanCounters) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13296,11 +14156,13 @@
 }
 
 func (self *InstructionIdBsnHashSelect) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13326,11 +14188,13 @@
 }
 
 func (self *InstructionIdBsnInternalPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13356,11 +14220,13 @@
 }
 
 func (self *InstructionIdBsnNdpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13386,11 +14252,13 @@
 }
 
 func (self *InstructionIdBsnPacketOfDeath) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13416,11 +14284,13 @@
 }
 
 func (self *InstructionIdBsnPermit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13446,11 +14316,13 @@
 }
 
 func (self *InstructionIdBsnPrioritizePdus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13476,11 +14348,13 @@
 }
 
 func (self *InstructionIdBsnRequireVlanXlate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13506,11 +14380,13 @@
 }
 
 func (self *InstructionIdBsnSpanDestination) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionIdBsn.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13536,11 +14412,13 @@
 }
 
 func (self *InstructionIdClearActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13566,11 +14444,13 @@
 }
 
 func (self *InstructionIdGotoTable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13596,11 +14476,13 @@
 }
 
 func (self *InstructionIdMeter) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13626,11 +14508,13 @@
 }
 
 func (self *InstructionIdWriteActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13656,11 +14540,13 @@
 }
 
 func (self *InstructionIdWriteMetadata) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionId.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13715,6 +14601,7 @@
 }
 
 func (self *MatchV3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Type))
 	encoder.PutUint16(uint16(self.Length))
@@ -13723,10 +14610,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -13854,6 +14743,7 @@
 }
 
 func (self *MeterBandDrop) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.MeterBand.Serialize(encoder); err != nil {
 		return err
 	}
@@ -13861,8 +14751,9 @@
 	encoder.PutUint32(uint32(self.Rate))
 	encoder.PutUint32(uint32(self.BurstSize))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13924,6 +14815,7 @@
 }
 
 func (self *MeterBandDscpRemark) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.MeterBand.Serialize(encoder); err != nil {
 		return err
 	}
@@ -13932,8 +14824,9 @@
 	encoder.PutUint32(uint32(self.BurstSize))
 	encoder.PutUint8(uint8(self.PrecLevel))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -13996,6 +14889,7 @@
 }
 
 func (self *MeterBandExperimenter) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.MeterBand.Serialize(encoder); err != nil {
 		return err
 	}
@@ -14003,8 +14897,9 @@
 	encoder.PutUint32(uint32(self.Rate))
 	encoder.PutUint32(uint32(self.BurstSize))
 	encoder.PutUint32(uint32(self.Experimenter))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -14125,6 +15020,7 @@
 }
 
 func (self *MeterConfig) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint16(uint16(self.Flags))
@@ -14134,8 +15030,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -14345,6 +15242,7 @@
 }
 
 func (self *MeterStats) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint32(uint32(self.MeterId))
 	encoder.PutUint16(uint16(self.Len))
@@ -14359,8 +15257,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[4:6], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+4:startIndex+6], uint16(length))
 
 	return nil
 }
@@ -14417,14 +15316,17 @@
 }
 
 func (self *NiciraMatch) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	for _, obj := range self.NxmEntries {
 		if err := obj.Serialize(encoder); err != nil {
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -14608,6 +15510,7 @@
 }
 
 func (self *NiciraFlowStats) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint8(uint8(self.TableId))
@@ -14632,8 +15535,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -14846,6 +15750,7 @@
 }
 
 func (self *NiciraFlowUpdateFullAdd) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil {
 		return err
 	}
@@ -14867,8 +15772,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -15010,6 +15916,7 @@
 }
 
 func (self *NiciraFlowUpdateFullDeleted) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil {
 		return err
 	}
@@ -15031,8 +15938,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -15174,6 +16082,7 @@
 }
 
 func (self *NiciraFlowUpdateFullModified) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil {
 		return err
 	}
@@ -15195,8 +16104,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
@@ -30724,6 +31634,7 @@
 }
 
 func (self *PacketQueue) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint32(uint32(self.QueueId))
 	self.Port.Serialize(encoder)
@@ -30734,8 +31645,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[8:10], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+8:startIndex+10], uint16(length))
 
 	return nil
 }
@@ -31272,6 +32184,7 @@
 }
 
 func (self *QueuePropMaxRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.QueueProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31279,8 +32192,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint16(uint16(self.Rate))
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -31322,6 +32236,7 @@
 }
 
 func (self *QueuePropMinRate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.QueueProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31329,8 +32244,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint16(uint16(self.Rate))
 	encoder.Write(bytes.Repeat([]byte{0}, 6))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -31572,6 +32488,7 @@
 }
 
 func (self *TableFeaturePropApplyActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31581,10 +32498,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -31631,6 +32550,7 @@
 }
 
 func (self *TableFeaturePropApplyActionsMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31640,10 +32560,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -31690,6 +32612,7 @@
 }
 
 func (self *TableFeaturePropApplySetfield) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31699,10 +32622,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -31749,6 +32674,7 @@
 }
 
 func (self *TableFeaturePropApplySetfieldMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31758,10 +32684,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -31825,8 +32753,6 @@
 	encoder.PutUint32(uint32(self.Experimenter))
 	encoder.PutUint32(uint32(self.Subtype))
 
-	encoder.SkipAlign()
-
 	return nil
 }
 
@@ -31886,8 +32812,6 @@
 	encoder.PutUint32(uint32(self.Experimenter))
 	encoder.PutUint32(uint32(self.Subtype))
 
-	encoder.SkipAlign()
-
 	return nil
 }
 
@@ -31930,6 +32854,7 @@
 }
 
 func (self *TableFeaturePropInstructions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31939,10 +32864,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -31989,6 +32916,7 @@
 }
 
 func (self *TableFeaturePropInstructionsMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -31998,10 +32926,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32048,6 +32978,7 @@
 }
 
 func (self *TableFeaturePropMatch) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32057,10 +32988,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32107,6 +33040,7 @@
 }
 
 func (self *TableFeaturePropNextTables) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32116,10 +33050,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32166,6 +33102,7 @@
 }
 
 func (self *TableFeaturePropNextTablesMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32175,10 +33112,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32225,6 +33164,7 @@
 }
 
 func (self *TableFeaturePropWildcards) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32234,10 +33174,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32284,6 +33226,7 @@
 }
 
 func (self *TableFeaturePropWriteActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32293,10 +33236,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32343,6 +33288,7 @@
 }
 
 func (self *TableFeaturePropWriteActionsMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32352,10 +33298,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32402,6 +33350,7 @@
 }
 
 func (self *TableFeaturePropWriteSetfield) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32411,10 +33360,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32461,6 +33412,7 @@
 }
 
 func (self *TableFeaturePropWriteSetfieldMiss) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.TableFeatureProp.Serialize(encoder); err != nil {
 		return err
 	}
@@ -32470,10 +33422,12 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
+	alignedLength := ((length + 7) / 8 * 8)
 
-	encoder.SkipAlign()
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
 
 	return nil
 }
@@ -32589,6 +33543,7 @@
 }
 
 func (self *TableFeatures) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 
 	encoder.PutUint16(uint16(self.Length))
 	encoder.PutUint8(uint8(self.TableId))
@@ -32603,8 +33558,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+0:startIndex+2], uint16(length))
 
 	return nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/const.go b/vendor/github.com/opencord/goloxi/of13/const.go
similarity index 97%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/const.go
rename to vendor/github.com/opencord/goloxi/of13/const.go
index f1e830e..a31015a 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/const.go
+++ b/vendor/github.com/opencord/goloxi/of13/const.go
@@ -617,6 +617,20 @@
 }
 
 const (
+	// Identifiers from group ofp_bsn_cml
+	BSNCmlNone       = 0 // OFP_BSN_CML_NONE
+	BSNCmlCpuDrop    = 1 // OFP_BSN_CML_CPU_DROP
+	BSNCmlForward    = 2 // OFP_BSN_CML_FORWARD
+	BSNCmlCpuForward = 3 // OFP_BSN_CML_CPU_FORWARD
+)
+
+type BsnCml uint16
+
+func (self BsnCml) MarshalJSON() ([]byte, error) {
+	return []byte(fmt.Sprintf("%d", self)), nil
+}
+
+const (
 	// Identifiers from group ofp_bsn_controller_connection_state
 	BSNControllerConnectionStateDisconnected = 0 // OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED
 	BSNControllerConnectionStateConnected    = 1 // OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED
@@ -925,30 +939,31 @@
 
 const (
 	// Identifiers from group ofp_bsn_pktin_flag
-	BSNPktinFlagPdu             = 1       // OFP_BSN_PKTIN_FLAG_PDU
-	BSNPktinFlagNewHost         = 2       // OFP_BSN_PKTIN_FLAG_NEW_HOST
-	BSNPktinFlagStationMove     = 4       // OFP_BSN_PKTIN_FLAG_STATION_MOVE
-	BSNPktinFlagARP             = 8       // OFP_BSN_PKTIN_FLAG_ARP
-	BSNPktinFlagDhcp            = 16      // OFP_BSN_PKTIN_FLAG_DHCP
-	BSNPktinFlagL2Cpu           = 32      // OFP_BSN_PKTIN_FLAG_L2_CPU
-	BSNPktinFlagDebug           = 64      // OFP_BSN_PKTIN_FLAG_DEBUG
-	BSNPktinFlagTtlExpired      = 128     // OFP_BSN_PKTIN_FLAG_TTL_EXPIRED
-	BSNPktinFlagL3Miss          = 256     // OFP_BSN_PKTIN_FLAG_L3_MISS
-	BSNPktinFlagL3Cpu           = 512     // OFP_BSN_PKTIN_FLAG_L3_CPU
-	BSNPktinFlagIngressAcl      = 1024    // OFP_BSN_PKTIN_FLAG_INGRESS_ACL
-	BSNPktinFlagSflow           = 2048    // OFP_BSN_PKTIN_FLAG_SFLOW
-	BSNPktinFlagARPCache        = 4096    // OFP_BSN_PKTIN_FLAG_ARP_CACHE
-	BSNPktinFlagARPTarget       = 8192    // OFP_BSN_PKTIN_FLAG_ARP_TARGET
-	BSNPktinFlagIgmp            = 16384   // OFP_BSN_PKTIN_FLAG_IGMP
-	BSNPktinFlagPim             = 32768   // OFP_BSN_PKTIN_FLAG_PIM
-	BSNPktinFlagVxlanSipMiss    = 65536   // OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS
-	BSNPktinFlagMcReserved      = 131072  // OFP_BSN_PKTIN_FLAG_MC_RESERVED
-	BSNPktinFlagAnalytics       = 262144  // OFP_BSN_PKTIN_FLAG_ANALYTICS
-	BSNPktinFlagIcmpv6          = 524288  // OFP_BSN_PKTIN_FLAG_ICMPV6
-	BSNPktinFlagIngressAclLocal = 1048576 // OFP_BSN_PKTIN_FLAG_INGRESS_ACL_LOCAL
-	BSNPktinFlagIpmcMiss        = 2097152 // OFP_BSN_PKTIN_FLAG_IPMC_MISS
-	BSNPktinFlagIpmcRpfFailed   = 4194304 // OFP_BSN_PKTIN_FLAG_IPMC_RPF_FAILED
-	BSNPktinFlagBfdSlowpath     = 8388608 // OFP_BSN_PKTIN_FLAG_BFD_SLOWPATH
+	BSNPktinFlagPdu             = 1        // OFP_BSN_PKTIN_FLAG_PDU
+	BSNPktinFlagNewHost         = 2        // OFP_BSN_PKTIN_FLAG_NEW_HOST
+	BSNPktinFlagStationMove     = 4        // OFP_BSN_PKTIN_FLAG_STATION_MOVE
+	BSNPktinFlagARP             = 8        // OFP_BSN_PKTIN_FLAG_ARP
+	BSNPktinFlagDhcp            = 16       // OFP_BSN_PKTIN_FLAG_DHCP
+	BSNPktinFlagL2Cpu           = 32       // OFP_BSN_PKTIN_FLAG_L2_CPU
+	BSNPktinFlagDebug           = 64       // OFP_BSN_PKTIN_FLAG_DEBUG
+	BSNPktinFlagTtlExpired      = 128      // OFP_BSN_PKTIN_FLAG_TTL_EXPIRED
+	BSNPktinFlagL3Miss          = 256      // OFP_BSN_PKTIN_FLAG_L3_MISS
+	BSNPktinFlagL3Cpu           = 512      // OFP_BSN_PKTIN_FLAG_L3_CPU
+	BSNPktinFlagIngressAcl      = 1024     // OFP_BSN_PKTIN_FLAG_INGRESS_ACL
+	BSNPktinFlagSflow           = 2048     // OFP_BSN_PKTIN_FLAG_SFLOW
+	BSNPktinFlagARPCache        = 4096     // OFP_BSN_PKTIN_FLAG_ARP_CACHE
+	BSNPktinFlagARPTarget       = 8192     // OFP_BSN_PKTIN_FLAG_ARP_TARGET
+	BSNPktinFlagIgmp            = 16384    // OFP_BSN_PKTIN_FLAG_IGMP
+	BSNPktinFlagPim             = 32768    // OFP_BSN_PKTIN_FLAG_PIM
+	BSNPktinFlagVxlanSipMiss    = 65536    // OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS
+	BSNPktinFlagMcReserved      = 131072   // OFP_BSN_PKTIN_FLAG_MC_RESERVED
+	BSNPktinFlagAnalytics       = 262144   // OFP_BSN_PKTIN_FLAG_ANALYTICS
+	BSNPktinFlagIcmpv6          = 524288   // OFP_BSN_PKTIN_FLAG_ICMPV6
+	BSNPktinFlagIngressAclLocal = 1048576  // OFP_BSN_PKTIN_FLAG_INGRESS_ACL_LOCAL
+	BSNPktinFlagIpmcMiss        = 2097152  // OFP_BSN_PKTIN_FLAG_IPMC_MISS
+	BSNPktinFlagIpmcRpfFailed   = 4194304  // OFP_BSN_PKTIN_FLAG_IPMC_RPF_FAILED
+	BSNPktinFlagBfdSlowpath     = 8388608  // OFP_BSN_PKTIN_FLAG_BFD_SLOWPATH
+	BSNPktinFlagSflowEgress     = 16777216 // OFP_BSN_PKTIN_FLAG_SFLOW_EGRESS
 )
 
 type BsnPktinFlag uint64
@@ -1027,6 +1042,9 @@
 	if self&BSNPktinFlagBfdSlowpath == BSNPktinFlagBfdSlowpath {
 		flags = append(flags, "\"BfdSlowpath\": true")
 	}
+	if self&BSNPktinFlagSflowEgress == BSNPktinFlagSflowEgress {
+		flags = append(flags, "\"SflowEgress\": true")
+	}
 	return []byte("{" + strings.Join(flags, ", ") + "}"), nil
 }
 
@@ -1295,6 +1313,7 @@
 const (
 	// Identifiers from group ofp_bsn_tunnel_type
 	BSNTunnelL2Gre = 1 // OFP_BSN_TUNNEL_L2GRE
+	BSNTunnelVxlan = 2 // OFP_BSN_TUNNEL_VXLAN
 )
 
 type BsnTunnelType uint64
@@ -1302,7 +1321,10 @@
 func (self BsnTunnelType) MarshalJSON() ([]byte, error) {
 	var flags []string
 	if self&BSNTunnelL2Gre == BSNTunnelL2Gre {
-		flags = append(flags, "\"BSNTunnelL2Gre\": true")
+		flags = append(flags, "\"L2Gre\": true")
+	}
+	if self&BSNTunnelVxlan == BSNTunnelVxlan {
+		flags = append(flags, "\"Vxlan\": true")
 	}
 	return []byte("{" + strings.Join(flags, ", ") + "}"), nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/instruction.go b/vendor/github.com/opencord/goloxi/of13/instruction.go
similarity index 88%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/instruction.go
rename to vendor/github.com/opencord/goloxi/of13/instruction.go
index 5b52376..28dc5fc 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/instruction.go
+++ b/vendor/github.com/opencord/goloxi/of13/instruction.go
@@ -14,7 +14,7 @@
 	"encoding/binary"
 	"fmt"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type Instruction struct {
@@ -108,6 +108,7 @@
 }
 
 func (self *InstructionApplyActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
@@ -118,8 +119,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -293,13 +295,15 @@
 }
 
 func (self *InstructionBsnArpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -329,13 +333,15 @@
 }
 
 func (self *InstructionBsnAutoNegotiation) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -365,13 +371,15 @@
 }
 
 func (self *InstructionBsnDeny) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -401,13 +409,15 @@
 }
 
 func (self *InstructionBsnDhcpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -437,13 +447,15 @@
 }
 
 func (self *InstructionBsnDirectedBroadcast) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -473,13 +485,15 @@
 }
 
 func (self *InstructionBsnDisableL3) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -509,13 +523,15 @@
 }
 
 func (self *InstructionBsnDisableSplitHorizonCheck) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -545,13 +561,15 @@
 }
 
 func (self *InstructionBsnDisableSrcMacCheck) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -581,13 +599,15 @@
 }
 
 func (self *InstructionBsnDisableVlanCounters) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -627,13 +647,15 @@
 }
 
 func (self *InstructionBsnHashSelect) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Flags))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -673,13 +695,15 @@
 }
 
 func (self *InstructionBsnInternalPriority) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Value))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -709,13 +733,15 @@
 }
 
 func (self *InstructionBsnNdpOffload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -745,13 +771,15 @@
 }
 
 func (self *InstructionBsnPacketOfDeath) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -781,13 +809,15 @@
 }
 
 func (self *InstructionBsnPermit) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -817,13 +847,15 @@
 }
 
 func (self *InstructionBsnPrioritizePdus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -853,13 +885,15 @@
 }
 
 func (self *InstructionBsnRequireVlanXlate) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -889,13 +923,15 @@
 }
 
 func (self *InstructionBsnSpanDestination) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.InstructionBsn.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -925,13 +961,15 @@
 }
 
 func (self *InstructionClearActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -971,14 +1009,16 @@
 }
 
 func (self *InstructionGotoTable) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.TableId))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1019,13 +1059,15 @@
 }
 
 func (self *InstructionMeter) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.MeterId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1065,6 +1107,7 @@
 }
 
 func (self *InstructionWriteActions) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1075,8 +1118,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1136,6 +1180,7 @@
 }
 
 func (self *InstructionWriteMetadata) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Instruction.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1143,8 +1188,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint64(uint64(self.Metadata))
 	encoder.PutUint64(uint64(self.MetadataMask))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/message.go b/vendor/github.com/opencord/goloxi/of13/message.go
similarity index 89%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/message.go
rename to vendor/github.com/opencord/goloxi/of13/message.go
index 3df8162..e627a9d 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/message.go
+++ b/vendor/github.com/opencord/goloxi/of13/message.go
@@ -15,7 +15,7 @@
 	"fmt"
 	"net"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type Header struct {
@@ -304,6 +304,7 @@
 }
 
 func (self *AggregateStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -313,8 +314,9 @@
 	encoder.PutUint64(uint64(self.ByteCount))
 	encoder.PutUint32(uint32(self.FlowCount))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -499,6 +501,7 @@
 }
 
 func (self *AggregateStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -515,7 +518,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -617,6 +622,7 @@
 }
 
 func (self *AsyncGetReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -627,8 +633,9 @@
 	encoder.PutUint32(uint32(self.PortStatusMaskSlave))
 	encoder.PutUint32(uint32(self.FlowRemovedMaskEqualMaster))
 	encoder.PutUint32(uint32(self.FlowRemovedMaskSlave))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -663,11 +670,13 @@
 }
 
 func (self *AsyncGetRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -753,6 +762,7 @@
 }
 
 func (self *AsyncSet) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -763,8 +773,9 @@
 	encoder.PutUint32(uint32(self.PortStatusMaskSlave))
 	encoder.PutUint32(uint32(self.FlowRemovedMaskEqualMaster))
 	encoder.PutUint32(uint32(self.FlowRemovedMaskSlave))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -898,14 +909,16 @@
 }
 
 func (self *BadActionErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -956,14 +969,16 @@
 }
 
 func (self *BadInstructionErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1014,14 +1029,16 @@
 }
 
 func (self *BadMatchErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1072,14 +1089,16 @@
 }
 
 func (self *BadRequestErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1110,11 +1129,13 @@
 }
 
 func (self *BarrierReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1140,11 +1161,13 @@
 }
 
 func (self *BarrierRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1396,6 +1419,7 @@
 }
 
 func (self *BsnArpIdle) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1403,8 +1427,9 @@
 	encoder.PutUint16(uint16(self.VlanVid))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.Write(self.Ipv4Addr.To4())
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1562,13 +1587,15 @@
 }
 
 func (self *BsnBwClearDataReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1598,11 +1625,13 @@
 }
 
 func (self *BsnBwClearDataRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1638,13 +1667,15 @@
 }
 
 func (self *BsnBwEnableGetReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enabled))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1674,11 +1705,13 @@
 }
 
 func (self *BsnBwEnableGetRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1724,14 +1757,16 @@
 }
 
 func (self *BsnBwEnableSetReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enable))
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1772,13 +1807,15 @@
 }
 
 func (self *BsnBwEnableSetRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enable))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1818,6 +1855,7 @@
 }
 
 func (self *BsnControllerConnectionsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -1827,8 +1865,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -1864,11 +1903,13 @@
 }
 
 func (self *BsnControllerConnectionsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2036,6 +2077,7 @@
 }
 
 func (self *BsnDebugCounterDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2045,8 +2087,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2214,11 +2257,13 @@
 }
 
 func (self *BsnDebugCounterDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2254,6 +2299,7 @@
 }
 
 func (self *BsnDebugCounterStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2263,8 +2309,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2300,11 +2347,13 @@
 }
 
 func (self *BsnDebugCounterStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2330,11 +2379,13 @@
 }
 
 func (self *BsnError) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnBaseError.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2370,6 +2421,7 @@
 }
 
 func (self *BsnFlowChecksumBucketStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2379,8 +2431,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2426,13 +2479,15 @@
 }
 
 func (self *BsnFlowChecksumBucketStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.TableId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2502,6 +2557,7 @@
 }
 
 func (self *BsnFlowIdle) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2514,7 +2570,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2562,13 +2620,15 @@
 }
 
 func (self *BsnFlowIdleEnableGetReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enabled))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2598,11 +2658,13 @@
 }
 
 func (self *BsnFlowIdleEnableGetRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2648,14 +2710,16 @@
 }
 
 func (self *BsnFlowIdleEnableSetReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enable))
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2696,13 +2760,15 @@
 }
 
 func (self *BsnFlowIdleEnableSetRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Enable))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2742,6 +2808,7 @@
 }
 
 func (self *BsnGenericStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2751,8 +2818,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2808,6 +2876,7 @@
 }
 
 func (self *BsnGenericStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2818,8 +2887,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2869,6 +2939,7 @@
 }
 
 func (self *BsnGentableBucketStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2878,8 +2949,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2925,13 +2997,15 @@
 }
 
 func (self *BsnGentableBucketStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.TableId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -2991,6 +3065,7 @@
 }
 
 func (self *BsnGentableClearReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -2999,8 +3074,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint32(uint32(self.DeletedCount))
 	encoder.PutUint32(uint32(self.ErrorCount))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3063,6 +3139,7 @@
 }
 
 func (self *BsnGentableClearRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3071,8 +3148,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	self.Checksum.Serialize(encoder)
 	self.ChecksumMask.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3115,6 +3193,7 @@
 }
 
 func (self *BsnGentableDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3124,8 +3203,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3161,11 +3241,13 @@
 }
 
 func (self *BsnGentableDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3241,6 +3323,7 @@
 }
 
 func (self *BsnGentableEntryAdd) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3258,8 +3341,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3273,7 +3357,8 @@
 	_bsngentableentryadd.KeyLength = uint16(decoder.ReadUint16())
 	_bsngentableentryadd.Checksum.Decode(decoder)
 
-	for i := 0; i < int(_bsngentableentryadd.KeyLength); i++ {
+	end := decoder.Offset() + int(_bsngentableentryadd.KeyLength)
+	for decoder.Offset() < end {
 		item, err := DecodeBsnTlv(decoder)
 		if err != nil {
 			return nil, err
@@ -3331,6 +3416,7 @@
 }
 
 func (self *BsnGentableEntryDelete) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3341,8 +3427,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3392,6 +3479,7 @@
 }
 
 func (self *BsnGentableEntryDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3401,8 +3489,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3468,6 +3557,7 @@
 }
 
 func (self *BsnGentableEntryDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3476,8 +3566,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	self.Checksum.Serialize(encoder)
 	self.ChecksumMask.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3520,6 +3611,7 @@
 }
 
 func (self *BsnGentableEntryStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3529,8 +3621,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3596,6 +3689,7 @@
 }
 
 func (self *BsnGentableEntryStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3604,8 +3698,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	self.Checksum.Serialize(encoder)
 	self.ChecksumMask.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3658,14 +3753,16 @@
 }
 
 func (self *BsnGentableError) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnBaseError.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.ErrorCode))
 	encoder.PutUint16(uint16(self.TableId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3716,6 +3813,7 @@
 }
 
 func (self *BsnGentableSetBucketsSize) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3723,8 +3821,9 @@
 	encoder.PutUint16(uint16(self.TableId))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint32(uint32(self.BucketsSize))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3766,6 +3865,7 @@
 }
 
 func (self *BsnGentableStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3775,8 +3875,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3812,11 +3913,13 @@
 }
 
 func (self *BsnGentableStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3852,6 +3955,7 @@
 }
 
 func (self *BsnGetInterfacesReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -3861,8 +3965,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3898,11 +4003,13 @@
 }
 
 func (self *BsnGetInterfacesRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3938,14 +4045,16 @@
 }
 
 func (self *BsnGetMirroringReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.ReportMirrorPorts))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -3986,14 +4095,16 @@
 }
 
 func (self *BsnGetMirroringRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.ReportMirrorPorts))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4034,13 +4145,15 @@
 }
 
 func (self *BsnGetSwitchPipelineReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write([]byte(self.Pipeline))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4070,11 +4183,13 @@
 }
 
 func (self *BsnGetSwitchPipelineRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4120,14 +4235,16 @@
 }
 
 func (self *BsnImageDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write([]byte(self.ImageChecksum))
 	encoder.Write([]byte(self.StartupConfigChecksum))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4158,11 +4275,13 @@
 }
 
 func (self *BsnImageDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4308,6 +4427,7 @@
 }
 
 func (self *BsnLacpConvergenceNotif) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4325,8 +4445,9 @@
 	encoder.PutUint16(uint16(self.PartnerPortPriority))
 	encoder.PutUint16(uint16(self.PartnerPortNum))
 	encoder.PutUint16(uint16(self.PartnerKey))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4378,6 +4499,7 @@
 }
 
 func (self *BsnLacpStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4387,8 +4509,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4424,11 +4547,13 @@
 }
 
 func (self *BsnLacpStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4474,14 +4599,16 @@
 }
 
 func (self *BsnLog) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.Loglevel))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4522,13 +4649,15 @@
 }
 
 func (self *BsnLuaCommandReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4565,13 +4694,15 @@
 }
 
 func (self *BsnLuaCommandRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4608,13 +4739,15 @@
 }
 
 func (self *BsnLuaNotification) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4671,6 +4804,7 @@
 }
 
 func (self *BsnLuaUpload) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4678,8 +4812,9 @@
 	encoder.PutUint16(uint16(self.Flags))
 	encoder.Write([]byte(self.Filename))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4741,6 +4876,7 @@
 }
 
 func (self *BsnPduRxReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4748,8 +4884,9 @@
 	encoder.PutUint32(uint32(self.Status))
 	self.PortNo.Serialize(encoder)
 	encoder.PutUint8(uint8(self.SlotNum))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4821,6 +4958,7 @@
 }
 
 func (self *BsnPduRxRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4830,8 +4968,9 @@
 	encoder.PutUint8(uint8(self.SlotNum))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4885,14 +5024,16 @@
 }
 
 func (self *BsnPduRxTimeout) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.PortNo.Serialize(encoder)
 	encoder.PutUint8(uint8(self.SlotNum))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -4953,6 +5094,7 @@
 }
 
 func (self *BsnPduTxReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -4960,8 +5102,9 @@
 	encoder.PutUint32(uint32(self.Status))
 	self.PortNo.Serialize(encoder)
 	encoder.PutUint8(uint8(self.SlotNum))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5033,6 +5176,7 @@
 }
 
 func (self *BsnPduTxRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5042,8 +5186,9 @@
 	encoder.PutUint8(uint8(self.SlotNum))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5087,6 +5232,7 @@
 }
 
 func (self *BsnPortCounterStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5096,8 +5242,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5143,13 +5290,15 @@
 }
 
 func (self *BsnPortCounterStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.PortNo.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5209,6 +5358,7 @@
 }
 
 func (self *BsnRoleStatus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5217,8 +5367,9 @@
 	encoder.PutUint8(uint8(self.Reason))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
 	encoder.PutUint64(uint64(self.GenerationId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5271,14 +5422,16 @@
 }
 
 func (self *BsnSetAuxCxnsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.NumAux))
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5319,13 +5472,15 @@
 }
 
 func (self *BsnSetAuxCxnsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.NumAux))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5375,14 +5530,16 @@
 }
 
 func (self *BsnSetLacpReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
 	self.PortNo.Serialize(encoder)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5483,6 +5640,7 @@
 }
 
 func (self *BsnSetLacpRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5495,8 +5653,9 @@
 	encoder.PutUint16(uint16(self.ActorPortPriority))
 	encoder.PutUint16(uint16(self.ActorPortNum))
 	encoder.PutUint16(uint16(self.ActorKey))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5543,14 +5702,16 @@
 }
 
 func (self *BsnSetMirroring) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint8(uint8(self.ReportMirrorPorts))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5591,13 +5752,15 @@
 }
 
 func (self *BsnSetPktinSuppressionReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5677,6 +5840,7 @@
 }
 
 func (self *BsnSetPktinSuppressionRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5687,8 +5851,9 @@
 	encoder.PutUint16(uint16(self.HardTimeout))
 	encoder.PutUint16(uint16(self.Priority))
 	encoder.PutUint64(uint64(self.Cookie))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5733,13 +5898,15 @@
 }
 
 func (self *BsnSetSwitchPipelineReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5779,13 +5946,15 @@
 }
 
 func (self *BsnSetSwitchPipelineRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write([]byte(self.Pipeline))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5825,6 +5994,7 @@
 }
 
 func (self *BsnSwitchPipelineStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5834,8 +6004,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5871,11 +6042,13 @@
 }
 
 func (self *BsnSwitchPipelineStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5911,6 +6084,7 @@
 }
 
 func (self *BsnTableChecksumStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -5920,8 +6094,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -5957,11 +6132,13 @@
 }
 
 func (self *BsnTableChecksumStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6007,6 +6184,7 @@
 }
 
 func (self *BsnTableSetBucketsSize) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6015,8 +6193,9 @@
 	encoder.PutUint8(uint8(self.TableId))
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint32(uint32(self.BucketsSize))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6059,13 +6238,15 @@
 }
 
 func (self *BsnTimeReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint64(uint64(self.TimeMs))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6095,11 +6276,13 @@
 }
 
 func (self *BsnTimeRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6145,14 +6328,16 @@
 }
 
 func (self *BsnVirtualPortCreateReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
 	encoder.PutUint32(uint32(self.VportNo))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6193,6 +6378,7 @@
 }
 
 func (self *BsnVirtualPortCreateRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6201,7 +6387,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6244,13 +6432,15 @@
 }
 
 func (self *BsnVirtualPortRemoveReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Status))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6290,13 +6480,15 @@
 }
 
 func (self *BsnVirtualPortRemoveRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.VportNo))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6336,13 +6528,15 @@
 }
 
 func (self *BsnVlanCounterClear) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnHeader.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.VlanVid))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6382,6 +6576,7 @@
 }
 
 func (self *BsnVlanCounterStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6391,8 +6586,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6438,13 +6634,15 @@
 }
 
 func (self *BsnVlanCounterStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.VlanVid))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6484,6 +6682,7 @@
 }
 
 func (self *BsnVrfCounterStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6493,8 +6692,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6540,13 +6740,15 @@
 }
 
 func (self *BsnVrfCounterStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.BsnStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint32(uint32(self.Vrf))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6626,6 +6828,7 @@
 }
 
 func (self *DescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6636,8 +6839,9 @@
 	encoder.Write([]byte(self.SwDesc))
 	encoder.Write([]byte(self.SerialNum))
 	encoder.Write([]byte(self.DpDesc))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6672,13 +6876,15 @@
 }
 
 func (self *DescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6718,13 +6924,15 @@
 }
 
 func (self *EchoReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6761,13 +6969,15 @@
 }
 
 func (self *EchoRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6854,6 +7064,7 @@
 }
 
 func (self *FeaturesReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -6865,8 +7076,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.PutUint32(uint32(self.Capabilities))
 	encoder.PutUint32(uint32(self.Reserved))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -6902,11 +7114,13 @@
 }
 
 func (self *FeaturesRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7157,11 +7371,13 @@
 }
 
 func (self *FlowAdd) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.FlowMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7187,11 +7403,13 @@
 }
 
 func (self *FlowDelete) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.FlowMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7217,11 +7435,13 @@
 }
 
 func (self *FlowDeleteStrict) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.FlowMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7267,14 +7487,16 @@
 }
 
 func (self *FlowModFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7305,11 +7527,13 @@
 }
 
 func (self *FlowModify) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.FlowMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7335,11 +7559,13 @@
 }
 
 func (self *FlowModifyStrict) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.FlowMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7475,6 +7701,7 @@
 }
 
 func (self *FlowRemoved) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -7493,7 +7720,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7547,6 +7776,7 @@
 }
 
 func (self *FlowStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -7557,8 +7787,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7658,6 +7889,7 @@
 }
 
 func (self *FlowStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -7674,7 +7906,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7736,14 +7970,16 @@
 }
 
 func (self *GetConfigReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Flags))
 	encoder.PutUint16(uint16(self.MissSendLen))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7774,11 +8010,13 @@
 }
 
 func (self *GetConfigRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7910,11 +8148,13 @@
 }
 
 func (self *GroupAdd) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.GroupMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7940,11 +8180,13 @@
 }
 
 func (self *GroupDelete) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.GroupMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -7980,6 +8222,7 @@
 }
 
 func (self *GroupDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -7990,8 +8233,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8031,13 +8275,15 @@
 }
 
 func (self *GroupDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8167,6 +8413,7 @@
 }
 
 func (self *GroupFeaturesStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8182,8 +8429,9 @@
 	encoder.PutUint32(uint32(self.ActionsSelect))
 	encoder.PutUint32(uint32(self.ActionsIndirect))
 	encoder.PutUint32(uint32(self.ActionsFf))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8223,13 +8471,15 @@
 }
 
 func (self *GroupFeaturesStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8279,14 +8529,16 @@
 }
 
 func (self *GroupModFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8317,11 +8569,13 @@
 }
 
 func (self *GroupModify) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.GroupMod.Serialize(encoder); err != nil {
 		return err
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8357,6 +8611,7 @@
 }
 
 func (self *GroupStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8367,8 +8622,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8418,6 +8674,7 @@
 }
 
 func (self *GroupStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8425,8 +8682,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint32(uint32(self.GroupId))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8468,6 +8726,7 @@
 }
 
 func (self *Hello) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8477,8 +8736,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8534,14 +8794,16 @@
 }
 
 func (self *HelloFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8582,6 +8844,7 @@
 }
 
 func (self *MeterConfigStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8592,8 +8855,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8643,6 +8907,7 @@
 }
 
 func (self *MeterConfigStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8650,8 +8915,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint32(uint32(self.MeterId))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8693,6 +8959,7 @@
 }
 
 func (self *MeterFeaturesStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8702,7 +8969,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8736,13 +9005,15 @@
 }
 
 func (self *MeterFeaturesStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8812,6 +9083,7 @@
 }
 
 func (self *MeterMod) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8824,8 +9096,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8887,14 +9160,16 @@
 }
 
 func (self *MeterModFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8935,6 +9210,7 @@
 }
 
 func (self *MeterStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -8945,8 +9221,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -8996,6 +9273,7 @@
 }
 
 func (self *MeterStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9003,8 +9281,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint32(uint32(self.MeterId))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9086,6 +9365,7 @@
 }
 
 func (self *NiciraFlowMonitorReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.NiciraStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9096,8 +9376,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9197,6 +9478,7 @@
 }
 
 func (self *NiciraFlowMonitorRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ExperimenterStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9212,7 +9494,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9263,6 +9547,7 @@
 }
 
 func (self *NiciraFlowStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.NiciraStatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9273,8 +9558,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9344,6 +9630,7 @@
 }
 
 func (self *NiciraFlowStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ExperimenterStatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9353,8 +9640,9 @@
 	encoder.PutUint16(uint16(self.MatchLen))
 	encoder.PutUint8(uint8(self.TableId))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9487,6 +9775,7 @@
 }
 
 func (self *PacketIn) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9502,8 +9791,9 @@
 
 	encoder.Write(bytes.Repeat([]byte{0}, 2))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9594,6 +9884,7 @@
 }
 
 func (self *PacketOut) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9608,8 +9899,9 @@
 		}
 	}
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9624,9 +9916,9 @@
 	_packetout.ActionsLen = uint16(decoder.ReadUint16())
 	decoder.Skip(6)
 
-	for i := 0; i < int(_packetout.ActionsLen); i++ {
+	end := decoder.Offset() + int(_packetout.ActionsLen)
+	for decoder.Offset() < end {
 		item, err := DecodeAction(decoder)
-		i += int(item.GetLen())
 		if err != nil {
 			return nil, err
 		}
@@ -9664,6 +9956,7 @@
 }
 
 func (self *PortDescStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9674,8 +9967,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9715,13 +10009,15 @@
 }
 
 func (self *PortDescStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9801,6 +10097,7 @@
 }
 
 func (self *PortMod) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9813,8 +10110,9 @@
 	encoder.PutUint32(uint32(self.Mask))
 	encoder.PutUint32(uint32(self.Advertise))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9871,14 +10169,16 @@
 }
 
 func (self *PortModFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9919,6 +10219,7 @@
 }
 
 func (self *PortStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9929,8 +10230,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -9980,6 +10282,7 @@
 }
 
 func (self *PortStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -9987,8 +10290,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	self.PortNo.Serialize(encoder)
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10040,6 +10344,7 @@
 }
 
 func (self *PortStatus) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10050,7 +10355,9 @@
 		return err
 	}
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	length := len(encoder.Bytes()) - startIndex
+
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10105,6 +10412,7 @@
 }
 
 func (self *QueueGetConfigReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10116,8 +10424,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10168,14 +10477,16 @@
 }
 
 func (self *QueueGetConfigRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
 
 	self.Port.Serialize(encoder)
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10226,14 +10537,16 @@
 }
 
 func (self *QueueOpFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10274,6 +10587,7 @@
 }
 
 func (self *QueueStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10284,8 +10598,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10345,6 +10660,7 @@
 }
 
 func (self *QueueStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10352,8 +10668,9 @@
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	self.PortNo.Serialize(encoder)
 	encoder.PutUint32(uint32(self.QueueId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10405,6 +10722,7 @@
 }
 
 func (self *RoleReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10412,8 +10730,9 @@
 	encoder.PutUint32(uint32(self.Role))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint64(uint64(self.GenerationId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10465,6 +10784,7 @@
 }
 
 func (self *RoleRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10472,8 +10792,9 @@
 	encoder.PutUint32(uint32(self.Role))
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
 	encoder.PutUint64(uint64(self.GenerationId))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10525,14 +10846,16 @@
 }
 
 func (self *RoleRequestFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10583,14 +10906,16 @@
 }
 
 func (self *SetConfig) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Flags))
 	encoder.PutUint16(uint16(self.MissSendLen))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10641,14 +10966,16 @@
 }
 
 func (self *SwitchConfigFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10699,14 +11026,16 @@
 }
 
 func (self *TableFeaturesFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10747,6 +11076,7 @@
 }
 
 func (self *TableFeaturesStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10757,8 +11087,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10808,6 +11139,7 @@
 }
 
 func (self *TableFeaturesStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10818,8 +11150,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10879,6 +11212,7 @@
 }
 
 func (self *TableMod) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.Header.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10886,8 +11220,9 @@
 	encoder.PutUint8(uint8(self.TableId))
 	encoder.Write(bytes.Repeat([]byte{0}, 3))
 	encoder.PutUint32(uint32(self.Config))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10939,14 +11274,16 @@
 }
 
 func (self *TableModFailedErrorMsg) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.ErrorMsg.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.PutUint16(uint16(self.Code))
 	encoder.Write(self.Data)
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -10987,6 +11324,7 @@
 }
 
 func (self *TableStatsReply) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsReply.Serialize(encoder); err != nil {
 		return err
 	}
@@ -10997,8 +11335,9 @@
 			return err
 		}
 	}
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
@@ -11038,13 +11377,15 @@
 }
 
 func (self *TableStatsRequest) Serialize(encoder *goloxi.Encoder) error {
+	startIndex := len(encoder.Bytes())
 	if err := self.StatsRequest.Serialize(encoder); err != nil {
 		return err
 	}
 
 	encoder.Write(bytes.Repeat([]byte{0}, 4))
+	length := len(encoder.Bytes()) - startIndex
 
-	binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes())))
+	binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
 
 	return nil
 }
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/oxm.go b/vendor/github.com/opencord/goloxi/of13/oxm.go
similarity index 99%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/oxm.go
rename to vendor/github.com/opencord/goloxi/of13/oxm.go
index 90d07c5..f9d229f 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/oxm.go
+++ b/vendor/github.com/opencord/goloxi/of13/oxm.go
@@ -13,7 +13,7 @@
 	"fmt"
 	"net"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 type Oxm struct {
diff --git a/vendor/github.com/donNewtonAlpha/goloxi/of13/types.go b/vendor/github.com/opencord/goloxi/of13/types.go
similarity index 90%
rename from vendor/github.com/donNewtonAlpha/goloxi/of13/types.go
rename to vendor/github.com/opencord/goloxi/of13/types.go
index 527f463..3d6cfd0 100644
--- a/vendor/github.com/donNewtonAlpha/goloxi/of13/types.go
+++ b/vendor/github.com/opencord/goloxi/of13/types.go
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+ * Copyright (c) 2011, 2012 Open Networking Foundation
+ * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler.
+ * Copyright 2018, Red Hat, Inc.
+ */
 package of13
 
 import (
@@ -5,7 +11,7 @@
 	"fmt"
 	"net"
 
-	"github.com/donNewtonAlpha/goloxi"
+	"github.com/opencord/goloxi"
 )
 
 // TODO: set real types
diff --git a/vendor/modules.txt b/vendor/modules.txt
index c8c15c6..8a3e3ce 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -6,9 +6,6 @@
 github.com/coreos/pkg/capnslog
 # github.com/davecgh/go-spew v1.1.1
 github.com/davecgh/go-spew/spew
-# github.com/donNewtonAlpha/goloxi v1.0.0
-github.com/donNewtonAlpha/goloxi
-github.com/donNewtonAlpha/goloxi/of13
 # github.com/gogo/protobuf v1.3.0
 github.com/gogo/protobuf/gogoproto
 github.com/gogo/protobuf/proto
@@ -39,6 +36,9 @@
 github.com/mitchellh/go-homedir
 # github.com/mitchellh/mapstructure v1.1.2
 github.com/mitchellh/mapstructure
+# github.com/opencord/goloxi v1.0.1
+github.com/opencord/goloxi
+github.com/opencord/goloxi/of13
 # github.com/opencord/voltha-lib-go/v3 v3.1.5
 github.com/opencord/voltha-lib-go/v3/pkg/config
 github.com/opencord/voltha-lib-go/v3/pkg/db