1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
5 // source: /usr/share/vpp/api/plugins/rdma.api.json
7 // Package rdma contains generated bindings for API file rdma.api.
18 api "git.fd.io/govpp.git/api"
19 interface_types "git.fd.io/govpp.git/binapi/interface_types"
20 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0xdab70fa9
35 // RdmaMode defines enum 'rdma_mode'.
39 RDMA_API_MODE_AUTO RdmaMode = 0
40 RDMA_API_MODE_IBV RdmaMode = 1
41 RDMA_API_MODE_DV RdmaMode = 2
45 RdmaMode_name = map[uint32]string{
46 0: "RDMA_API_MODE_AUTO",
47 1: "RDMA_API_MODE_IBV",
48 2: "RDMA_API_MODE_DV",
50 RdmaMode_value = map[string]uint32{
51 "RDMA_API_MODE_AUTO": 0,
52 "RDMA_API_MODE_IBV": 1,
53 "RDMA_API_MODE_DV": 2,
57 func (x RdmaMode) String() string {
58 s, ok := RdmaMode_name[uint32(x)]
62 return "RdmaMode(" + strconv.Itoa(int(x)) + ")"
65 // RdmaRss4 defines enum 'rdma_rss4'.
69 RDMA_API_RSS4_AUTO RdmaRss4 = 0
70 RDMA_API_RSS4_IP RdmaRss4 = 1
71 RDMA_API_RSS4_IP_UDP RdmaRss4 = 2
72 RDMA_API_RSS4_IP_TCP RdmaRss4 = 3
76 RdmaRss4_name = map[uint32]string{
77 0: "RDMA_API_RSS4_AUTO",
78 1: "RDMA_API_RSS4_IP",
79 2: "RDMA_API_RSS4_IP_UDP",
80 3: "RDMA_API_RSS4_IP_TCP",
82 RdmaRss4_value = map[string]uint32{
83 "RDMA_API_RSS4_AUTO": 0,
84 "RDMA_API_RSS4_IP": 1,
85 "RDMA_API_RSS4_IP_UDP": 2,
86 "RDMA_API_RSS4_IP_TCP": 3,
90 func (x RdmaRss4) String() string {
91 s, ok := RdmaRss4_name[uint32(x)]
95 return "RdmaRss4(" + strconv.Itoa(int(x)) + ")"
98 // RdmaRss6 defines enum 'rdma_rss6'.
102 RDMA_API_RSS6_AUTO RdmaRss6 = 0
103 RDMA_API_RSS6_IP RdmaRss6 = 1
104 RDMA_API_RSS6_IP_UDP RdmaRss6 = 2
105 RDMA_API_RSS6_IP_TCP RdmaRss6 = 3
109 RdmaRss6_name = map[uint32]string{
110 0: "RDMA_API_RSS6_AUTO",
111 1: "RDMA_API_RSS6_IP",
112 2: "RDMA_API_RSS6_IP_UDP",
113 3: "RDMA_API_RSS6_IP_TCP",
115 RdmaRss6_value = map[string]uint32{
116 "RDMA_API_RSS6_AUTO": 0,
117 "RDMA_API_RSS6_IP": 1,
118 "RDMA_API_RSS6_IP_UDP": 2,
119 "RDMA_API_RSS6_IP_TCP": 3,
123 func (x RdmaRss6) String() string {
124 s, ok := RdmaRss6_name[uint32(x)]
128 return "RdmaRss6(" + strconv.Itoa(int(x)) + ")"
131 // RdmaCreate defines message 'rdma_create'.
133 type RdmaCreate struct {
134 HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
135 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
136 RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
137 RxqSize uint16 `binapi:"u16,name=rxq_size,default=1024" json:"rxq_size,omitempty"`
138 TxqSize uint16 `binapi:"u16,name=txq_size,default=1024" json:"txq_size,omitempty"`
139 Mode RdmaMode `binapi:"rdma_mode,name=mode,default=0" json:"mode,omitempty"`
142 func (m *RdmaCreate) Reset() { *m = RdmaCreate{} }
143 func (*RdmaCreate) GetMessageName() string { return "rdma_create" }
144 func (*RdmaCreate) GetCrcString() string { return "076fe418" }
145 func (*RdmaCreate) GetMessageType() api.MessageType {
146 return api.RequestMessage
149 func (m *RdmaCreate) Size() (size int) {
153 size += 64 // m.HostIf
155 size += 2 // m.RxqNum
156 size += 2 // m.RxqSize
157 size += 2 // m.TxqSize
161 func (m *RdmaCreate) Marshal(b []byte) ([]byte, error) {
163 b = make([]byte, m.Size())
165 buf := codec.NewBuffer(b)
166 buf.EncodeString(m.HostIf, 64)
167 buf.EncodeString(m.Name, 64)
168 buf.EncodeUint16(m.RxqNum)
169 buf.EncodeUint16(m.RxqSize)
170 buf.EncodeUint16(m.TxqSize)
171 buf.EncodeUint32(uint32(m.Mode))
172 return buf.Bytes(), nil
174 func (m *RdmaCreate) Unmarshal(b []byte) error {
175 buf := codec.NewBuffer(b)
176 m.HostIf = buf.DecodeString(64)
177 m.Name = buf.DecodeString(64)
178 m.RxqNum = buf.DecodeUint16()
179 m.RxqSize = buf.DecodeUint16()
180 m.TxqSize = buf.DecodeUint16()
181 m.Mode = RdmaMode(buf.DecodeUint32())
185 // RdmaCreateReply defines message 'rdma_create_reply'.
186 type RdmaCreateReply struct {
187 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
188 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
191 func (m *RdmaCreateReply) Reset() { *m = RdmaCreateReply{} }
192 func (*RdmaCreateReply) GetMessageName() string { return "rdma_create_reply" }
193 func (*RdmaCreateReply) GetCrcString() string { return "5383d31f" }
194 func (*RdmaCreateReply) GetMessageType() api.MessageType {
195 return api.ReplyMessage
198 func (m *RdmaCreateReply) Size() (size int) {
202 size += 4 // m.Retval
203 size += 4 // m.SwIfIndex
206 func (m *RdmaCreateReply) Marshal(b []byte) ([]byte, error) {
208 b = make([]byte, m.Size())
210 buf := codec.NewBuffer(b)
211 buf.EncodeInt32(m.Retval)
212 buf.EncodeUint32(uint32(m.SwIfIndex))
213 return buf.Bytes(), nil
215 func (m *RdmaCreateReply) Unmarshal(b []byte) error {
216 buf := codec.NewBuffer(b)
217 m.Retval = buf.DecodeInt32()
218 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
222 // RdmaCreateV2 defines message 'rdma_create_v2'.
223 // Deprecated: the message will be removed in the future versions
224 type RdmaCreateV2 struct {
225 HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
226 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
227 RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
228 RxqSize uint16 `binapi:"u16,name=rxq_size,default=1024" json:"rxq_size,omitempty"`
229 TxqSize uint16 `binapi:"u16,name=txq_size,default=1024" json:"txq_size,omitempty"`
230 Mode RdmaMode `binapi:"rdma_mode,name=mode,default=0" json:"mode,omitempty"`
231 NoMultiSeg bool `binapi:"bool,name=no_multi_seg,default=0" json:"no_multi_seg,omitempty"`
232 MaxPktlen uint16 `binapi:"u16,name=max_pktlen,default=0" json:"max_pktlen,omitempty"`
235 func (m *RdmaCreateV2) Reset() { *m = RdmaCreateV2{} }
236 func (*RdmaCreateV2) GetMessageName() string { return "rdma_create_v2" }
237 func (*RdmaCreateV2) GetCrcString() string { return "5826a4f3" }
238 func (*RdmaCreateV2) GetMessageType() api.MessageType {
239 return api.RequestMessage
242 func (m *RdmaCreateV2) Size() (size int) {
246 size += 64 // m.HostIf
248 size += 2 // m.RxqNum
249 size += 2 // m.RxqSize
250 size += 2 // m.TxqSize
252 size += 1 // m.NoMultiSeg
253 size += 2 // m.MaxPktlen
256 func (m *RdmaCreateV2) Marshal(b []byte) ([]byte, error) {
258 b = make([]byte, m.Size())
260 buf := codec.NewBuffer(b)
261 buf.EncodeString(m.HostIf, 64)
262 buf.EncodeString(m.Name, 64)
263 buf.EncodeUint16(m.RxqNum)
264 buf.EncodeUint16(m.RxqSize)
265 buf.EncodeUint16(m.TxqSize)
266 buf.EncodeUint32(uint32(m.Mode))
267 buf.EncodeBool(m.NoMultiSeg)
268 buf.EncodeUint16(m.MaxPktlen)
269 return buf.Bytes(), nil
271 func (m *RdmaCreateV2) Unmarshal(b []byte) error {
272 buf := codec.NewBuffer(b)
273 m.HostIf = buf.DecodeString(64)
274 m.Name = buf.DecodeString(64)
275 m.RxqNum = buf.DecodeUint16()
276 m.RxqSize = buf.DecodeUint16()
277 m.TxqSize = buf.DecodeUint16()
278 m.Mode = RdmaMode(buf.DecodeUint32())
279 m.NoMultiSeg = buf.DecodeBool()
280 m.MaxPktlen = buf.DecodeUint16()
284 // RdmaCreateV2Reply defines message 'rdma_create_v2_reply'.
285 type RdmaCreateV2Reply struct {
286 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
287 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
290 func (m *RdmaCreateV2Reply) Reset() { *m = RdmaCreateV2Reply{} }
291 func (*RdmaCreateV2Reply) GetMessageName() string { return "rdma_create_v2_reply" }
292 func (*RdmaCreateV2Reply) GetCrcString() string { return "5383d31f" }
293 func (*RdmaCreateV2Reply) GetMessageType() api.MessageType {
294 return api.ReplyMessage
297 func (m *RdmaCreateV2Reply) Size() (size int) {
301 size += 4 // m.Retval
302 size += 4 // m.SwIfIndex
305 func (m *RdmaCreateV2Reply) Marshal(b []byte) ([]byte, error) {
307 b = make([]byte, m.Size())
309 buf := codec.NewBuffer(b)
310 buf.EncodeInt32(m.Retval)
311 buf.EncodeUint32(uint32(m.SwIfIndex))
312 return buf.Bytes(), nil
314 func (m *RdmaCreateV2Reply) Unmarshal(b []byte) error {
315 buf := codec.NewBuffer(b)
316 m.Retval = buf.DecodeInt32()
317 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
321 // RdmaCreateV3 defines message 'rdma_create_v3'.
322 type RdmaCreateV3 struct {
323 HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
324 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
325 RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
326 RxqSize uint16 `binapi:"u16,name=rxq_size,default=1024" json:"rxq_size,omitempty"`
327 TxqSize uint16 `binapi:"u16,name=txq_size,default=1024" json:"txq_size,omitempty"`
328 Mode RdmaMode `binapi:"rdma_mode,name=mode,default=0" json:"mode,omitempty"`
329 NoMultiSeg bool `binapi:"bool,name=no_multi_seg,default=0" json:"no_multi_seg,omitempty"`
330 MaxPktlen uint16 `binapi:"u16,name=max_pktlen,default=0" json:"max_pktlen,omitempty"`
331 Rss4 RdmaRss4 `binapi:"rdma_rss4,name=rss4,default=0" json:"rss4,omitempty"`
332 Rss6 RdmaRss6 `binapi:"rdma_rss6,name=rss6,default=0" json:"rss6,omitempty"`
335 func (m *RdmaCreateV3) Reset() { *m = RdmaCreateV3{} }
336 func (*RdmaCreateV3) GetMessageName() string { return "rdma_create_v3" }
337 func (*RdmaCreateV3) GetCrcString() string { return "c6287ea8" }
338 func (*RdmaCreateV3) GetMessageType() api.MessageType {
339 return api.RequestMessage
342 func (m *RdmaCreateV3) Size() (size int) {
346 size += 64 // m.HostIf
348 size += 2 // m.RxqNum
349 size += 2 // m.RxqSize
350 size += 2 // m.TxqSize
352 size += 1 // m.NoMultiSeg
353 size += 2 // m.MaxPktlen
358 func (m *RdmaCreateV3) Marshal(b []byte) ([]byte, error) {
360 b = make([]byte, m.Size())
362 buf := codec.NewBuffer(b)
363 buf.EncodeString(m.HostIf, 64)
364 buf.EncodeString(m.Name, 64)
365 buf.EncodeUint16(m.RxqNum)
366 buf.EncodeUint16(m.RxqSize)
367 buf.EncodeUint16(m.TxqSize)
368 buf.EncodeUint32(uint32(m.Mode))
369 buf.EncodeBool(m.NoMultiSeg)
370 buf.EncodeUint16(m.MaxPktlen)
371 buf.EncodeUint32(uint32(m.Rss4))
372 buf.EncodeUint32(uint32(m.Rss6))
373 return buf.Bytes(), nil
375 func (m *RdmaCreateV3) Unmarshal(b []byte) error {
376 buf := codec.NewBuffer(b)
377 m.HostIf = buf.DecodeString(64)
378 m.Name = buf.DecodeString(64)
379 m.RxqNum = buf.DecodeUint16()
380 m.RxqSize = buf.DecodeUint16()
381 m.TxqSize = buf.DecodeUint16()
382 m.Mode = RdmaMode(buf.DecodeUint32())
383 m.NoMultiSeg = buf.DecodeBool()
384 m.MaxPktlen = buf.DecodeUint16()
385 m.Rss4 = RdmaRss4(buf.DecodeUint32())
386 m.Rss6 = RdmaRss6(buf.DecodeUint32())
390 // RdmaCreateV3Reply defines message 'rdma_create_v3_reply'.
391 type RdmaCreateV3Reply struct {
392 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
393 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
396 func (m *RdmaCreateV3Reply) Reset() { *m = RdmaCreateV3Reply{} }
397 func (*RdmaCreateV3Reply) GetMessageName() string { return "rdma_create_v3_reply" }
398 func (*RdmaCreateV3Reply) GetCrcString() string { return "5383d31f" }
399 func (*RdmaCreateV3Reply) GetMessageType() api.MessageType {
400 return api.ReplyMessage
403 func (m *RdmaCreateV3Reply) Size() (size int) {
407 size += 4 // m.Retval
408 size += 4 // m.SwIfIndex
411 func (m *RdmaCreateV3Reply) Marshal(b []byte) ([]byte, error) {
413 b = make([]byte, m.Size())
415 buf := codec.NewBuffer(b)
416 buf.EncodeInt32(m.Retval)
417 buf.EncodeUint32(uint32(m.SwIfIndex))
418 return buf.Bytes(), nil
420 func (m *RdmaCreateV3Reply) Unmarshal(b []byte) error {
421 buf := codec.NewBuffer(b)
422 m.Retval = buf.DecodeInt32()
423 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
427 // RdmaDelete defines message 'rdma_delete'.
428 type RdmaDelete struct {
429 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
432 func (m *RdmaDelete) Reset() { *m = RdmaDelete{} }
433 func (*RdmaDelete) GetMessageName() string { return "rdma_delete" }
434 func (*RdmaDelete) GetCrcString() string { return "f9e6675e" }
435 func (*RdmaDelete) GetMessageType() api.MessageType {
436 return api.RequestMessage
439 func (m *RdmaDelete) Size() (size int) {
443 size += 4 // m.SwIfIndex
446 func (m *RdmaDelete) Marshal(b []byte) ([]byte, error) {
448 b = make([]byte, m.Size())
450 buf := codec.NewBuffer(b)
451 buf.EncodeUint32(uint32(m.SwIfIndex))
452 return buf.Bytes(), nil
454 func (m *RdmaDelete) Unmarshal(b []byte) error {
455 buf := codec.NewBuffer(b)
456 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
460 // RdmaDeleteReply defines message 'rdma_delete_reply'.
461 type RdmaDeleteReply struct {
462 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
465 func (m *RdmaDeleteReply) Reset() { *m = RdmaDeleteReply{} }
466 func (*RdmaDeleteReply) GetMessageName() string { return "rdma_delete_reply" }
467 func (*RdmaDeleteReply) GetCrcString() string { return "e8d4e804" }
468 func (*RdmaDeleteReply) GetMessageType() api.MessageType {
469 return api.ReplyMessage
472 func (m *RdmaDeleteReply) Size() (size int) {
476 size += 4 // m.Retval
479 func (m *RdmaDeleteReply) Marshal(b []byte) ([]byte, error) {
481 b = make([]byte, m.Size())
483 buf := codec.NewBuffer(b)
484 buf.EncodeInt32(m.Retval)
485 return buf.Bytes(), nil
487 func (m *RdmaDeleteReply) Unmarshal(b []byte) error {
488 buf := codec.NewBuffer(b)
489 m.Retval = buf.DecodeInt32()
493 func init() { file_rdma_binapi_init() }
494 func file_rdma_binapi_init() {
495 api.RegisterMessage((*RdmaCreate)(nil), "rdma_create_076fe418")
496 api.RegisterMessage((*RdmaCreateReply)(nil), "rdma_create_reply_5383d31f")
497 api.RegisterMessage((*RdmaCreateV2)(nil), "rdma_create_v2_5826a4f3")
498 api.RegisterMessage((*RdmaCreateV2Reply)(nil), "rdma_create_v2_reply_5383d31f")
499 api.RegisterMessage((*RdmaCreateV3)(nil), "rdma_create_v3_c6287ea8")
500 api.RegisterMessage((*RdmaCreateV3Reply)(nil), "rdma_create_v3_reply_5383d31f")
501 api.RegisterMessage((*RdmaDelete)(nil), "rdma_delete_f9e6675e")
502 api.RegisterMessage((*RdmaDeleteReply)(nil), "rdma_delete_reply_e8d4e804")
505 // Messages returns list of all messages in this module.
506 func AllMessages() []api.Message {
507 return []api.Message{
509 (*RdmaCreateReply)(nil),
510 (*RdmaCreateV2)(nil),
511 (*RdmaCreateV2Reply)(nil),
512 (*RdmaCreateV3)(nil),
513 (*RdmaCreateV3Reply)(nil),
515 (*RdmaDeleteReply)(nil),