summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_locked.h
AgeCommit message (Collapse)AuthorFilesLines
2021-06-14vcl: improve shutdown()liuyacan1-1/+1
This commit does following: - Change the behavior of shutdown() with SHUT_RDWR flag. - Check SHUT_RD flag when read() - Change the errno when write() after SHUT_WR - Remove unused code All the above modification passed the packetdrill test. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0c81f52e563562e58580d70976526b898e65e915
2021-05-12session: support half-close connectionliuyacan1-0/+1
Some app(e.g. Envoy) may call shutdown() instead of close() when draining connection. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
2021-01-11vcl: fix deadlock in rpcwanghanlin1-0/+1
Worker thread A send rpc to worker thread B with vls_table_lock when worker thread B try to lock vls_table_lock, so unlock it temporarily. Add worker_rpc_lock to synchronize rpc message among workers to prevent waiting for each other deadly. Add timeout for rpc response to prevent hanging when VPP exit/crash. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I675f1fe76673ede09107f6eeaaa0eda8bbfc6e61
2020-08-12vcl: support multi-threads with session migrationhanlin1-0/+3
Currently, mutlti-threads only support one dispatch thread and multiple worker threads, eventually only dispatch thread is a vcl worker and can interact with epoll. This patch will register all threads as vcl worker, and then each thread can interact with epoll now. Moreover, session migration also supported, such as socket created in thread A and used (bind, connect and etc.) in thread B. Type: feature Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: Iab0b43a33466968c1423d7d20faf1460c8589d91
2020-05-20vcl: nest vcl_mq_epfd to support epoll_wait without high CPU usagehanlin1-0/+1
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>
2019-01-29vls: multi-process and multi-threaded apps improvementsFlorin Coras1-0/+2
- 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-07vcl/ldp: add locked sessions shim layerFlorin Coras1-0/+60
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>