FD.io VPP  v21.01.1
Vector Packet Processing
bond.api
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /** \file
17 
18  This file defines vpe control-plane API messages for
19  the bonding device driver
20 */
21 
22 option version = "2.1.0";
23 
24 import "vnet/interface_types.api";
25 import "vnet/ethernet/ethernet_types.api";
26 
28 {
34 };
35 
37 {
44 };
45 
46 /** \brief Initialize a new bond interface with the given paramters
47  @param client_index - opaque cookie to identify the sender
48  @param context - sender context, to match reply w/ request
49  @param id - if non-~0, specifies a custom interface ID
50  @param use_custom_mac - if set, mac_address is valid
51  @param mac_address - mac addr to assign to the interface if use_custom_mac is set
52  @param mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp)
53  @param lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored
54  @param numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual.
55 */
56 define bond_create
57 {
58  option deprecated;
61  u32 id [default=0xFFFFFFFF];
63  vl_api_mac_address_t mac_address;
64  vl_api_bond_mode_t mode;
65  vl_api_bond_lb_algo_t lb;
66  bool numa_only;
67 };
68 
69 /** \brief Reply for bond create reply
70  @param context - returned sender context, to match reply w/ request
71  @param retval - return code
72  @param sw_if_index - software index allocated for the new tap interface
73 */
74 define bond_create_reply
75 {
78  vl_api_interface_index_t sw_if_index;
79 };
80 
81 /** \brief Initialize a new bond interface with the given paramters
82  @param client_index - opaque cookie to identify the sender
83  @param context - sender context, to match reply w/ request
84  @param mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp)
85  @param lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored (default=l2)
86  @param numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual.
87  @param enable_gso - enable gso support (default 0)
88  @param use_custom_mac - if set, mac_address is valid
89  @param mac_address - mac addr to assign to the interface if use_custom_mac is set
90  @param id - if non-~0, specifies a custom interface ID (default=0xFFFFFFFF)
91 */
92 define bond_create2
93 {
96  vl_api_bond_mode_t mode;
97  vl_api_bond_lb_algo_t lb;
98  bool numa_only;
99  bool enable_gso;
101  vl_api_mac_address_t mac_address;
102  u32 id [default=0xFFFFFFFF];
103 };
104 
105 /** \brief Reply for bond create2 reply
106  @param context - returned sender context, to match reply w/ request
107  @param retval - return code
108  @param sw_if_index - software index allocated for the new tap interface
109 */
110 define bond_create2_reply
111 {
114  vl_api_interface_index_t sw_if_index;
115 };
116 
117 /** \brief Delete bond interface
118  @param client_index - opaque cookie to identify the sender
119  @param context - sender context, to match reply w/ request
120  @param sw_if_index - interface index of member interface
121 */
122 autoreply define bond_delete
123 {
126  vl_api_interface_index_t sw_if_index;
127 };
128 
129 /** \brief Initialize a new bond interface with the given paramters
130  @param client_index - opaque cookie to identify the sender
131  @param context - sender context, to match reply w/ request
132  @param sw_if_index - slave sw_if_index
133  @param bond_sw_if_index - bond sw_if_index
134  @param is_passive - interface does not initiate the lacp protocol, remote must be active speaker
135  @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
136 */
137 define bond_enslave
138 {
139  option deprecated;
142  vl_api_interface_index_t sw_if_index;
143  vl_api_interface_index_t bond_sw_if_index;
146 };
147 
148 /** \brief Reply for bond enslave reply
149  @param context - returned sender context, to match reply w/ request
150  @param retval - return code
151 */
152 define bond_enslave_reply
153 {
156 };
157 
158 /** \brief Initialize a new bond interface with the given paramters
159  @param client_index - opaque cookie to identify the sender
160  @param context - sender context, to match reply w/ request
161  @param sw_if_index - member sw_if_index
162  @param bond_sw_if_index - bond sw_if_index
163  @param is_passive - interface does not initiate the lacp protocol, remote must be active speaker
164  @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
165 */
167 {
170  vl_api_interface_index_t sw_if_index;
171  vl_api_interface_index_t bond_sw_if_index;
174 };
175 
176 /** \brief Reply for bond add_member reply
177  @param context - returned sender context, to match reply w/ request
178  @param retval - return code
179 */
180 define bond_add_member_reply
181 {
184 };
185 
186 /** \brief bond detach slave
187  @param client_index - opaque cookie to identify the sender
188  @param context - sender context, to match reply w/ request
189  @param sw_if_index - interface index of member interface
190 */
191 autoreply define bond_detach_slave
192 {
193  option deprecated;
196  vl_api_interface_index_t sw_if_index;
197 };
198 
199 /** \brief bond detach member
200  @param client_index - opaque cookie to identify the sender
201  @param context - sender context, to match reply w/ request
202  @param sw_if_index - interface index of member interface
203 */
204 autoreply define bond_detach_member
205 {
208  vl_api_interface_index_t sw_if_index;
209 };
210 
211 /** \brief Dump bond interfaces request */
212 define sw_interface_bond_dump
213 {
214  option deprecated;
217 };
218 
219 /** \brief Reply for bond dump request
220  @param sw_if_index - software index of bond interface
221  @param id - ID of interface
222  @param interface_name - name of interface
223  @param mode - bonding mode
224  @param lb - load balance algo
225  @param numa_only - enable local numa TX for lacp mode
226  @param active_slaves - active member count
227  @param slaves - config member count
228 */
229 define sw_interface_bond_details
230 {
232  vl_api_interface_index_t sw_if_index;
234  vl_api_bond_mode_t mode;
235  vl_api_bond_lb_algo_t lb;
236  bool numa_only;
239  string interface_name[64];
240 };
241 
242 /** \brief Dump bond interfaces request */
243 define sw_bond_interface_dump
244 {
247  vl_api_interface_index_t sw_if_index [default=0xffffffff];
248 };
249 
250 /** \brief Reply for bond dump request
251  @param sw_if_index - software index of bond interface
252  @param id - ID of interface
253  @param mode - bonding mode
254  @param lb - load balance algo
255  @param numa_only - enable local numa TX for lacp mode
256  @param active_members - active members count
257  @param members - config member count
258  @param interface_name - name of interface
259 */
260 define sw_bond_interface_details
261 {
263  vl_api_interface_index_t sw_if_index;
265  vl_api_bond_mode_t mode;
266  vl_api_bond_lb_algo_t lb;
267  bool numa_only;
270  string interface_name[64];
271 };
272 
273 /** \brief bond slave dump
274  @param client_index - opaque cookie to identify the sender
275  @param context - sender context, to match reply w/ request
276  @param sw_if_index - interface index of bond interface
277 */
278 define sw_interface_slave_dump
279 {
280  option deprecated;
283  vl_api_interface_index_t sw_if_index;
284 };
285 
286 /** \brief Reply for slave dump request
287  @param sw_if_index - software index of slave interface
288  @param interface_name - name of interface
289  @param is_passve - interface does not initiate the lacp protocol, remote must be active speaker
290  @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
291  @param is_local_numa - the slave interface is local numa
292  @param weight - the weight for the slave interface (active-backup mode only)
293 */
294 define sw_interface_slave_details
295 {
297  vl_api_interface_index_t sw_if_index;
298  string interface_name[64];
303 };
304 
305 /** \brief bond member dump
306  @param client_index - opaque cookie to identify the sender
307  @param context - sender context, to match reply w/ request
308  @param sw_if_index - interface index of bond interface
309 */
310 define sw_member_interface_dump
311 {
314  vl_api_interface_index_t sw_if_index;
315 };
316 
317 /** \brief Reply for member dump request
318  @param sw_if_index - software index of member interface
319  @param interface_name - name of interface
320  @param is_passve - interface does not initiate the lacp protocol, remote must be active speaker
321  @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
322  @param is_local_numa - the member interface is local numa
323  @param weight - the weight for the member interface (active-backup mode only)
324 */
325 define sw_member_interface_details
326 {
328  vl_api_interface_index_t sw_if_index;
329  string interface_name[64];
334 };
335 
336 /** \brief Interface set bond weight
337  @param client_index - opaque cookie to identify the sender
338  @param context - sender context, to match reply w/ request
339  @param sw_if_index - member interface for which to set the weight
340  @param weight - weight value to be set for the member interface
341 */
342 autoreply define sw_interface_set_bond_weight
343 {
346  vl_api_interface_index_t sw_if_index;
348 };
349 
350 /*
351  * Local Variables:
352  * eval: (c-set-style "gnu")
353  * End:
354  */
vl_api_interface_index_t sw_if_index
Definition: bond.api:114
vl_api_bond_mode_t mode
Definition: bond.api:64
void bond_detach_member(vlib_main_t *vm, bond_detach_member_args_t *args)
Definition: cli.c:829
vl_api_mac_address_t mac_address
Definition: bond.api:63
vl_api_interface_index_t sw_if_index
Definition: bond.api:170
vl_api_bond_lb_algo_t lb
Definition: bond.api:235
vl_api_interface_index_t sw_if_index
Definition: bond.api:126
vl_api_bond_mode_t mode
Definition: bond.api:265
vl_api_interface_index_t sw_if_index
Definition: bond.api:283
vl_api_interface_index_t sw_if_index
Definition: bond.api:314
bond_mode
Definition: bond.api:27
void bond_add_member(vlib_main_t *vm, bond_add_member_args_t *args)
Definition: cli.c:599
option deprecated
Definition: bond.api:58
unsigned int u32
Definition: types.h:88
vl_api_interface_index_t sw_if_index
Definition: bond.api:78
vl_api_interface_index_t sw_if_index
Definition: bond.api:142
vl_api_interface_index_t sw_if_index
Definition: bond.api:328
vl_api_bond_mode_t mode
Definition: bond.api:234
vl_api_interface_index_t sw_if_index
Definition: bond.api:263
vl_api_bond_mode_t mode
Definition: bond.api:96
vl_api_interface_index_t sw_if_index
Definition: bond.api:196
signed int i32
Definition: types.h:77
vl_api_bond_lb_algo_t lb
Definition: bond.api:65
vl_api_interface_index_t bond_sw_if_index
Definition: bond.api:171
option version
Definition: bond.api:22
vl_api_interface_index_t sw_if_index
Definition: bond.api:232
vl_api_interface_index_t bond_sw_if_index
Definition: bond.api:143
vl_api_bond_lb_algo_t lb
Definition: bond.api:97
vl_api_bond_lb_algo_t lb
Definition: bond.api:266
bond_lb_algo
Definition: bond.api:36
vl_api_interface_index_t sw_if_index
Definition: bond.api:208
vl_api_interface_index_t sw_if_index
Definition: bond.api:346
vl_api_interface_index_t sw_if_index
Definition: bond.api:297
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vl_api_mac_address_t mac_address
Definition: bond.api:101