aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api/custom_dump.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-07-30 07:31:40 -0700
committerDave Barach <openvpp@barachs.net>2020-09-02 14:47:28 +0000
commitea7178631ef292530993e0c91bf86f1ca9ae99d4 (patch)
treea06bb2708ebcf1695cd2406cf24bc3d8d05200fd /src/vpp/api/custom_dump.c
parent8ccea00339a550902f76a5ec24c1dda5a5975eaf (diff)
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 <sluong@cisco.com> Change-Id: Id9501b8e6d267ae09e2b411957f181343da459c0
Diffstat (limited to 'src/vpp/api/custom_dump.c')
-rw-r--r--src/vpp/api/custom_dump.c26
1 files changed, 26 insertions, 0 deletions
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) \