diff options
author | Florin Coras <fcoras@cisco.com> | 2024-11-26 00:29:24 -0800 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-11-28 21:58:56 +0000 |
commit | 978d48b7656a0b2dd53a032c37681c5e7d66ba90 (patch) | |
tree | 3196b72ce43f35318ff4dcec8462a8d5a5c322bd /src/vcl/vppcom.c | |
parent | 3628353e093752f34704a82ae85a27d8f951e05e (diff) |
vcl: store libc_epfd in vls instead of vcl
ldp stores the libc epfds it uses in conjunction with vcl epfds in vcl
attributes. Apart from being an ldp, as opposed to vcl, specific
attribute, the epfd is retrieved on session close with vls locks that
could be acquired from multiple threads.
Avoid grabbing locks when retrieving the attribute.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5fc52d72667a7693b1557d209c3890a968422f1e
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r-- | src/vcl/vppcom.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 4568ac618d5..d2973589f5f 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -3893,25 +3893,6 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op, rv = VPPCOM_EINVAL; break; - case VPPCOM_ATTR_GET_LIBC_EPFD: - rv = session->libc_epfd; - VDBG (2, "VPPCOM_ATTR_GET_LIBC_EPFD: libc_epfd %d", rv); - break; - - case VPPCOM_ATTR_SET_LIBC_EPFD: - if (PREDICT_TRUE (buffer && buflen && - (*buflen == sizeof (session->libc_epfd)))) - { - session->libc_epfd = *(int *) buffer; - *buflen = sizeof (session->libc_epfd); - - VDBG (2, "VPPCOM_ATTR_SET_LIBC_EPFD: libc_epfd %d, buflen %d", - session->libc_epfd, *buflen); - } - else - rv = VPPCOM_EINVAL; - break; - case VPPCOM_ATTR_GET_PROTOCOL: if (buffer && buflen && (*buflen >= sizeof (int))) { |