summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_locked.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-20vcl: nest vcl_mq_epfd to support epoll_wait without high CPU usagehanlin1-0/+6
Now, libc epfd and vls epfd are independent and can only epoll_wait independently without timeout, then app calling epoll_wait will occupy high CPU. So we nest vcl_mq_epfd into libc epfd when using eventfd with VPP, and then we can only epoll_wait libc epfd with specified timeout. Type: feature Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I6b6e0f501c769e186714bfbc187cfaed2533b4c2 Signed-off-by: hanlin <hanlin_wang@163.com>
2020-03-07vcl: fix coverity warningFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35fba8f17bdd6e2f5612358608ff6c13f4b431fe
2020-03-06vcl: refactor vls to minimize lock usageFlorin Coras1-104/+416
Type: refactor - per vls worker private pool of sessions - deep copy of vls worker data structures on fork - maintain a global, i.e., heap allocated, and lock protected pool of elements that track sessions that are shared between workers (due to forking). Credit for uncovering the issue goes to Intel team contributing code to VSAP (Ping, Yuwei, Shujun, Guoao). Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id7d8bb06ecd7b03e4134f1cae23e740cf4634649
2019-08-27session: move ctrl messages from bapi to mqFlorin Coras1-1/+1
Type:refactor Moves connect, disconnect, bind, unbind and app detach to message queue from binary api. Simplifies app/vcl interaction with the session layer since all session control messages are now handled over the mq. Add/del segment messages require internal C api changes which affect all builtin applications. They'll be moved in a different patch and might not be back portable to 19.08. Change-Id: I93f6d18e551b024effa75d47f5ff25f23ba8aff5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-09vls: relax copy on fork locksFlorin Coras1-2/+2
Change-Id: I08cb7180364a5ef8444c9895c6d4f4842661b2a7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29vls: add pthread check on vls_attrFlorin Coras1-1/+7
Change-Id: I455d108dfe52d45d040167fecb37b33e9d630c3c Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-08session/tcp/vcl: fixes and optimizationsFlorin Coras1-0/+3
Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-22session/vcl: fix coverity warningsFlorin Coras1-0/+1
Change-Id: I9b0e6d65255e516cf5bf18757d4769176ef76e92 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-30vls: support passive listenersFlorin Coras1-70/+236
If an application worker calls listen on a session, vpp registers the worker to the listener's work load balance group and, as new connections are accepted, it may potentially push accept notifications to it. There are however applications, like nginx, that on some workers may never accept new connections on a session they've started listening on. To avoid accumulating accept events on such workers, this patch adds support for passive listeners. That is, workers that have started listening on a session but then never call accept or epoll/select on that listener. Change-Id: I007e6dcb54fc88a0e3aab3c6e2a3d1ef135cbd58 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-29vls: multi-process and multi-threaded apps improvementsFlorin Coras1-39/+254
- More fine tuning for multi-process applications. - Experimental support for multi-thread apps. This is meant for app whose threads are not vcl workers and the sessions are shared between them. Change-Id: Ie07651da5f2cdcf39f5dead5431f50ad39cf3f74 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-18vcl: move forking logic to vlsFlorin Coras1-6/+236
Change-Id: I721542aca139d7908a4f917629856f82cae79962 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-07vcl/ldp: add locked sessions shim layerFlorin Coras1-0/+457
Moves LDP logic that allows sharing of sessions between multi-process app workers into a separate VCL shim layer. Also refactors LDP to use the new layer. Change-Id: I8198b51eae7d099a8c486e36b29e3a0cb8cee8e9 Signed-off-by: Florin Coras <fcoras@cisco.com>