Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
bonding lacp: replace slave string with member
[vpp.git]
/
src
/
vat
/
api_format.c
diff --git
a/src/vat/api_format.c
b/src/vat/api_format.c
index
d95fb8e
..
cc0f5be
100644
(file)
--- a/
src/vat/api_format.c
+++ b/
src/vat/api_format.c
@@
-1930,7
+1930,7
@@
static void vl_api_bond_delete_reply_t_handler_json
}
static void
}
static void
-vl_api_bond_
enslave_reply_t_handler (vl_api_bond_enslave
_reply_t * mp)
+vl_api_bond_
add_member_reply_t_handler (vl_api_bond_add_member
_reply_t * mp)
{
vat_main_t *vam = &vat_main;
i32 retval = ntohl (mp->retval);
{
vat_main_t *vam = &vat_main;
i32 retval = ntohl (mp->retval);
@@
-1946,8
+1946,8
@@
vl_api_bond_enslave_reply_t_handler (vl_api_bond_enslave_reply_t * mp)
}
}
}
}
-static void vl_api_bond_
enslave
_reply_t_handler_json
- (vl_api_bond_
enslave
_reply_t * mp)
+static void vl_api_bond_
add_member
_reply_t_handler_json
+ (vl_api_bond_
add_member
_reply_t * mp)
{
vat_main_t *vam = &vat_main;
vat_json_node_t node;
{
vat_main_t *vam = &vat_main;
vat_json_node_t node;
@@
-1963,8
+1963,8
@@
static void vl_api_bond_enslave_reply_t_handler_json
}
static void
}
static void
-vl_api_bond_detach_
slave_reply_t_handler (vl_api_bond_detach_slave
_reply_t *
- mp)
+vl_api_bond_detach_
member_reply_t_handler (vl_api_bond_detach_member
_reply_t *
+
mp)
{
vat_main_t *vam = &vat_main;
i32 retval = ntohl (mp->retval);
{
vat_main_t *vam = &vat_main;
i32 retval = ntohl (mp->retval);
@@
-1980,8
+1980,8
@@
vl_api_bond_detach_slave_reply_t_handler (vl_api_bond_detach_slave_reply_t *
}
}
}
}
-static void vl_api_bond_detach_
slave
_reply_t_handler_json
- (vl_api_bond_detach_
slave
_reply_t * mp)
+static void vl_api_bond_detach_
member
_reply_t_handler_json
+ (vl_api_bond_detach_
member
_reply_t * mp)
{
vat_main_t *vam = &vat_main;
vat_json_node_t node;
{
vat_main_t *vam = &vat_main;
vat_json_node_t node;
@@
-2039,8
+2039,8
@@
api_sw_interface_set_bond_weight (vat_main_t * vam)
return ret;
}
return ret;
}
-static void vl_api_sw_
interface_bond
_details_t_handler
- (vl_api_sw_
interface_bond
_details_t * mp)
+static void vl_api_sw_
bond_interface
_details_t_handler
+ (vl_api_sw_
bond_interface
_details_t * mp)
{
vat_main_t *vam = &vat_main;
{
vat_main_t *vam = &vat_main;
@@
-2048,11
+2048,11
@@
static void vl_api_sw_interface_bond_details_t_handler
"%-16s %-12d %-12U %-13U %-14u %-14u",
mp->interface_name, ntohl (mp->sw_if_index),
format_bond_mode, ntohl (mp->mode), format_bond_load_balance,
"%-16s %-12d %-12U %-13U %-14u %-14u",
mp->interface_name, ntohl (mp->sw_if_index),
format_bond_mode, ntohl (mp->mode), format_bond_load_balance,
- ntohl (mp->lb), ntohl (mp->active_
slaves), ntohl (mp->slave
s));
+ ntohl (mp->lb), ntohl (mp->active_
members), ntohl (mp->member
s));
}
}
-static void vl_api_sw_
interface_bond
_details_t_handler_json
- (vl_api_sw_
interface_bond
_details_t * mp)
+static void vl_api_sw_
bond_interface
_details_t_handler_json
+ (vl_api_sw_
bond_interface
_details_t * mp)
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
@@
-2070,24
+2070,38
@@
static void vl_api_sw_interface_bond_details_t_handler_json
mp->interface_name);
vat_json_object_add_uint (node, "mode", ntohl (mp->mode));
vat_json_object_add_uint (node, "load_balance", ntohl (mp->lb));
mp->interface_name);
vat_json_object_add_uint (node, "mode", ntohl (mp->mode));
vat_json_object_add_uint (node, "load_balance", ntohl (mp->lb));
- vat_json_object_add_uint (node, "active_slaves", ntohl (mp->active_slaves));
- vat_json_object_add_uint (node, "slaves", ntohl (mp->slaves));
+ vat_json_object_add_uint (node, "active_members",
+ ntohl (mp->active_members));
+ vat_json_object_add_uint (node, "members", ntohl (mp->members));
}
static int
}
static int
-api_sw_
interface_bond
_dump (vat_main_t * vam)
+api_sw_
bond_interface
_dump (vat_main_t * vam)
{
{
- vl_api_sw_interface_bond_dump_t *mp;
+ unformat_input_t *i = vam->input;
+ vl_api_sw_bond_interface_dump_t *mp;
vl_api_control_ping_t *mp_ping;
int ret;
vl_api_control_ping_t *mp_ping;
int ret;
+ u32 sw_if_index = ~0;
+
+ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
+ ;
+ else if (unformat (i, "sw_if_index %d", &sw_if_index))
+ ;
+ else
+ break;
+ }
print (vam->ofp,
"\n%-16s %-12s %-12s %-13s %-14s %-14s",
"interface name", "sw_if_index", "mode", "load balance",
print (vam->ofp,
"\n%-16s %-12s %-12s %-13s %-14s %-14s",
"interface name", "sw_if_index", "mode", "load balance",
- "active
slaves", "slave
s");
+ "active
members", "member
s");
/* Get list of bond interfaces */
/* Get list of bond interfaces */
- M (SW_INTERFACE_BOND_DUMP, mp);
+ M (SW_BOND_INTERFACE_DUMP, mp);
+ mp->sw_if_index = ntohl (sw_if_index);
S (mp);
/* Use a control ping for synchronization */
S (mp);
/* Use a control ping for synchronization */
@@
-2098,8
+2112,8
@@
api_sw_interface_bond_dump (vat_main_t * vam)
return ret;
}
return ret;
}
-static void vl_api_sw_
interface_slav
e_details_t_handler
- (vl_api_sw_
interface_slav
e_details_t * mp)
+static void vl_api_sw_
member_interfac
e_details_t_handler
+ (vl_api_sw_
member_interfac
e_details_t * mp)
{
vat_main_t *vam = &vat_main;
{
vat_main_t *vam = &vat_main;
@@
-2109,8
+2123,8
@@
static void vl_api_sw_interface_slave_details_t_handler
ntohl (mp->weight), mp->is_local_numa);
}
ntohl (mp->weight), mp->is_local_numa);
}
-static void vl_api_sw_
interface_slav
e_details_t_handler_json
- (vl_api_sw_
interface_slav
e_details_t * mp)
+static void vl_api_sw_
member_interfac
e_details_t_handler_json
+ (vl_api_sw_
member_interfac
e_details_t * mp)
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
{
vat_main_t *vam = &vat_main;
vat_json_node_t *node = NULL;
@@
-2133,10
+2147,10
@@
static void vl_api_sw_interface_slave_details_t_handler_json
}
static int
}
static int
-api_sw_
interface_slav
e_dump (vat_main_t * vam)
+api_sw_
member_interfac
e_dump (vat_main_t * vam)
{
unformat_input_t *i = vam->input;
{
unformat_input_t *i = vam->input;
- vl_api_sw_
interface_slav
e_dump_t *mp;
+ vl_api_sw_
member_interfac
e_dump_t *mp;
vl_api_control_ping_t *mp_ping;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
vl_api_control_ping_t *mp_ping;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
@@
-2161,11
+2175,11
@@
api_sw_interface_slave_dump (vat_main_t * vam)
print (vam->ofp,
"\n%-25s %-12s %-7s %-12s %-10s %-10s",
print (vam->ofp,
"\n%-25s %-12s %-7s %-12s %-10s %-10s",
- "
slave
interface name", "sw_if_index", "passive", "long_timeout",
+ "
member
interface name", "sw_if_index", "passive", "long_timeout",
"weight", "local numa");
/* Get list of bond interfaces */
"weight", "local numa");
/* Get list of bond interfaces */
- M (SW_
INTERFACE_SLAV
E_DUMP, mp);
+ M (SW_
MEMBER_INTERFAC
E_DUMP, mp);
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
@@
-5230,11
+5244,11
@@
_(VIRTIO_PCI_DELETE_REPLY, virtio_pci_delete_reply) \
_(SW_INTERFACE_VIRTIO_PCI_DETAILS, sw_interface_virtio_pci_details) \
_(BOND_CREATE_REPLY, bond_create_reply) \
_(BOND_DELETE_REPLY, bond_delete_reply) \
_(SW_INTERFACE_VIRTIO_PCI_DETAILS, sw_interface_virtio_pci_details) \
_(BOND_CREATE_REPLY, bond_create_reply) \
_(BOND_DELETE_REPLY, bond_delete_reply) \
-_(BOND_
ENSLAVE_REPLY, bond_enslave_reply)
\
-_(BOND_DETACH_
SLAVE_REPLY, bond_detach_slave_reply)
\
+_(BOND_
ADD_MEMBER_REPLY, bond_add_member_reply)
\
+_(BOND_DETACH_
MEMBER_REPLY, bond_detach_member_reply)
\
_(SW_INTERFACE_SET_BOND_WEIGHT_REPLY, sw_interface_set_bond_weight_reply) \
_(SW_INTERFACE_SET_BOND_WEIGHT_REPLY, sw_interface_set_bond_weight_reply) \
-_(SW_
INTERFACE_BOND_DETAILS, sw_interface_bond
_details) \
-_(SW_
INTERFACE_SLAVE_DETAILS, sw_interface_slav
e_details) \
+_(SW_
BOND_INTERFACE_DETAILS, sw_bond_interface
_details) \
+_(SW_
MEMBER_INTERFACE_DETAILS, sw_member_interfac
e_details) \
_(IP_ROUTE_ADD_DEL_REPLY, ip_route_add_del_reply) \
_(IP_TABLE_ADD_DEL_REPLY, ip_table_add_del_reply) \
_(IP_TABLE_REPLACE_BEGIN_REPLY, ip_table_replace_begin_reply) \
_(IP_ROUTE_ADD_DEL_REPLY, ip_route_add_del_reply) \
_(IP_TABLE_ADD_DEL_REPLY, ip_table_add_del_reply) \
_(IP_TABLE_REPLACE_BEGIN_REPLY, ip_table_replace_begin_reply) \
@@
-7747,10
+7761,10
@@
api_bond_delete (vat_main_t * vam)
}
static int
}
static int
-api_bond_
enslave
(vat_main_t * vam)
+api_bond_
add_member
(vat_main_t * vam)
{
unformat_input_t *i = vam->input;
{
unformat_input_t *i = vam->input;
- vl_api_bond_
enslave
_t *mp;
+ vl_api_bond_
add_member
_t *mp;
u32 bond_sw_if_index;
int ret;
u8 is_passive;
u32 bond_sw_if_index;
int ret;
u8 is_passive;
@@
-7781,12
+7795,12
@@
api_bond_enslave (vat_main_t * vam)
}
if (sw_if_index_is_set == 0)
{
}
if (sw_if_index_is_set == 0)
{
- errmsg ("Missing
slave
sw_if_index. ");
+ errmsg ("Missing
member
sw_if_index. ");
return -99;
}
/* Construct the API message */
return -99;
}
/* Construct the API message */
- M (BOND_
ENSLAVE
, mp);
+ M (BOND_
ADD_MEMBER
, mp);
mp->bond_sw_if_index = ntohl (bond_sw_if_index);
mp->sw_if_index = ntohl (sw_if_index);
mp->bond_sw_if_index = ntohl (bond_sw_if_index);
mp->sw_if_index = ntohl (sw_if_index);
@@
-7802,10
+7816,10
@@
api_bond_enslave (vat_main_t * vam)
}
static int
}
static int
-api_bond_detach_
slave
(vat_main_t * vam)
+api_bond_detach_
member
(vat_main_t * vam)
{
unformat_input_t *i = vam->input;
{
unformat_input_t *i = vam->input;
- vl_api_bond_detach_
slave
_t *mp;
+ vl_api_bond_detach_
member
_t *mp;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
int ret;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
int ret;
@@
-7828,7
+7842,7
@@
api_bond_detach_slave (vat_main_t * vam)
}
/* Construct the API message */
}
/* Construct the API message */
- M (BOND_DETACH_
SLAVE
, mp);
+ M (BOND_DETACH_
MEMBER
, mp);
mp->sw_if_index = ntohl (sw_if_index);
mp->sw_if_index = ntohl (sw_if_index);
@@
-20618,13
+20632,13
@@
_(bond_create, \
"[id <if-id>]") \
_(bond_delete, \
"<vpp-if-name> | sw_if_index <id>") \
"[id <if-id>]") \
_(bond_delete, \
"<vpp-if-name> | sw_if_index <id>") \
-_(bond_
enslave,
\
+_(bond_
add_member,
\
"sw_if_index <n> bond <sw_if_index> [is_passive] [is_long_timeout]") \
"sw_if_index <n> bond <sw_if_index> [is_passive] [is_long_timeout]") \
-_(bond_detach_
slave,
\
+_(bond_detach_
member,
\
"sw_if_index <n>") \
_(sw_interface_set_bond_weight, "<intfc> | sw_if_index <nn> weight <value>") \
"sw_if_index <n>") \
_(sw_interface_set_bond_weight, "<intfc> | sw_if_index <nn> weight <value>") \
-
_(sw_interface_bond_dump, "")
\
-
_(sw_interface_slave_dump,
\
+
_(sw_bond_interface_dump, "<intfc> | sw_if_index <nn>")
\
+
_(sw_member_interface_dump,
\
"<vpp-if-name> | sw_if_index <id>") \
_(ip_table_add_del, \
"table <n> [ipv6] [add | del]\n") \
"<vpp-if-name> | sw_if_index <id>") \
_(ip_table_add_del, \
"table <n> [ipv6] [add | del]\n") \