summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2022-03-17 18:57:40 +0100
committerDamjan Marion <dmarion@me.com>2022-04-04 22:29:43 +0000
commit72c04bb7df6b6dda1ba8274a028e7a3811c17903 (patch)
tree2a6c95fb3d5c26cc5c4c2bfee2b535c62b44e527 /src
parent86aabbbeeec264bf9653992ec2e4affa629fff0f (diff)
interface api: restore order of context value
vl_api_sw_interface_tx_placement_get_t_handler is autoendian. So (contrary to most other uses) the context is in native order there. Thus, send_interface_tx_placement_details needs to convert back before using REPLY_MACRO_DETAILS5 macro. Type: fix Fixes: 0d05c0d214ffd326e531bea58f3c971bb9a58252 Change-Id: I00a3734cafa66d7d76c7edaea526a1eae0448ad9 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/interface_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 938f3bb327e..00a1ce3a599 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -1214,7 +1214,7 @@ out:
static void
send_interface_tx_placement_details (vnet_hw_if_tx_queue_t **all_queues,
u32 index, vl_api_registration_t *rp,
- u32 context)
+ u32 native_context)
{
vnet_main_t *vnm = vnet_get_main ();
vl_api_sw_interface_tx_placement_details_t *rmp;
@@ -1223,6 +1223,7 @@ send_interface_tx_placement_details (vnet_hw_if_tx_queue_t **all_queues,
uword *bitmap = q[0]->threads;
u32 hw_if_index = q[0]->hw_if_index;
vnet_hw_interface_t *hw_if = vnet_get_hw_interface (vnm, hw_if_index);
+ u32 context = clib_host_to_net_u32 (native_context);
n_bits = clib_bitmap_count_set_bits (bitmap);
u32 n = n_bits * sizeof (u32);