From 4102c72bce694babd94a481b1201d33895a6f9c5 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Wed, 27 Apr 2022 18:39:03 +0200 Subject: Update generated binapi to v22.02 & makefile changes This patch does some small updates to the Makefile. * `make gen-binapi-from-code` is removed, and moves to `gen-binapi-local` * `make build` is patched to build cmd & examples * `make binapi-generator` to build the api-generator without other binaries, as they typically require its output to build. * `make gen-binapi-local` runs the locally built binapi-generator to update the local bindings. It expects ${VPP_DIR} to be set and to point to a local vpp repository checked out with the right version * `make gen-binapi-internal` runs the locally built binapi-generator to update the bindings in `internal/testbinapi/binapi2001` Regarding VPP, notable changes when moving to v22.02 are : - ControlPing moved from vpe to memclnt - CliInband went from vpe to vlib Signed-off-by: Nathan Skrzypczak Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa --- binapi/interface/interface.ba.go | 319 ++++++++++++++++++++++++++++++++++- binapi/interface/interface_rpc.ba.go | 71 +++++++- 2 files changed, 381 insertions(+), 9 deletions(-) (limited to 'binapi/interface') diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go index 7640f17..b137c71 100644 --- a/binapi/interface/interface.ba.go +++ b/binapi/interface/interface.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.5.0-dev -// VPP: 21.06-release +// VPP: 22.02-release // source: /usr/share/vpp/api/core/interface.api.json // Package interfaces contains generated bindings for API file interface.api. // // Contents: -// 59 messages +// 66 messages // package interfaces @@ -27,8 +27,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "interface" - APIVersion = "3.2.2" - VersionCrc = 0x29a0076c + APIVersion = "3.2.3" + VersionCrc = 0x13ab947a ) // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'. @@ -1567,6 +1567,78 @@ func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error { return nil } +// SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'. +type SwInterfaceSetInterfaceName struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` +} + +func (m *SwInterfaceSetInterfaceName) Reset() { *m = SwInterfaceSetInterfaceName{} } +func (*SwInterfaceSetInterfaceName) GetMessageName() string { return "sw_interface_set_interface_name" } +func (*SwInterfaceSetInterfaceName) GetCrcString() string { return "45a1d548" } +func (*SwInterfaceSetInterfaceName) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceSetInterfaceName) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 64 // m.Name + return size +} +func (m *SwInterfaceSetInterfaceName) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeString(m.Name, 64) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetInterfaceName) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Name = buf.DecodeString(64) + return nil +} + +// SwInterfaceSetInterfaceNameReply defines message 'sw_interface_set_interface_name_reply'. +type SwInterfaceSetInterfaceNameReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceSetInterfaceNameReply) Reset() { *m = SwInterfaceSetInterfaceNameReply{} } +func (*SwInterfaceSetInterfaceNameReply) GetMessageName() string { + return "sw_interface_set_interface_name_reply" +} +func (*SwInterfaceSetInterfaceNameReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetInterfaceNameReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceSetInterfaceNameReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SwInterfaceSetInterfaceNameReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'. type SwInterfaceSetIPDirectedBroadcast struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2096,6 +2168,95 @@ func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error { return nil } +// SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'. +type SwInterfaceSetTxPlacement 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"` + ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` + Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` +} + +func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} } +func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" } +func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" } +func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceSetTxPlacement) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 4 // m.QueueID + size += 4 // m.ArraySize + size += 4 * len(m.Threads) // m.Threads + return size +} +func (m *SwInterfaceSetTxPlacement) 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.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 *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.QueueID = buf.DecodeUint32() + 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 +} + +// SwInterfaceSetTxPlacementReply defines message 'sw_interface_set_tx_placement_reply'. +type SwInterfaceSetTxPlacementReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceSetTxPlacementReply) Reset() { *m = SwInterfaceSetTxPlacementReply{} } +func (*SwInterfaceSetTxPlacementReply) GetMessageName() string { + return "sw_interface_set_tx_placement_reply" +} +func (*SwInterfaceSetTxPlacementReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetTxPlacementReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceSetTxPlacementReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SwInterfaceSetTxPlacementReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'. type SwInterfaceSetUnnumbered struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2246,6 +2407,142 @@ func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error { return nil } +// 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 +} + // WantInterfaceEvents defines message 'want_interface_events'. type WantInterfaceEvents struct { EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"` @@ -2357,6 +2654,8 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e") api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_f5aec1b8") api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceSetInterfaceName)(nil), "sw_interface_set_interface_name_45a1d548") + api.RegisterMessage((*SwInterfaceSetInterfaceNameReply)(nil), "sw_interface_set_interface_name_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb") api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_c536e7eb") @@ -2371,10 +2670,15 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577") api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff") + api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439") api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804") api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1") api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceTxPlacementDetails)(nil), "sw_interface_tx_placement_details_00381a2e") + api.RegisterMessage((*SwInterfaceTxPlacementGet)(nil), "sw_interface_tx_placement_get_47250981") + api.RegisterMessage((*SwInterfaceTxPlacementGetReply)(nil), "sw_interface_tx_placement_get_reply_53b48f5d") api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08") api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804") } @@ -2421,6 +2725,8 @@ func AllMessages() []api.Message { (*SwInterfaceRxPlacementDump)(nil), (*SwInterfaceSetFlags)(nil), (*SwInterfaceSetFlagsReply)(nil), + (*SwInterfaceSetInterfaceName)(nil), + (*SwInterfaceSetInterfaceNameReply)(nil), (*SwInterfaceSetIPDirectedBroadcast)(nil), (*SwInterfaceSetIPDirectedBroadcastReply)(nil), (*SwInterfaceSetMacAddress)(nil), @@ -2435,10 +2741,15 @@ func AllMessages() []api.Message { (*SwInterfaceSetRxPlacementReply)(nil), (*SwInterfaceSetTable)(nil), (*SwInterfaceSetTableReply)(nil), + (*SwInterfaceSetTxPlacement)(nil), + (*SwInterfaceSetTxPlacementReply)(nil), (*SwInterfaceSetUnnumbered)(nil), (*SwInterfaceSetUnnumberedReply)(nil), (*SwInterfaceTagAddDel)(nil), (*SwInterfaceTagAddDelReply)(nil), + (*SwInterfaceTxPlacementDetails)(nil), + (*SwInterfaceTxPlacementGet)(nil), + (*SwInterfaceTxPlacementGetReply)(nil), (*WantInterfaceEvents)(nil), (*WantInterfaceEventsReply)(nil), } diff --git a/binapi/interface/interface_rpc.ba.go b/binapi/interface/interface_rpc.ba.go index b00a7c2..e9ea945 100644 --- a/binapi/interface/interface_rpc.ba.go +++ b/binapi/interface/interface_rpc.ba.go @@ -8,7 +8,7 @@ import ( "io" api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" + memclnt "git.fd.io/govpp.git/binapi/memclnt" ) // RPCService defines RPC service interface. @@ -32,6 +32,7 @@ type RPCService interface { SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error) SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) + SwInterfaceSetInterfaceName(ctx context.Context, in *SwInterfaceSetInterfaceName) (*SwInterfaceSetInterfaceNameReply, error) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) @@ -39,8 +40,10 @@ type RPCService interface { SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) + SwInterfaceSetTxPlacement(ctx context.Context, in *SwInterfaceSetTxPlacement) (*SwInterfaceSetTxPlacementReply, error) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) + SwInterfaceTxPlacementGet(ctx context.Context, in *SwInterfaceTxPlacementGet) (RPCService_SwInterfaceTxPlacementGetClient, error) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) } @@ -187,7 +190,7 @@ func (c *serviceClient) SwInterfaceDump(ctx context.Context, in *SwInterfaceDump if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -210,7 +213,7 @@ func (c *serviceClient_SwInterfaceDumpClient) Recv() (*SwInterfaceDetails, error switch m := msg.(type) { case *SwInterfaceDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -248,7 +251,7 @@ func (c *serviceClient) SwInterfaceRxPlacementDump(ctx context.Context, in *SwIn if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -271,7 +274,7 @@ func (c *serviceClient_SwInterfaceRxPlacementDumpClient) Recv() (*SwInterfaceRxP switch m := msg.(type) { case *SwInterfaceRxPlacementDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -291,6 +294,15 @@ func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterface return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SwInterfaceSetInterfaceName(ctx context.Context, in *SwInterfaceSetInterfaceName) (*SwInterfaceSetInterfaceNameReply, error) { + out := new(SwInterfaceSetInterfaceNameReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) { out := new(SwInterfaceSetIPDirectedBroadcastReply) err := c.conn.Invoke(ctx, in, out) @@ -354,6 +366,15 @@ func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterface return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SwInterfaceSetTxPlacement(ctx context.Context, in *SwInterfaceSetTxPlacement) (*SwInterfaceSetTxPlacementReply, error) { + out := new(SwInterfaceSetTxPlacementReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) { out := new(SwInterfaceSetUnnumberedReply) err := c.conn.Invoke(ctx, in, out) @@ -372,6 +393,46 @@ func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfac return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SwInterfaceTxPlacementGet(ctx context.Context, in *SwInterfaceTxPlacementGet) (RPCService_SwInterfaceTxPlacementGetClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_SwInterfaceTxPlacementGetClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_SwInterfaceTxPlacementGetClient interface { + Recv() (*SwInterfaceTxPlacementDetails, error) + api.Stream +} + +type serviceClient_SwInterfaceTxPlacementGetClient struct { + api.Stream +} + +func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPlacementDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *SwInterfaceTxPlacementDetails: + return m, nil + case *SwInterfaceTxPlacementGetReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) { out := new(WantInterfaceEventsReply) err := c.conn.Invoke(ctx, in, out) -- cgit 1.2.3-korg