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