summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-09-15 15:56:51 -0700
committerDave Barach <openvpp@barachs.net>2020-09-16 15:18:35 +0000
commitcc7c88e529eb3a2ca0934f27eb048c8ca3788f95 (patch)
tree644a69e7885a4b1993a3eb463d31326c04d89d52 /src/vnet
parent8b0cd69d31a50e7f4a454d45e903c6cdaf23fbfe (diff)
vcl: refactor bapi client index for sapi reuse
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibebb6f7d4e610570693e213acd2f6d9332c563c6
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/application_interface.h1
-rw-r--r--src/vnet/session/session_api.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index a36008a1e71..1f3e181953b 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -825,6 +825,7 @@ typedef struct app_sapi_worker_add_del_reply_msg_
u32 wrk_index;
u64 app_event_queue_address;
u64 segment_handle;
+ u32 api_client_handle;
u8 n_fds;
u8 fd_flags;
u8 is_add;
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 988d3e26138..89a30d2626d 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1434,8 +1434,8 @@ sapi_add_del_worker_handler (app_namespace_t * app_ns,
app_ns_api_handle_t *handle;
app_sapi_msg_t msg = { 0 };
app_worker_t *app_wrk;
+ u32 sapi_handle = -1;
application_t *app;
- u32 sapi_handle;
u8 fd_flags = 0;
app = application_get_if_valid (mp->app_index);
@@ -1486,6 +1486,7 @@ done:
rmp = &msg.worker_add_del_reply;
rmp->retval = rv;
rmp->is_add = mp->is_add;
+ rmp->api_client_handle = sapi_handle;
rmp->wrk_index = args.wrk_map_index;
rmp->segment_handle = args.segment_handle;
if (!rv && mp->is_add)