+// SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'.
+type SwInterfaceTxPlacementDetails struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ Shared uint8 `binapi:"u8,name=shared" json:"shared,omitempty"`
+ ArraySize uint32 `binapi:"u32,name=array_size" json:"-"`
+ Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"`
+}
+
+func (m *SwInterfaceTxPlacementDetails) Reset() { *m = SwInterfaceTxPlacementDetails{} }
+func (*SwInterfaceTxPlacementDetails) GetMessageName() string {
+ return "sw_interface_tx_placement_details"
+}
+func (*SwInterfaceTxPlacementDetails) GetCrcString() string { return "00381a2e" }
+func (*SwInterfaceTxPlacementDetails) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceTxPlacementDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.QueueID
+ size += 1 // m.Shared
+ size += 4 // m.ArraySize
+ size += 4 * len(m.Threads) // m.Threads
+ return size
+}
+func (m *SwInterfaceTxPlacementDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.QueueID)
+ buf.EncodeUint8(m.Shared)
+ buf.EncodeUint32(uint32(len(m.Threads)))
+ for i := 0; i < len(m.Threads); i++ {
+ var x uint32
+ if i < len(m.Threads) {
+ x = uint32(m.Threads[i])
+ }
+ buf.EncodeUint32(x)
+ }
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.QueueID = buf.DecodeUint32()
+ m.Shared = buf.DecodeUint8()
+ m.ArraySize = buf.DecodeUint32()
+ m.Threads = make([]uint32, m.ArraySize)
+ for i := 0; i < len(m.Threads); i++ {
+ m.Threads[i] = buf.DecodeUint32()
+ }
+ return nil
+}
+
+// SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'.
+type SwInterfaceTxPlacementGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *SwInterfaceTxPlacementGet) Reset() { *m = SwInterfaceTxPlacementGet{} }
+func (*SwInterfaceTxPlacementGet) GetMessageName() string { return "sw_interface_tx_placement_get" }
+func (*SwInterfaceTxPlacementGet) GetCrcString() string { return "47250981" }
+func (*SwInterfaceTxPlacementGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceTxPlacementGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *SwInterfaceTxPlacementGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceTxPlacementGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// SwInterfaceTxPlacementGetReply defines message 'sw_interface_tx_placement_get_reply'.
+type SwInterfaceTxPlacementGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *SwInterfaceTxPlacementGetReply) Reset() { *m = SwInterfaceTxPlacementGetReply{} }
+func (*SwInterfaceTxPlacementGetReply) GetMessageName() string {
+ return "sw_interface_tx_placement_get_reply"
+}
+func (*SwInterfaceTxPlacementGetReply) GetCrcString() string { return "53b48f5d" }
+func (*SwInterfaceTxPlacementGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceTxPlacementGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *SwInterfaceTxPlacementGetReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+