diff options
author | Ole Troan <ot@cisco.com> | 2019-04-10 09:44:23 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2019-04-10 13:06:45 +0000 |
commit | 2e1c8967faf4e9f7b45471df02e4e5b07fbb520a (patch) | |
tree | 172579d8d04927851d1781262bd2483fa9bf8643 /src/vnet/ip/ip_api.c | |
parent | 13464f323a8bbd530bd85256de1c033781e098a7 (diff) |
API: Fix shared memory only action handlers.
Some API action handlers called vl_msg_ai_send_shmem()
directly. That breaks Unix domain socket API transport.
A couple (bond / vhost) also tried to send a sw_interface_event
directly, but did not send the message to all that had
registred interest. That scheme never worked correctly.
Refactored and improved the interface event code.
Change-Id: Idb90edfd8703c6ae593b36b4eeb4d3ed7da5c808
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r-- | src/vnet/ip/ip_api.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 9ecdfc8e244..ce3456d77d9 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -3343,11 +3343,10 @@ vl_api_ip_reassembly_set_t_handler (vl_api_ip_reassembly_set_t * mp) void vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp) { - unix_shared_memory_queue_t *q; + vl_api_registration_t *rp; - q = vl_api_client_index_to_input_queue (mp->client_index); - - if (q == 0) + rp = vl_api_client_index_to_registration (mp->client_index); + if (rp == 0) return; vl_api_ip_reassembly_get_reply_t *rmp = vl_msg_api_alloc (sizeof (*rmp)); @@ -3371,7 +3370,7 @@ vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp) rmp->max_reassemblies = clib_host_to_net_u32 (rmp->max_reassemblies); rmp->expire_walk_interval_ms = clib_host_to_net_u32 (rmp->expire_walk_interval_ms); - vl_msg_api_send_shmem (q, (u8 *) & rmp); + vl_api_send_msg (rp, (u8 *) rmp); } void |