From ea7178631ef292530993e0c91bf86f1ca9ae99d4 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Thu, 30 Jul 2020 07:31:40 -0700 Subject: bonding: add bond_create2 API to include gso option gso option is available for the debug CLI version of bond create. This patch is to create a new API to have the corresponding option in the binary API. The old binary API bond_create is marked deprecated. Type: improvement Signed-off-by: Steven Luong Change-Id: Id9501b8e6d267ae09e2b411957f181343da459c0 --- src/vpp/api/custom_dump.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/vpp') diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 79e5da499f2..8c5e0e52e54 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -717,6 +717,31 @@ static void *vl_api_bond_create_t_print FINISH; } +static void *vl_api_bond_create2_t_print + (vl_api_bond_create2_t * mp, void *handle) +{ + u8 *s; + u8 null_mac[6]; + + clib_memset (null_mac, 0, sizeof (null_mac)); + + s = format (0, "SCRIPT: bond_create2 "); + if (memcmp (mp->mac_address, null_mac, 6)) + s = format (s, "mac-address %U ", + format_ethernet_address, mp->mac_address); + if (mp->mode) + s = format (s, "mode %U ", format_bond_mode, ntohl (mp->mode)); + if (mp->lb) + s = format (s, "lb %U ", format_bond_load_balance, ntohl (mp->lb)); + if (mp->numa_only) + s = format (s, "numa-only "); + if (mp->enable_gso) + s = format (s, "gso "); + if (mp->id != ~0) + s = format (s, "id %u ", (mp->id)); + FINISH; +} + static void *vl_api_bond_delete_t_print (vl_api_bond_delete_t * mp, void *handle) { @@ -3592,6 +3617,7 @@ _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \ _(SW_INTERFACE_SET_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \ _(BOND_CREATE, bond_create) \ +_(BOND_CREATE2, bond_create2) \ _(BOND_DELETE, bond_delete) \ _(BOND_ADD_MEMBER, bond_add_member) \ _(BOND_DETACH_MEMBER, bond_detach_member) \ -- cgit 1.2.3-korg