aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-rnd-ndrpdr.robot
blob: e23349edbd5cfb0b632125381373971a28b126fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Settings ***
| Resource | resources/libraries/robot/shared/default.robot
|
| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR
| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | FIB_200k | DRV_VFIO_PCI
| ... | RXQ_SIZE_0 | TXQ_SIZE_0
| ... | IP4_RND
| ... | ethip4-ip4scale200k-rnd
|
| Suite Setup | Setup suite topology interfaces | performance
| Suite Teardown | Tear down suite | performance
| Test Setup | Setup test | performance
| Test Teardown | Tear down test | performance
|
| Test Template | Local Template
|
| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases*
|
| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
| ... | with single links between nodes.
| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and\
| ... | 2x100k static IPv4 /32 route entries. DUT1 is tested with ${nic_name}.\
| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\
| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\
| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\
| ... | of packets transmitted. NDR and PDR are discovered for different\
| ... | Ethernet L2 frame sizes using MLRsearch library.\
| ... | Test packets are generated by TG on links to DUT1. TG traffic profile\
| ... | contains 2 randomized L3 flow-groups (flow-group per direction, 100K\
| ... | flows per flow-group) with all packets containing Ethernet header,\
| ... | IPv4 header with IP protocol=61 and static payload. MAC addresses are\
| ... | matching MAC addresses of the TG node interfaces.\
| ... | *[Ref] Applicable standard specifications:* RFC2544.

*** Variables ***
| @{plugins_to_enable}= | dpdk_plugin.so
| ${crypto_type}= | ${None}
| ${nic_name}= | Intel-X710
| ${nic_driver}= | vfio-pci
| ${nic_rxq_size}= | 0
| ${nic_txq_size}= | 0
| ${nic_pfs}= | 2
| ${nic_vfs}= | 0
| ${osi_layer}= | L3
| ${overhead}= | ${0}
| ${rts_per_flow}= | ${100000}
# Traffic profile
| ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst-rnd${rts_per_flow}

*** Keywords ***
| Local Template
| |
| | [Documentation]
| | ... | [Cfg] DUT runs IPv4 routing config.
| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\
| |
| | ... | *Arguments:*
| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
| | ... | Type: integer, string
| | ... | - phy_cores - Number of physical cores. Type: integer
| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
| |
| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
| |
| | Set Test Variable | \${frame_size}
| |
| | Given Set Max Rate And Jumbo
| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
| | And Pre-initialize layer driver | ${nic_driver}
| | And Apply startup configuration on all VPP DUTs
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Initialize IPv4 forwarding with scaling in circular topology
| | ... | ${rts_per_flow}
| | Then Find NDR and PDR intervals using optimized search

*** Test Cases ***
| 64B-1c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 64B | 1C
| | frame_size=${64} | phy_cores=${1}

| 64B-2c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 64B | 2C
| | frame_size=${64} | phy_cores=${2}

| 64B-4c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 64B | 4C
| | frame_size=${64} | phy_cores=${4}

| 1518B-1c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 1518B | 1C
| | frame_size=${1518} | phy_cores=${1}

| 1518B-2c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 1518B | 2C
| | frame_size=${1518} | phy_cores=${2}

| 1518B-4c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 1518B | 4C
| | frame_size=${1518} | phy_cores=${4}

| 9000B-1c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 9000B | 1C
| | frame_size=${9000} | phy_cores=${1}

| 9000B-2c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 9000B | 2C
| | frame_size=${9000} | phy_cores=${2}

| 9000B-4c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | 9000B | 4C
| | frame_size=${9000} | phy_cores=${4}

| IMIX-1c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | IMIX | 1C
| | frame_size=IMIX_v4_1 | phy_cores=${1}

| IMIX-2c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | IMIX | 2C
| | frame_size=IMIX_v4_1 | phy_cores=${2}

