summaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-11-22 11:26:19 +0100
committerDave Wallace <dwallacelf@gmail.com>2019-11-22 21:08:19 +0000
commitb2fce36c8ebd19bd9a60b06988ce753d93e59d81 (patch)
treede175c7b7201eed8db53986d7224700e2616d1e5 /src/plugins/hs_apps/sapi/vpp_echo_bapi.c
parent952a7b8b74be7fd237e6c0ccfe423876aa7e7b3e (diff)
hsa: Improve for mq-intensive
Type: feature * Remove the retry mechanism in case of failed connect * Limit the number of simultaneous connects (default to mqsize / 2) Change-Id: I7a0ed2e349ee3e8ca71639c2a2ec4cdf84f5c13e Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo_bapi.c')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo_bapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
index 3cfe6a78ec5..2bba9fc0fe2 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
@@ -149,6 +149,10 @@ echo_send_connect (u64 parent_session_handle, u32 opaque)
session_connect_msg_t *mp;
svm_msg_q_t *mq = em->ctrl_mq;
+ clib_atomic_sub_fetch (&em->max_sim_connects, 1);
+ while (em->max_sim_connects <= 0)
+ ;
+
app_alloc_ctrl_evt_to_vpp (mq, app_evt, SESSION_CTRL_EVT_CONNECT);
mp = (session_connect_msg_t *) app_evt->evt->data;
memset (mp, 0, sizeof (*mp));