diff options
author | Maros Ondrejicka <maros.ondrejicka@pantheon.tech> | 2022-10-06 18:17:05 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-10-06 20:32:43 +0000 |
commit | 6ff8e90ed45e25e619f27beee1e0d016234e141e (patch) | |
tree | a31ce1f431145ae719473c4bfc1874fcbd31878d /src/vcl/vppcom.c | |
parent | 426f8f239fea0ad28d9e8bf4d712e4ae12ce49e0 (diff) |
vcl: add api to check if vcl disconnected from vpp
Type: feature
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I98bc108360f9d04a33126865ce49d2702cbe9cdf
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r-- | src/vcl/vppcom.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index d217058370e..ae45be3b359 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -4490,6 +4490,17 @@ vppcom_session_get_error (uint32_t session_handle) return VPPCOM_OK; } +int +vppcom_worker_is_detached (void) +{ + vcl_worker_t *wrk = vcl_worker_get_current (); + + if (!vcm->cfg.use_mq_eventfd) + return VPPCOM_ENOTSUP; + + return wrk->api_client_handle == ~0; +} + /* * fd.io coding-style-patch-verification: ON * |