blob: e779453b091f0a2defeea4b98884a7422a1fad7a [file] [log] [blame]
Steven9cd2d7a2017-12-20 12:43:01 -08001/*
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
22option version = "1.0.0";
23
24/** \brief Initialize a new bond interface with the given paramters
25 @param client_index - opaque cookie to identify the sender
26 @param context - sender context, to match reply w/ request
Alexander Chernavinad9d5282018-12-13 09:08:09 -050027 @param id - if non-~0, specifies a custom interface ID
Steven9cd2d7a2017-12-20 12:43:01 -080028 @param use_custom_mac - if set, mac_address is valid
29 @param mac_address - mac addr to assign to the interface if use_custom_mac is set
30 @param mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcastcast, 5=lacp)
31 @param lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored
32*/
33define bond_create
34{
35 u32 client_index;
36 u32 context;
Alexander Chernavinad9d5282018-12-13 09:08:09 -050037 u32 id;
Steven9cd2d7a2017-12-20 12:43:01 -080038 u8 use_custom_mac;
39 u8 mac_address[6];
40 u8 mode;
41 u8 lb;
42};
43
44/** \brief Reply for bond create reply
45 @param context - returned sender context, to match reply w/ request
46 @param retval - return code
47 @param sw_if_index - software index allocated for the new tap interface
48*/
49define bond_create_reply
50{
51 u32 context;
52 i32 retval;
53 u32 sw_if_index;
54};
55
56/** \brief Delete bond interface
57 @param client_index - opaque cookie to identify the sender
58 @param context - sender context, to match reply w/ request
59 @param sw_if_index - interface index of slave interface
60*/
61autoreply define bond_delete
62{
63 u32 client_index;
64 u32 context;
65 u32 sw_if_index;
66};
67
68/** \brief Initialize a new bond interface with the given paramters
69 @param client_index - opaque cookie to identify the sender
70 @param context - sender context, to match reply w/ request
71 @param sw_if_index - slave sw_if_index
72 @param bond_sw_if_index - bond sw_if_index
73 @param is_passive - interface does not initiate the lacp protocol, remote must be active speaker
74 @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
75*/
76define bond_enslave
77{
78 u32 client_index;
79 u32 context;
80 u32 sw_if_index;
81 u32 bond_sw_if_index;
82 u8 is_passive;
83 u8 is_long_timeout;
84};
85
86/** \brief Reply for bond enslave reply
87 @param context - returned sender context, to match reply w/ request
88 @param retval - return code
89*/
90define bond_enslave_reply
91{
92 u32 context;
93 i32 retval;
94};
95
96/** \brief bond detach slave
97 @param client_index - opaque cookie to identify the sender
98 @param context - sender context, to match reply w/ request
99 @param sw_if_index - interface index of slave interface
100*/
101autoreply define bond_detach_slave
102{
103 u32 client_index;
104 u32 context;
105 u32 sw_if_index;
106};
107
108/** \brief Dump bond interfaces request */
109define sw_interface_bond_dump
110{
111 u32 client_index;
112 u32 context;
113};
114
115/** \brief Reply for bond dump request
116 @param sw_if_index - software index of bond interface
Alexander Chernavinad9d5282018-12-13 09:08:09 -0500117 @param id - ID of interface
Steven9cd2d7a2017-12-20 12:43:01 -0800118 @param interface_name - name of interface
119 @param mode - bonding mode
120 @param lb - load balance algo
121 @param active_slaves - active slaves count
122 @param slaves - config slave count
123*/
124define sw_interface_bond_details
125{
126 u32 context;
127 u32 sw_if_index;
Alexander Chernavinad9d5282018-12-13 09:08:09 -0500128 u32 id;
Steven9cd2d7a2017-12-20 12:43:01 -0800129 u8 interface_name[64];
130 u8 mode;
131 u8 lb;
132 u32 active_slaves;
133 u32 slaves;
134};
135
136/** \brief bond slave dump
137 @param client_index - opaque cookie to identify the sender
138 @param context - sender context, to match reply w/ request
139 @param sw_if_index - interface index of bond interface
140*/
141define sw_interface_slave_dump
142{
143 u32 client_index;
144 u32 context;
145 u32 sw_if_index;
146};
147
148/** \brief Reply for slave dump request
149 @param sw_if_index - software index of slave interface
150 @param interface_name - name of interface
151 @param is_passve - interface does not initiate the lacp protocol, remote must be active speaker
152 @param is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout
153*/
154define sw_interface_slave_details
155{
156 u32 context;
157 u32 sw_if_index;
158 u8 interface_name[64];
159 u8 is_passive;
160 u8 is_long_timeout;
161};
162
163/*
164 * Local Variables:
165 * eval: (c-set-style "gnu")
166 * End:
167 */