X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fvhost_user%2Fvhost_user_rpc.ba.go;h=5e08bb4a1b04f7068eab67122cd97535d3ac16c7;hb=4102c72bce694babd94a481b1201d33895a6f9c5;hp=6e18a51515ff577641be721f749758e9ed0b9f2e;hpb=c94a962279858fb13eaacc689f47aed358373e44;p=govpp.git diff --git a/binapi/vhost_user/vhost_user_rpc.ba.go b/binapi/vhost_user/vhost_user_rpc.ba.go index 6e18a51..5e08bb4 100644 --- a/binapi/vhost_user/vhost_user_rpc.ba.go +++ b/binapi/vhost_user/vhost_user_rpc.ba.go @@ -8,14 +8,16 @@ 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 vhost_user. +// RPCService defines RPC service vhost_user. type RPCService interface { CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error) + CreateVhostUserIfV2(ctx context.Context, in *CreateVhostUserIfV2) (*CreateVhostUserIfV2Reply, error) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) + ModifyVhostUserIfV2(ctx context.Context, in *ModifyVhostUserIfV2) (*ModifyVhostUserIfV2Reply, error) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) } @@ -33,7 +35,16 @@ func (c *serviceClient) CreateVhostUserIf(ctx context.Context, in *CreateVhostUs if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) CreateVhostUserIfV2(ctx context.Context, in *CreateVhostUserIfV2) (*CreateVhostUserIfV2Reply, error) { + out := new(CreateVhostUserIfV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) { @@ -42,7 +53,7 @@ func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUs if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) { @@ -51,7 +62,16 @@ func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUs if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) ModifyVhostUserIfV2(ctx context.Context, in *ModifyVhostUserIfV2) (*ModifyVhostUserIfV2Reply, error) { + out := new(ModifyVhostUserIfV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) { @@ -63,7 +83,7 @@ func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInte 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 @@ -86,7 +106,11 @@ func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhost switch m := msg.(type) { case *SwInterfaceVhostUserDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: + 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)