From 3d1ef873da900ddf4ef18d5cf7709aab70ed6b7d Mon Sep 17 00:00:00 2001 From: Jakub Grajciar Date: Mon, 26 Aug 2019 12:55:15 +0200 Subject: bonding: API cleanup Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar Change-Id: Idbba4ab6a412b75338e3149e51476693f0862f16 Signed-off-by: Jakub Grajciar --- src/vnet/bonding/bond_api.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/vnet/bonding/bond_api.c') diff --git a/src/vnet/bonding/bond_api.c b/src/vnet/bonding/bond_api.c index 74334b52bf2..ebbb80e956b 100644 --- a/src/vnet/bonding/bond_api.c +++ b/src/vnet/bonding/bond_api.c @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -78,12 +79,12 @@ vl_api_bond_create_t_handler (vl_api_bond_create_t * mp) if (mp->use_custom_mac) { - clib_memcpy (ap->hw_addr, mp->mac_address, 6); + mac_address_decode (mp->mac_address, (mac_address_t *) ap->hw_addr); ap->hw_addr_set = 1; } - ap->mode = mp->mode; - ap->lb = mp->lb; + ap->mode = ntohl (mp->mode); + ap->lb = ntohl (mp->lb); ap->numa_only = mp->numa_only; bond_create_if (vm, ap); @@ -168,8 +169,8 @@ bond_send_sw_interface_details (vpe_api_main_t * am, clib_memcpy (mp->interface_name, bond_if->interface_name, MIN (ARRAY_LEN (mp->interface_name) - 1, strlen ((const char *) bond_if->interface_name))); - mp->mode = bond_if->mode; - mp->lb = bond_if->lb; + mp->mode = htonl (bond_if->mode); + mp->lb = htonl (bond_if->lb); mp->numa_only = bond_if->numa_only; mp->active_slaves = htonl (bond_if->active_slaves); mp->slaves = htonl (bond_if->slaves); -- cgit 1.2.3-korg