From 794599bccae8bfb57c17b0c3c8b96630b0bf9bb9 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Wed, 9 Feb 2022 08:35:26 +0000 Subject: vcl: make eventfd flag configurable from env Type: feature Signed-off-by: Filip Tehlar Change-Id: Id25e2188c9167b2e187923ebe10660e0bc9c3c0a --- src/vcl/vcl_cfg.c | 7 +++++++ src/vcl/vppcom.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/vcl/vcl_cfg.c b/src/vcl/vcl_cfg.c index 2ac9eddb6a8..4e0b583e2ec 100644 --- a/src/vcl/vcl_cfg.c +++ b/src/vcl/vcl_cfg.c @@ -591,6 +591,13 @@ vppcom_cfg (vppcom_cfg_t * vcl_cfg) VCFG_DBG (0, "VCL<%d>: configured app-socket-api (%s)", getpid (), vcl_cfg->vpp_app_socket_api); } + env_var_str = getenv (VPPCOM_ENV_APP_USE_MQ_EVENTFD); + if (env_var_str) + { + vcm->cfg.use_mq_eventfd = 1; + VCFG_DBG (0, "VCL<%d>: configured " VPPCOM_ENV_APP_USE_MQ_EVENTFD, + getpid ()); + } } /* diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h index 46517ad8c8c..c50850c9cc3 100644 --- a/src/vcl/vppcom.h +++ b/src/vcl/vppcom.h @@ -42,6 +42,7 @@ extern "C" #define VPPCOM_ENV_APP_NAMESPACE_SECRET "VCL_APP_NAMESPACE_SECRET" #define VPPCOM_ENV_APP_SCOPE_LOCAL "VCL_APP_SCOPE_LOCAL" #define VPPCOM_ENV_APP_SCOPE_GLOBAL "VCL_APP_SCOPE_GLOBAL" +#define VPPCOM_ENV_APP_USE_MQ_EVENTFD "VCL_APP_USE_MQ_EVENTFD" #define VPPCOM_ENV_VPP_API_SOCKET "VCL_VPP_API_SOCKET" #define VPPCOM_ENV_VPP_SAPI_SOCKET "VCL_VPP_SAPI_SOCKET" -- cgit 1.2.3-korg