aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/af_xdp
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/af_xdp')
-rw-r--r--binapi/af_xdp/af_xdp.ba.go118
-rw-r--r--binapi/af_xdp/af_xdp_rpc.ba.go10
2 files changed, 120 insertions, 8 deletions
diff --git a/binapi/af_xdp/af_xdp.ba.go b/binapi/af_xdp/af_xdp.ba.go
index 3d13157..a4154c8 100644
--- a/binapi/af_xdp/af_xdp.ba.go
+++ b/binapi/af_xdp/af_xdp.ba.go
@@ -1,14 +1,14 @@
// 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/plugins/af_xdp.api.json
// Package af_xdp contains generated bindings for API file af_xdp.api.
//
// Contents:
// 2 enums
-// 4 messages
+// 6 messages
//
package af_xdp
@@ -28,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "af_xdp"
- APIVersion = "0.2.0"
- VersionCrc = 0x31450826
+ APIVersion = "1.0.0"
+ VersionCrc = 0x346626ce
)
// AfXdpMode defines enum 'af_xdp_mode'.
@@ -106,7 +106,6 @@ func (x AfXdpFlag) String() string {
}
// AfXdpCreate defines message 'af_xdp_create'.
-// InProgress: the message form may change in the future versions
type AfXdpCreate struct {
HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
Name string `binapi:"string[64],name=name" json:"name,omitempty"`
@@ -168,7 +167,6 @@ func (m *AfXdpCreate) Unmarshal(b []byte) error {
}
// AfXdpCreateReply defines message 'af_xdp_create_reply'.
-// InProgress: the message form may change in the future versions
type AfXdpCreateReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -205,8 +203,109 @@ func (m *AfXdpCreateReply) Unmarshal(b []byte) error {
return nil
}
+// AfXdpCreateV2 defines message 'af_xdp_create_v2'.
+type AfXdpCreateV2 struct {
+ HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+ RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
+ RxqSize uint16 `binapi:"u16,name=rxq_size,default=0" json:"rxq_size,omitempty"`
+ TxqSize uint16 `binapi:"u16,name=txq_size,default=0" json:"txq_size,omitempty"`
+ Mode AfXdpMode `binapi:"af_xdp_mode,name=mode,default=0" json:"mode,omitempty"`
+ Flags AfXdpFlag `binapi:"af_xdp_flag,name=flags,default=0" json:"flags,omitempty"`
+ Prog string `binapi:"string[256],name=prog" json:"prog,omitempty"`
+ Namespace string `binapi:"string[64],name=namespace" json:"namespace,omitempty"`
+}
+
+func (m *AfXdpCreateV2) Reset() { *m = AfXdpCreateV2{} }
+func (*AfXdpCreateV2) GetMessageName() string { return "af_xdp_create_v2" }
+func (*AfXdpCreateV2) GetCrcString() string { return "e17ec2eb" }
+func (*AfXdpCreateV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AfXdpCreateV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.HostIf
+ size += 64 // m.Name
+ size += 2 // m.RxqNum
+ size += 2 // m.RxqSize
+ size += 2 // m.TxqSize
+ size += 4 // m.Mode
+ size += 1 // m.Flags
+ size += 256 // m.Prog
+ size += 64 // m.Namespace
+ return size
+}
+func (m *AfXdpCreateV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.HostIf, 64)
+ buf.EncodeString(m.Name, 64)
+ buf.EncodeUint16(m.RxqNum)
+ buf.EncodeUint16(m.RxqSize)
+ buf.EncodeUint16(m.TxqSize)
+ buf.EncodeUint32(uint32(m.Mode))
+ buf.EncodeUint8(uint8(m.Flags))
+ buf.EncodeString(m.Prog, 256)
+ buf.EncodeString(m.Namespace, 64)
+ return buf.Bytes(), nil
+}
+func (m *AfXdpCreateV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.HostIf = buf.DecodeString(64)
+ m.Name = buf.DecodeString(64)
+ m.RxqNum = buf.DecodeUint16()
+ m.RxqSize = buf.DecodeUint16()
+ m.TxqSize = buf.DecodeUint16()
+ m.Mode = AfXdpMode(buf.DecodeUint32())
+ m.Flags = AfXdpFlag(buf.DecodeUint8())
+ m.Prog = buf.DecodeString(256)
+ m.Namespace = buf.DecodeString(64)
+ return nil
+}
+
+// AfXdpCreateV2Reply defines message 'af_xdp_create_v2_reply'.
+type AfXdpCreateV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *AfXdpCreateV2Reply) Reset() { *m = AfXdpCreateV2Reply{} }
+func (*AfXdpCreateV2Reply) GetMessageName() string { return "af_xdp_create_v2_reply" }
+func (*AfXdpCreateV2Reply) GetCrcString() string { return "5383d31f" }
+func (*AfXdpCreateV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AfXdpCreateV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *AfXdpCreateV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *AfXdpCreateV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// AfXdpDelete defines message 'af_xdp_delete'.
-// InProgress: the message form may change in the future versions
type AfXdpDelete struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
@@ -240,7 +339,6 @@ func (m *AfXdpDelete) Unmarshal(b []byte) error {
}
// AfXdpDeleteReply defines message 'af_xdp_delete_reply'.
-// InProgress: the message form may change in the future versions
type AfXdpDeleteReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
@@ -277,6 +375,8 @@ func init() { file_af_xdp_binapi_init() }
func file_af_xdp_binapi_init() {
api.RegisterMessage((*AfXdpCreate)(nil), "af_xdp_create_21226c99")
api.RegisterMessage((*AfXdpCreateReply)(nil), "af_xdp_create_reply_5383d31f")
+ api.RegisterMessage((*AfXdpCreateV2)(nil), "af_xdp_create_v2_e17ec2eb")
+ api.RegisterMessage((*AfXdpCreateV2Reply)(nil), "af_xdp_create_v2_reply_5383d31f")
api.RegisterMessage((*AfXdpDelete)(nil), "af_xdp_delete_f9e6675e")
api.RegisterMessage((*AfXdpDeleteReply)(nil), "af_xdp_delete_reply_e8d4e804")
}
@@ -286,6 +386,8 @@ func AllMessages() []api.Message {
return []api.Message{
(*AfXdpCreate)(nil),
(*AfXdpCreateReply)(nil),
+ (*AfXdpCreateV2)(nil),
+ (*AfXdpCreateV2Reply)(nil),
(*AfXdpDelete)(nil),
(*AfXdpDeleteReply)(nil),
}
diff --git a/binapi/af_xdp/af_xdp_rpc.ba.go b/binapi/af_xdp/af_xdp_rpc.ba.go
index 8a72f3e..db78488 100644
--- a/binapi/af_xdp/af_xdp_rpc.ba.go
+++ b/binapi/af_xdp/af_xdp_rpc.ba.go
@@ -11,6 +11,7 @@ import (
// RPCService defines RPC service af_xdp.
type RPCService interface {
AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error)
+ AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error)
AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error)
}
@@ -31,6 +32,15 @@ func (c *serviceClient) AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXd
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error) {
+ out := new(AfXdpCreateV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error) {
out := new(AfXdpDeleteReply)
err := c.conn.Invoke(ctx, in, out)