vhost_user

package
v0.0.0-...-f91f7f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vhost_user is a generated VPP binary API for 'vhost_user' module.

It consists of:

8 enums
2 aliases
8 messages
4 services

Index

Constants

View Source
const (
	// ModuleName is the name of this module.
	ModuleName = "vhost_user"
	// APIVersion is the API version of this module.
	APIVersion = "4.0.1"
	// VersionCrc is the CRC of this module.
	VersionCrc = 0x3df14dfe
)

Variables

View Source
var IfStatusFlags_name = map[uint32]string{
	1: "IF_STATUS_API_FLAG_ADMIN_UP",
	2: "IF_STATUS_API_FLAG_LINK_UP",
}
View Source
var IfStatusFlags_value = map[string]uint32{
	"IF_STATUS_API_FLAG_ADMIN_UP": 1,
	"IF_STATUS_API_FLAG_LINK_UP":  2,
}
View Source
var IfType_name = map[uint32]string{
	0: "IF_API_TYPE_HARDWARE",
	1: "IF_API_TYPE_SUB",
	2: "IF_API_TYPE_P2P",
	3: "IF_API_TYPE_PIPE",
}
View Source
var IfType_value = map[string]uint32{
	"IF_API_TYPE_HARDWARE": 0,
	"IF_API_TYPE_SUB":      1,
	"IF_API_TYPE_P2P":      2,
	"IF_API_TYPE_PIPE":     3,
}
View Source
var LinkDuplex_name = map[uint32]string{
	0: "LINK_DUPLEX_API_UNKNOWN",
	1: "LINK_DUPLEX_API_HALF",
	2: "LINK_DUPLEX_API_FULL",
}
View Source
var LinkDuplex_value = map[string]uint32{
	"LINK_DUPLEX_API_UNKNOWN": 0,
	"LINK_DUPLEX_API_HALF":    1,
	"LINK_DUPLEX_API_FULL":    2,
}
View Source
var MtuProto_name = map[uint32]string{
	0: "MTU_PROTO_API_L3",
	1: "MTU_PROTO_API_IP4",
	2: "MTU_PROTO_API_IP6",
	3: "MTU_PROTO_API_MPLS",
}
View Source
var MtuProto_value = map[string]uint32{
	"MTU_PROTO_API_L3":   0,
	"MTU_PROTO_API_IP4":  1,
	"MTU_PROTO_API_IP6":  2,
	"MTU_PROTO_API_MPLS": 3,
}
View Source
var RxMode_name = map[uint32]string{
	0: "RX_MODE_API_UNKNOWN",
	1: "RX_MODE_API_POLLING",
	2: "RX_MODE_API_INTERRUPT",
	3: "RX_MODE_API_ADAPTIVE",
	4: "RX_MODE_API_DEFAULT",
}
View Source
var RxMode_value = map[string]uint32{
	"RX_MODE_API_UNKNOWN":   0,
	"RX_MODE_API_POLLING":   1,
	"RX_MODE_API_INTERRUPT": 2,
	"RX_MODE_API_ADAPTIVE":  3,
	"RX_MODE_API_DEFAULT":   4,
}
View Source
var SubIfFlags_name = map[uint32]string{
	1:   "SUB_IF_API_FLAG_NO_TAGS",
	2:   "SUB_IF_API_FLAG_ONE_TAG",
	4:   "SUB_IF_API_FLAG_TWO_TAGS",
	8:   "SUB_IF_API_FLAG_DOT1AD",
	16:  "SUB_IF_API_FLAG_EXACT_MATCH",
	32:  "SUB_IF_API_FLAG_DEFAULT",
	64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
	128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
	254: "SUB_IF_API_FLAG_MASK_VNET",
	256: "SUB_IF_API_FLAG_DOT1AH",
}
View Source
var SubIfFlags_value = map[string]uint32{
	"SUB_IF_API_FLAG_NO_TAGS":           1,
	"SUB_IF_API_FLAG_ONE_TAG":           2,
	"SUB_IF_API_FLAG_TWO_TAGS":          4,
	"SUB_IF_API_FLAG_DOT1AD":            8,
	"SUB_IF_API_FLAG_EXACT_MATCH":       16,
	"SUB_IF_API_FLAG_DEFAULT":           32,
	"SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
	"SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
	"SUB_IF_API_FLAG_MASK_VNET":         254,
	"SUB_IF_API_FLAG_DOT1AH":            256,
}
View Source
var VirtioNetFeaturesFirst32_name = map[uint32]string{
	1:               "VIRTIO_NET_F_API_CSUM",
	2:               "VIRTIO_NET_F_API_GUEST_CSUM",
	128:             "VIRTIO_NET_F_API_GUEST_TSO4",
	256:             "VIRTIO_NET_F_API_GUEST_TSO6",
	1024:            "VIRTIO_NET_F_API_GUEST_UFO",
	2048:            "VIRTIO_NET_F_API_HOST_TSO4",
	4096:            "VIRTIO_NET_F_API_HOST_TSO6",
	16384:           "VIRTIO_NET_F_API_HOST_UFO",
	32768:           "VIRTIO_NET_F_API_MRG_RXBUF",
	131072:          "VIRTIO_NET_F_API_CTRL_VQ",
	2.097152e+06:    "VIRTIO_NET_F_API_GUEST_ANNOUNCE",
	4.194304e+06:    "VIRTIO_NET_F_API_MQ",
	6.7108864e+07:   "VHOST_F_API_LOG_ALL",
	1.34217728e+08:  "VIRTIO_F_API_ANY_LAYOUT",
	2.68435456e+08:  "VIRTIO_F_API_INDIRECT_DESC",
	1.073741824e+09: "VHOST_USER_F_API_PROTOCOL_FEATURES",
}
View Source
var VirtioNetFeaturesFirst32_value = map[string]uint32{
	"VIRTIO_NET_F_API_CSUM":              1,
	"VIRTIO_NET_F_API_GUEST_CSUM":        2,
	"VIRTIO_NET_F_API_GUEST_TSO4":        128,
	"VIRTIO_NET_F_API_GUEST_TSO6":        256,
	"VIRTIO_NET_F_API_GUEST_UFO":         1024,
	"VIRTIO_NET_F_API_HOST_TSO4":         2048,
	"VIRTIO_NET_F_API_HOST_TSO6":         4096,
	"VIRTIO_NET_F_API_HOST_UFO":          16384,
	"VIRTIO_NET_F_API_MRG_RXBUF":         32768,
	"VIRTIO_NET_F_API_CTRL_VQ":           131072,
	"VIRTIO_NET_F_API_GUEST_ANNOUNCE":    2.097152e+06,
	"VIRTIO_NET_F_API_MQ":                4.194304e+06,
	"VHOST_F_API_LOG_ALL":                6.7108864e+07,
	"VIRTIO_F_API_ANY_LAYOUT":            1.34217728e+08,
	"VIRTIO_F_API_INDIRECT_DESC":         2.68435456e+08,
	"VHOST_USER_F_API_PROTOCOL_FEATURES": 1.073741824e+09,
}
View Source
var VirtioNetFeaturesLast32_name = map[uint32]string{
	1: "VIRTIO_F_API_VERSION_1",
}
View Source
var VirtioNetFeaturesLast32_value = map[string]uint32{
	"VIRTIO_F_API_VERSION_1": 1,
}

