From 935ce75cb060da34991e6b02bec5680445f85323 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 8 Sep 2020 22:43:47 -0700 Subject: vcl: add support for app socket api To enable add "app-socket-api /path/to/socket" to vcl.conf. On vpp side, add use-app-socket-api to session stanza in startup.conf VPP allocates a socket per application namespace which it places in the app_ns_sockets subfolder of the run folder (default /var/run/vpp). The socket used implicitly selects the app namespace for the vcl app. Type: feature Signed-off-by: Florin Coras Change-Id: Ifc14b93dcbf6ef9bed1852d46cd069f4855b92ef --- src/vcl/vcl_cfg.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vcl/vcl_cfg.c') diff --git a/src/vcl/vcl_cfg.c b/src/vcl/vcl_cfg.c index 0900b318fce..3fdda9cd604 100644 --- a/src/vcl/vcl_cfg.c +++ b/src/vcl/vcl_cfg.c @@ -296,6 +296,13 @@ vppcom_cfg_read_file (char *conf_fname) VCFG_DBG (0, "VCL<%d>: configured api-socket-name (%s)", getpid (), vcl_cfg->vpp_bapi_socket_name); } + else if (unformat (line_input, "app-socket-api %s", + &vcl_cfg->vpp_app_socket_api)) + { + vec_terminate_c_string (vcl_cfg->vpp_app_socket_api); + VCFG_DBG (0, "VCL<%d>: configured app-socket-api (%s)", + getpid (), vcl_cfg->vpp_app_socket_api); + } else if (unformat (line_input, "vpp-api-q-length %d", &q_len)) { if (q_len < vcl_cfg->vpp_api_q_length) -- cgit 1.2.3-korg