aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_sapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vcl_sapi.c')
-rw-r--r--src/vcl/vcl_sapi.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vcl/vcl_sapi.c b/src/vcl/vcl_sapi.c
index 981257ede8d..e3e2b6ac377 100644
--- a/src/vcl/vcl_sapi.c
+++ b/src/vcl/vcl_sapi.c
@@ -30,7 +30,9 @@ vcl_api_connect_app_socket (vcl_worker_t * wrk)
if ((err = clib_socket_init (cs)))
{
- clib_error_report (err);
+ /* don't report the error to avoid flood of error messages during
+ * reconnect */
+ clib_error_free (err);
rv = -1;
goto done;
}
@@ -57,6 +59,8 @@ vcl_api_attach_reply_handler (app_sapi_attach_reply_msg_t * mp, int *fds)
}
wrk->api_client_handle = mp->api_client_handle;
+ /* reattaching via `vcl_api_retry_attach` wants wrk->vpp_wrk_index to be 0 */
+ wrk->vpp_wrk_index = 0;
segment_handle = mp->segment_handle;
if (segment_handle == VCL_INVALID_SEGMENT_HANDLE)
{
@@ -125,7 +129,9 @@ vcl_api_send_attach (clib_socket_t * cs)
(vcm->cfg.app_scope_local ? APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE : 0) |
(vcm->cfg.app_scope_global ? APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE : 0) |
(app_is_proxy ? APP_OPTIONS_FLAGS_IS_PROXY : 0) |
- (vcm->cfg.use_mq_eventfd ? APP_OPTIONS_FLAGS_EVT_MQ_USE_EVENTFD : 0);
+ (vcm->cfg.use_mq_eventfd ? APP_OPTIONS_FLAGS_EVT_MQ_USE_EVENTFD : 0) |
+ (vcm->cfg.huge_page ? APP_OPTIONS_FLAGS_USE_HUGE_PAGE : 0) |
+ (vcm->cfg.app_original_dst ? APP_OPTIONS_FLAGS_GET_ORIGINAL_DST : 0);
mp->options[APP_OPTIONS_PROXY_TRANSPORT] =
(u64) ((vcm->cfg.app_proxy_transport_tcp ? 1 << TRANSPORT_PROTO_TCP : 0) |
(vcm->cfg.app_proxy_transport_udp ? 1 << TRANSPORT_PROTO_UDP : 0));
@@ -436,7 +442,7 @@ vcl_sapi_del_cert_key_pair (u32 ckpair_index)
mp->index = ckpair_index;
cs = &wrk->app_api_sock;
- err = clib_socket_sendmsg (cs, &msg, sizeof (msg), 0, 0);
+ err = clib_socket_sendmsg (cs, msg, sizeof (*msg), 0, 0);
if (err)
{
clib_error_report (err);