Functions

func AllMessages

func AllMessages() []api.Message

Messages returns list of all messages in this module.

Types

type CreateVhostUserIf

type CreateVhostUserIf struct {
	IsServer            bool
	SockFilename        string `struc:"[256]byte"`
	Renumber            bool
	DisableMrgRxbuf     bool
	DisableIndirectDesc bool
	EnableGso           bool
	EnablePacked        bool
	CustomDevInstance   uint32
	UseCustomMac        bool
	MacAddress          MacAddress
	Tag                 string `struc:"[64]byte"`
}

CreateVhostUserIf represents VPP binary API message 'create_vhost_user_if'.

func (*CreateVhostUserIf) GetCrcString

func (*CreateVhostUserIf) GetCrcString() string

func (*CreateVhostUserIf) GetMessageName

func (*CreateVhostUserIf) GetMessageName() string

func (*CreateVhostUserIf) GetMessageType

func (*CreateVhostUserIf) GetMessageType() api.MessageType

func (*CreateVhostUserIf) Reset

func (m *CreateVhostUserIf) Reset()

type CreateVhostUserIfReply

type CreateVhostUserIfReply struct {
	Retval    int32
	SwIfIndex InterfaceIndex
}

CreateVhostUserIfReply represents VPP binary API message 'create_vhost_user_if_reply'.