| IMIX-4c-ethip4-ip4scale200k-rnd-ndrpdr
| | [Tags] | IMIX | 4C
| | frame_size=IMIX_v4_1 | phy_cores=${4}
class="p">} func (*IP6RaEvent) GetCrcString() string { return "0364c1c5" } func (*IP6RaEvent) GetMessageType() api.MessageType { return api.EventMessage } func (m *IP6RaEvent) Size() (size int) { if m == nil { return 0 } size += 4 // m.PID size += 4 // m.SwIfIndex size += 1 * 16 // m.RouterAddr size += 1 // m.CurrentHopLimit size += 1 // m.Flags size += 2 // m.RouterLifetimeInSec size += 4 // m.NeighborReachableTimeInMsec size += 4 // m.TimeInMsecBetweenRetransmittedNeighborSolicitations size += 4 // m.NPrefixes for j1 := 0; j1 < len(m.Prefixes); j1++ { var s1 IP6RaPrefixInfo _ = s1 if j1 < len(m.Prefixes) { s1 = m.Prefixes[j1] } size += 1 // s1.Prefix.Address.Af size += 1 * 16 // s1.Prefix.Address.Un size += 1 // s1.Prefix.Len size += 1 // s1.Flags size += 4 // s1.ValidTime size += 4 // s1.PreferredTime } return size } func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.PID) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBytes(m.RouterAddr[:], 16) buf.EncodeUint8(m.CurrentHopLimit) buf.EncodeUint8(m.Flags) buf.EncodeUint16(m.RouterLifetimeInSec) buf.EncodeUint32(m.NeighborReachableTimeInMsec) buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations) buf.EncodeUint32(uint32(len(m.Prefixes))) for j0 := 0; j0 < len(m.Prefixes); j0++ { var v0 IP6RaPrefixInfo // Prefixes if j0 < len(m.Prefixes) { v0 = m.Prefixes[j0] } buf.EncodeUint8(uint8(v0.Prefix.Address.Af)) buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16) buf.EncodeUint8(v0.Prefix.Len) buf.EncodeUint8(v0.Flags) buf.EncodeUint32(v0.ValidTime) buf.EncodeUint32(v0.PreferredTime) } return buf.Bytes(), nil } func (m *IP6RaEvent) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.PID = buf.DecodeUint32() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) copy(m.RouterAddr[:], buf.DecodeBytes(16)) m.CurrentHopLimit = buf.DecodeUint8() m.Flags = buf.DecodeUint8() m.RouterLifetimeInSec = buf.DecodeUint16() m.NeighborReachableTimeInMsec = buf.DecodeUint32() m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32() m.NPrefixes = buf.DecodeUint32() m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes) for j0 := 0; j0 < len(m.Prefixes); j0++ { m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) m.Prefixes[j0].Prefix.Len = buf.DecodeUint8() m.Prefixes[j0].Flags = buf.DecodeUint8() m.Prefixes[j0].ValidTime = buf.DecodeUint32() m.Prefixes[j0].PreferredTime = buf.DecodeUint32() } return nil } // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'. type IP6ndProxyAddDel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` } func (m *IP6ndProxyAddDel) Reset() { *m = IP6ndProxyAddDel{} } func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" } func (*IP6ndProxyAddDel) GetCrcString() string { return "c2e4a686" } func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { return api.RequestMessage } func (m *IP6ndProxyAddDel) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 // m.IsAdd size += 1 * 16 // m.IP return size } func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBool(m.IsAdd) buf.EncodeBytes(m.IP[:], 16) return buf.Bytes(), nil } func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IsAdd = buf.DecodeBool() copy(m.IP[:], buf.DecodeBytes(16)) return nil } // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'. type IP6ndProxyAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *IP6ndProxyAddDelReply) Reset() { *m = IP6ndProxyAddDelReply{} } func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" } func (*IP6ndProxyAddDelReply) GetCrcString() string { return "e8d4e804" } func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *IP6ndProxyAddDelReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *IP6ndProxyAddDelReply) 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 *IP6ndProxyAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // IP6ndProxyDetails defines message 'ip6nd_proxy_details'. type IP6ndProxyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` } func (m *IP6ndProxyDetails) Reset() { *m = IP6ndProxyDetails{} } func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" } func (*IP6ndProxyDetails) GetCrcString() string { return "30b9ff4a" } func (*IP6ndProxyDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *IP6ndProxyDetails) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 * 16 // m.IP return size } func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBytes(m.IP[:], 16) return buf.Bytes(), nil } func (m *IP6ndProxyDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) copy(m.IP[:], buf.DecodeBytes(16)) return nil } // IP6ndProxyDump defines message 'ip6nd_proxy_dump'. type IP6ndProxyDump struct{} func (m *IP6ndProxyDump) Reset() { *m = IP6ndProxyDump{} } func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" } func (*IP6ndProxyDump) GetCrcString() string { return "51077d14" } func (*IP6ndProxyDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *IP6ndProxyDump) Size() (size int) { if m == nil { return 0 } return size } func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *IP6ndProxyDump) Unmarshal(b []byte) error { return nil } // IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'. type IP6ndProxyEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"` } func (m *IP6ndProxyEnableDisable) Reset() { *m = IP6ndProxyEnableDisable{} } func (*IP6ndProxyEnableDisable) GetMessageName() string { return "ip6nd_proxy_enable_disable" } func (*IP6ndProxyEnableDisable) GetCrcString() string { return "7daa1e3a" } func (*IP6ndProxyEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } func (m *IP6ndProxyEnableDisable) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 // m.IsEnable return size } func (m *IP6ndProxyEnableDisable) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBool(m.IsEnable) return buf.Bytes(), nil } func (m *IP6ndProxyEnableDisable) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IsEnable = buf.DecodeBool() return nil } // IP6ndProxyEnableDisableReply defines message 'ip6nd_proxy_enable_disable_reply'. type IP6ndProxyEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *IP6ndProxyEnableDisableReply) Reset() { *m = IP6ndProxyEnableDisableReply{} } func (*IP6ndProxyEnableDisableReply) GetMessageName() string { return "ip6nd_proxy_enable_disable_reply" } func (*IP6ndProxyEnableDisableReply) GetCrcString() string { return "e8d4e804" } func (*IP6ndProxyEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *IP6ndProxyEnableDisableReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *IP6ndProxyEnableDisableReply) 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 *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'. type IP6ndSendRouterSolicitation struct { Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"` Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"` Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"` Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"` } func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} } func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" } func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" } func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType { return api.RequestMessage } func (m *IP6ndSendRouterSolicitation) Size() (size int) { if m == nil { return 0 } size += 4 // m.Irt size += 4 // m.Mrt size += 4 // m.Mrc size += 4 // m.Mrd size += 4 // m.SwIfIndex size += 1 // m.Stop return size } func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.Irt) buf.EncodeUint32(m.Mrt) buf.EncodeUint32(m.Mrc) buf.EncodeUint32(m.Mrd) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBool(m.Stop) return buf.Bytes(), nil } func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Irt = buf.DecodeUint32() m.Mrt = buf.DecodeUint32() m.Mrc = buf.DecodeUint32() m.Mrd = buf.DecodeUint32() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.Stop = buf.DecodeBool() return nil } // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'. type IP6ndSendRouterSolicitationReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} } func (*IP6ndSendRouterSolicitationReply) GetMessageName() string { return "ip6nd_send_router_solicitation_reply" } func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" } func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *IP6ndSendRouterSolicitationReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *IP6ndSendRouterSolicitationReply) 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 *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'. type SwInterfaceIP6ndRaConfig struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"` Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"` Other uint8 `binapi:"u8,name=other" json:"other,omitempty"` LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"` SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"` Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"` IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"` MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"` MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"` Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"` InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"` InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"` } func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} } func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" } func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" } func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { return api.RequestMessage } func (m *SwInterfaceIP6ndRaConfig) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 // m.Suppress size += 1 // m.Managed size += 1 // m.Other size += 1 // m.LlOption size += 1 // m.SendUnicast size += 1 // m.Cease size += 1 // m.IsNo size += 1 // m.DefaultRouter size += 4 // m.MaxInterval size += 4 // m.MinInterval size += 4 // m.Lifetime size += 4 // m.InitialCount size += 4 // m.InitialInterval return size } func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeUint8(m.Suppress) buf.EncodeUint8(m.Managed) buf.EncodeUint8(m.Other) buf.EncodeUint8(m.LlOption) buf.EncodeUint8(m.SendUnicast) buf.EncodeUint8(m.Cease) buf.EncodeBool(m.IsNo) buf.EncodeUint8(m.DefaultRouter) buf.EncodeUint32(m.MaxInterval) buf.EncodeUint32(m.MinInterval) buf.EncodeUint32(m.Lifetime) buf.EncodeUint32(m.InitialCount) buf.EncodeUint32(m.InitialInterval) return buf.Bytes(), nil } func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.Suppress = buf.DecodeUint8() m.Managed = buf.DecodeUint8() m.Other = buf.DecodeUint8() m.LlOption = buf.DecodeUint8() m.SendUnicast = buf.DecodeUint8() m.Cease = buf.DecodeUint8() m.IsNo = buf.DecodeBool() m.DefaultRouter = buf.DecodeUint8() m.MaxInterval = buf.DecodeUint32() m.MinInterval = buf.DecodeUint32() m.Lifetime = buf.DecodeUint32() m.InitialCount = buf.DecodeUint32() m.InitialInterval = buf.DecodeUint32() return nil } // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'. type SwInterfaceIP6ndRaConfigReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} } func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { return "sw_interface_ip6nd_ra_config_reply" } func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" } func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *SwInterfaceIP6ndRaConfigReply) 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 *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'. type SwInterfaceIP6ndRaPrefix struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"` NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"` OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"` NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"` NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"` IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"` PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"` } func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} } func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" } func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "82cc1b28" } func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { return api.RequestMessage } func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 // m.Prefix.Address.Af size += 1 * 16 // m.Prefix.Address.Un size += 1 // m.Prefix.Len size += 1 // m.UseDefault size += 1 // m.NoAdvertise size += 1 // m.OffLink size += 1 // m.NoAutoconfig size += 1 // m.NoOnlink size += 1 // m.IsNo size += 4 // m.ValLifetime size += 4 // m.PrefLifetime return size } func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeUint8(uint8(m.Prefix.Address.Af)) buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) buf.EncodeUint8(m.Prefix.Len) buf.EncodeBool(m.UseDefault) buf.EncodeBool(m.NoAdvertise) buf.EncodeBool(m.OffLink) buf.EncodeBool(m.NoAutoconfig) buf.EncodeBool(m.NoOnlink) buf.EncodeBool(m.IsNo) buf.EncodeUint32(m.ValLifetime) buf.EncodeUint32(m.PrefLifetime) return buf.Bytes(), nil } func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) m.Prefix.Len = buf.DecodeUint8() m.UseDefault = buf.DecodeBool() m.NoAdvertise = buf.DecodeBool() m.OffLink = buf.DecodeBool() m.NoAutoconfig = buf.DecodeBool() m.NoOnlink = buf.DecodeBool() m.IsNo = buf.DecodeBool() m.ValLifetime = buf.DecodeUint32() m.PrefLifetime = buf.DecodeUint32() return nil } // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'. type SwInterfaceIP6ndRaPrefixReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} } func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix_reply" } func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" } func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *SwInterfaceIP6ndRaPrefixReply) 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 *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // WantIP6RaEvents defines message 'want_ip6_ra_events'. type WantIP6RaEvents struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` } func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} } func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" } func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" } func (*WantIP6RaEvents) GetMessageType() api.MessageType { return api.RequestMessage } func (m *WantIP6RaEvents) Size() (size int) { if m == nil { return 0 } size += 1 // m.Enable size += 4 // m.PID return size } func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.Enable) buf.EncodeUint32(m.PID) return buf.Bytes(), nil } func (m *WantIP6RaEvents) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Enable = buf.DecodeBool() m.PID = buf.DecodeUint32() return nil } // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'. type WantIP6RaEventsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} } func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" } func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" } func (*WantIP6RaEventsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *WantIP6RaEventsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *WantIP6RaEventsReply) 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 *WantIP6RaEventsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } func init() { file_ip6_nd_binapi_init() } func file_ip6_nd_binapi_init() { api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5") api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686") api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804") api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a") api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14") api.RegisterMessage((*IP6ndProxyEnableDisable)(nil), "ip6nd_proxy_enable_disable_7daa1e3a") api.RegisterMessage((*IP6ndProxyEnableDisableReply)(nil), "ip6nd_proxy_enable_disable_reply_e8d4e804") api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c") api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804") api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c") api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804") api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28") api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804") api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2") api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ (*IP6RaEvent)(nil), (*IP6ndProxyAddDel)(nil), (*IP6ndProxyAddDelReply)(nil), (*IP6ndProxyDetails)(nil), (*IP6ndProxyDump)(nil), (*IP6ndProxyEnableDisable)(nil), (*IP6ndProxyEnableDisableReply)(nil), (*IP6ndSendRouterSolicitation)(nil), (*IP6ndSendRouterSolicitationReply)(nil), (*SwInterfaceIP6ndRaConfig)(nil), (*SwInterfaceIP6ndRaConfigReply)(nil), (*SwInterfaceIP6ndRaPrefix)(nil), (*SwInterfaceIP6ndRaPrefixReply)(nil), (*WantIP6RaEvents)(nil), (*WantIP6RaEventsReply)(nil), } }