diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2020-05-05 12:30:30 +0200 |
---|---|---|
committer | Jakub Grajciar <jgrajcia@cisco.com> | 2020-05-15 09:27:38 +0000 |
commit | aefcd1a3579ec2c93f606b151d563d87ea211387 (patch) | |
tree | c103644f23a5e529d5c4b2441fafe51718d52fbd | |
parent | 08f8d3dfeaddb16980c77281586caaf476723dfb (diff) |
interface: fix interface rx mode config API
Swap byte order for fields of type vl_api_rx_mode_t.
Ticket: VPP-1871
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia1745257b57209d41661d38067e0dd7618f9a9b9
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
-rw-r--r-- | src/vnet/interface_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c index fe3426cb827..5197c60115f 100644 --- a/src/vnet/interface_api.c +++ b/src/vnet/interface_api.c @@ -1003,6 +1003,7 @@ static void vl_api_sw_interface_set_rx_mode_t_handler vnet_sw_interface_t *si; clib_error_t *error; int rv = 0; + vnet_hw_interface_rx_mode rx_mode; VALIDATE_SW_IF_INDEX (mp); @@ -1013,11 +1014,12 @@ static void vl_api_sw_interface_set_rx_mode_t_handler goto bad_sw_if_index; } + rx_mode = (vnet_hw_interface_rx_mode) ntohl (mp->mode); error = set_hw_interface_change_rx_mode (vnm, si->hw_if_index, mp->queue_id_valid, ntohl (mp->queue_id), (vnet_hw_interface_rx_mode) - mp->mode); + rx_mode); if (error) { @@ -1045,7 +1047,7 @@ send_interface_rx_placement_details (vpe_api_main_t * am, mp->sw_if_index = htonl (sw_if_index); mp->queue_id = htonl (queue_id); mp->worker_id = htonl (worker_id); - mp->mode = mode; + mp->mode = htonl (mode); mp->context = context; vl_api_send_msg (rp, (u8 *) mp); |