func (*CreateVhostUserIfReply) GetCrcString

func (*CreateVhostUserIfReply) GetCrcString() string

func (*CreateVhostUserIfReply) GetMessageName

func (*CreateVhostUserIfReply) GetMessageName() string

func (*CreateVhostUserIfReply) GetMessageType

func (*CreateVhostUserIfReply) GetMessageType() api.MessageType

func (*CreateVhostUserIfReply) Reset

func (m *CreateVhostUserIfReply) Reset()

type DeleteVhostUserIf

type DeleteVhostUserIf struct {
	SwIfIndex InterfaceIndex
}

DeleteVhostUserIf represents VPP binary API message 'delete_vhost_user_if'.

func (*DeleteVhostUserIf) GetCrcString

func (*DeleteVhostUserIf) GetCrcString() string

func (*DeleteVhostUserIf) GetMessageName

func (*DeleteVhostUserIf) GetMessageName() string

func (*DeleteVhostUserIf) GetMessageType

func (*DeleteVhostUserIf) GetMessageType() api.MessageType

func (*DeleteVhostUserIf) Reset

func (m *DeleteVhostUserIf) Reset()

type DeleteVhostUserIfReply

type DeleteVhostUserIfReply struct {
	Retval int32
}

DeleteVhostUserIfReply represents VPP binary API message 'delete_vhost_user_if_reply'.

func (*DeleteVhostUserIfReply) GetCrcString

func (*DeleteVhostUserIfReply) GetCrcString() string

func (*DeleteVhostUserIfReply) GetMessageName

func (*DeleteVhostUserIfReply) GetMessageName() string

func (*DeleteVhostUserIfReply) GetMessageType

func (*DeleteVhostUserIfReply) GetMessageType() api.MessageType

func (*DeleteVhostUserIfReply) Reset

func (m *DeleteVhostUserIfReply) Reset()

type IfStatusFlags

type IfStatusFlags uint32

IfStatusFlags represents VPP binary API enum 'if_status_flags'.

const (
	IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
	IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
)

func (IfStatusFlags) String

func (x IfStatusFlags) String() string

type IfType

type IfType uint32

IfType represents VPP binary API enum 'if_type'.

const (
	IF_API_TYPE_HARDWARE IfType = 0
	IF_API_TYPE_SUB      IfType = 1
	IF_API_TYPE_P2P      IfType = 2
	IF_API_TYPE_PIPE     IfType = 3
)

func (IfType) String

func (x IfType) String() string

type InterfaceIndex

type InterfaceIndex uint32

InterfaceIndex represents VPP binary API alias 'interface_index'.

type LinkDuplex

type LinkDuplex uint32

LinkDuplex represents VPP binary API enum 'link_duplex'.

const (
	LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
	LINK_DUPLEX_API_HALF    LinkDuplex = 1
	LINK_DUPLEX_API_FULL    LinkDuplex = 2
)

func (LinkDuplex) String

func (x LinkDuplex) String() string

type MacAddress

type MacAddress [6]uint8

