diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-08-26 12:55:15 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-09-11 15:14:02 +0000 |
commit | 3d1ef873da900ddf4ef18d5cf7709aab70ed6b7d (patch) | |
tree | f1fa77818a9a67e2f149ba540bcb251dc9f4f10b /src/vnet/bonding/bond_api.c | |
parent | 558e3e09577a7b49e2fec58e8ac27f3f3ae0592f (diff) |
bonding: API cleanup
Use consistent API types.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Idbba4ab6a412b75338e3149e51476693f0862f16
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vnet/bonding/bond_api.c')
-rw-r--r-- | src/vnet/bonding/bond_api.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <vnet/interface.h> #include <vnet/api_errno.h> #include <vnet/ethernet/ethernet.h> +#include <vnet/ethernet/ethernet_types_api.h> #include <vnet/vnet_msg_enum.h> @@ -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); |