MacAddress represents VPP binary API alias 'mac_address'.

type ModifyVhostUserIf

type ModifyVhostUserIf struct {
	SwIfIndex         InterfaceIndex
	IsServer          bool
	SockFilename      string `struc:"[256]byte"`
	Renumber          bool
	EnableGso         bool
	EnablePacked      bool
	CustomDevInstance uint32
}

ModifyVhostUserIf represents VPP binary API message 'modify_vhost_user_if'.

func (*ModifyVhostUserIf) GetCrcString

func (*ModifyVhostUserIf) GetCrcString() string

func (*ModifyVhostUserIf) GetMessageName

func (*ModifyVhostUserIf) GetMessageName() string

func (*ModifyVhostUserIf) GetMessageType

func (*ModifyVhostUserIf) GetMessageType() api.MessageType

func (*ModifyVhostUserIf) Reset

func (m *ModifyVhostUserIf) Reset()

type ModifyVhostUserIfReply

type ModifyVhostUserIfReply struct {
	Retval int32
}

ModifyVhostUserIfReply represents VPP binary API message 'modify_vhost_user_if_reply'.

func (*ModifyVhostUserIfReply) GetCrcString

func (*ModifyVhostUserIfReply) GetCrcString() string

func (*ModifyVhostUserIfReply) GetMessageName

func (*ModifyVhostUserIfReply) GetMessageName() string

func (*ModifyVhostUserIfReply) GetMessageType

func (*ModifyVhostUserIfReply) GetMessageType() api.MessageType

func (*ModifyVhostUserIfReply) Reset

func (m *ModifyVhostUserIfReply) Reset()

type MtuProto

type MtuProto uint32

MtuProto represents VPP binary API enum 'mtu_proto'.

const (
	MTU_PROTO_API_L3   MtuProto = 0
	MTU_PROTO_API_IP4  MtuProto = 1
	MTU_PROTO_API_IP6  MtuProto = 2
	MTU_PROTO_API_MPLS MtuProto = 3
)

func (MtuProto) String

func (x MtuProto) String() string

type RPCService

type RPCService interface {
	DumpSwInterfaceVhostUser(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_DumpSwInterfaceVhostUserClient, error)
	CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error)
	DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error)
	ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error)
}

RPCService represents RPC service API for vhost_user module.

func NewServiceClient

func NewServiceClient(ch api.Channel) RPCService

type RPCService_DumpSwInterfaceVhostUserClient

type RPCService_DumpSwInterfaceVhostUserClient interface {
	Recv() (*SwInterfaceVhostUserDetails, error)
}

type RxMode

type RxMode uint32

RxMode represents VPP binary API enum 'rx_mode'.

const (
	RX_MODE_API_UNKNOWN   RxMode = 0
	RX_MODE_API_POLLING   RxMode = 1
	RX_MODE_API_INTERRUPT RxMode = 2
	RX_MODE_API_ADAPTIVE  RxMode = 3
	RX_MODE_API_DEFAULT   RxMode = 4
)

func (RxMode) String

func (x RxMode) String() string

type SubIfFlags

type SubIfFlags uint32

SubIfFlags represents VPP binary API enum 'sub_if_flags'.

const (
	SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
	SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
	SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
	SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
	SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
	SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
	SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
	SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
	SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
	SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
)

func (SubIfFlags) String

func (x SubIfFlags) String() string

type SwInterfaceVhostUserDetails

type SwInterfaceVhostUserDetails struct {
	SwIfIndex       InterfaceIndex
	InterfaceName   string `struc:"[64]byte"`
	VirtioNetHdrSz  uint32
	FeaturesFirst32 VirtioNetFeaturesFirst32
	FeaturesLast32  VirtioNetFeaturesLast32
	IsServer        bool
	SockFilename    string `struc:"[256]byte"`
	NumRegions      uint32
	SockErrno       int32
}

SwInterfaceVhostUserDetails represents VPP binary API message 'sw_interface_vhost_user_details'.

func (*SwInterfaceVhostUserDetails) GetCrcString

func (*SwInterfaceVhostUserDetails) GetCrcString() string

func (*SwInterfaceVhostUserDetails) GetMessageName

func (*SwInterfaceVhostUserDetails) GetMessageName() string

func (*SwInterfaceVhostUserDetails) GetMessageType

func (*SwInterfaceVhostUserDetails) GetMessageType() api.MessageType

func (*SwInterfaceVhostUserDetails) Reset

func (m *SwInterfaceVhostUserDetails) Reset()

type SwInterfaceVhostUserDump

type SwInterfaceVhostUserDump struct {
	SwIfIndex InterfaceIndex
}

SwInterfaceVhostUserDump represents VPP binary API message 'sw_interface_vhost_user_dump'.

func (*SwInterfaceVhostUserDump) GetCrcString

func (*SwInterfaceVhostUserDump) GetCrcString() string

func (*SwInterfaceVhostUserDump) GetMessageName

func (*SwInterfaceVhostUserDump) GetMessageName() string

func (*SwInterfaceVhostUserDump) GetMessageType

func (*SwInterfaceVhostUserDump) GetMessageType() api.MessageType

func (*SwInterfaceVhostUserDump) Reset

func (m *SwInterfaceVhostUserDump) Reset()

type VirtioNetFeaturesFirst32

type VirtioNetFeaturesFirst32 uint32

VirtioNetFeaturesFirst32 represents VPP binary API enum 'virtio_net_features_first_32'.

const (
	VIRTIO_NET_F_API_CSUM              VirtioNetFeaturesFirst32 = 1
	VIRTIO_NET_F_API_GUEST_CSUM        VirtioNetFeaturesFirst32 = 2
	VIRTIO_NET_F_API_GUEST_TSO4        VirtioNetFeaturesFirst32 = 128
	VIRTIO_NET_F_API_GUEST_TSO6        VirtioNetFeaturesFirst32 = 256
	VIRTIO_NET_F_API_GUEST_UFO         VirtioNetFeaturesFirst32 = 1024
	VIRTIO_NET_F_API_HOST_TSO4         VirtioNetFeaturesFirst32 = 2048
	VIRTIO_NET_F_API_HOST_TSO6         VirtioNetFeaturesFirst32 = 4096
	VIRTIO_NET_F_API_HOST_UFO          VirtioNetFeaturesFirst32 = 16384
	VIRTIO_NET_F_API_MRG_RXBUF         VirtioNetFeaturesFirst32 = 32768
	VIRTIO_NET_F_API_CTRL_VQ           VirtioNetFeaturesFirst32 = 131072
	VIRTIO_NET_F_API_GUEST_ANNOUNCE    VirtioNetFeaturesFirst32 = 2.097152e+06
	VIRTIO_NET_F_API_MQ                VirtioNetFeaturesFirst32 = 4.194304e+06
	VHOST_F_API_LOG_ALL                VirtioNetFeaturesFirst32 = 6.7108864e+07
	VIRTIO_F_API_ANY_LAYOUT            VirtioNetFeaturesFirst32 = 1.34217728e+08
	VIRTIO_F_API_INDIRECT_DESC         VirtioNetFeaturesFirst32 = 2.68435456e+08
	VHOST_USER_F_API_PROTOCOL_FEATURES VirtioNetFeaturesFirst32 = 1.073741824e+09
)

func (VirtioNetFeaturesFirst32) String

func (x VirtioNetFeaturesFirst32) String() string

type VirtioNetFeaturesLast32

type VirtioNetFeaturesLast32 uint32

VirtioNetFeaturesLast32 represents VPP binary API enum 'virtio_net_features_last_32'.

const (
	VIRTIO_F_API_VERSION_1 VirtioNetFeaturesLast32 = 1
)

func (VirtioNetFeaturesLast32) String

func (x VirtioNetFeaturesLast32) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL