aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-22session/vcl: fix coverity warningsFlorin Coras1-1/+5
Change-Id: I9b0e6d65255e516cf5bf18757d4769176ef76e92 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-19ldp: return byte count from a successful recvfromHaggai Eran1-2/+6
Unless there's an error, recvfrom should return the number of bytes received. The current code returns zero on success due to ldp_copy_ep_to_sockaddr returning zero. Change-Id: Ib843b99a08c44b5ee2d16efe9edab0cf5df65170 Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
2019-01-30ldp: initialize clib timeFlorin Coras1-8/+18
Change-Id: Ie598443f024a677a9c6938b3f3634960fd712b09 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-29vls: multi-process and multi-threaded apps improvementsFlorin Coras1-9/+10
- 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-23vcl: generate epoll events only if requestedFlorin Coras1-8/+4
Change-Id: I6e96607f09c18755eead2c7099e1f546bdae7b88 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-21ldp: add support for TCP_CONGESTION sockopts (VPP-1550)Florin Coras1-0/+9
Change-Id: I0fcf3385cc4fb96f000b84d5f880f74131c0d60f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-08vcl/ldp: select cleanup/improvementsFlorin Coras1-207/+185
Change-Id: I640e69388f2ab0f66ad60c5165c749f5a5a9f525 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-07vcl/ldp: add locked sessions shim layerFlorin Coras1-1284/+336
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>
2019-01-05vcl/session: add api for changing session app workerFlorin Coras1-105/+159
In case of multi process apps, after forking, the parent may decide to close part or all of the sessions it shares with the child. Because the sessions have fifos allocated in the parent's segment manager, they must be moved to the child's segment manager. Change-Id: I85b4c8c8545005724023ee14043647719cef61dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-3/+6
* u32/u64/uword mismatches * pointer-to-int fixes * printf formatting issues * issues with incorrect "ULL" and related suffixes * structure alignment and padding issues Change-Id: I70b989007758755fe8211c074f651150680f60b4 Signed-off-by: David Johnson <davijoh3@cisco.com>
2019-01-02ldp/vcl: epoll and shutdown cleanupFlorin Coras1-92/+45
Change-Id: I882b4c495426551fad63372dc106496c5e8c141e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-01vcl/ldp: add write msg function and fine tuningFlorin Coras1-45/+7
Allows app to push data. Additionally, ensure reset/close replies are not sent unless vcl closes the session. Change-Id: Icbbf933cf57b55cfbcc7b802af0f83919a066f65 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13ldp/vcl: reduce debug verbosityFlorin Coras1-307/+113
Also cleanup some ldp debug code. Change-Id: I23d1b9d744289244f4778f623702fc2b5d6fcd8b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05ldp: avoid calling write in destructorsFlorin Coras1-3/+6
Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03vcl: handle worker process exitFlorin Coras1-4/+1
Change-Id: Ife05d25fd736ae3064f01e974e5aecc5b48de924 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29vcl: basic support for apps that forkFlorin Coras1-2/+4
- intercept fork and register a new worker with vpp - share sessions between parent and forked child - keep binary api state per worker Change-Id: Ib177517d661724fa042bd2d98d18e777056352a2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29ldp: basic multiworker supportFlorin Coras1-119/+159
Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-27ldp: sid to fd mapper for apps with multiple workersFlorin Coras1-22/+105
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-17ldp: fixes/improvements to selectFlorin Coras1-93/+83
Change-Id: I3f3e8fce01309da02689c7e9d23cf1b3181e78c9 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-21/+24
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-14vcl/ldp: fix pollFlorin Coras1-56/+54
Change-Id: I8eb5546ff8634d5498d8ce5bbc9407bceb9ae3ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-10vcl: support for eventfd mq signalingFlorin Coras1-221/+197
- support eventfd based mq signaling. Based on configuration, vcl epoll/select can use either condvars or epoll on mq eventfds. - add vcl support for memfd segments - vpp explicitly registers cut-through segments with apps/vcl - if using eventfd, make ldp allow one call to libc_epoll_create. Needed for the message queue epfd - update svm_queue_t to allow blocking calls with eventfd signaling. Change-Id: I064151ac370bbe29bb16c968bf4e3659c8286bea Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-27vcl: use events for epoll/select/read/writeFlorin Coras1-1/+1
Have vcl poll and wait on the event message queues as opposed to constantly polling the session fifos. This also adds event signaling to cut through sessions. On the downside, because we can't wait on multiple condvars, i.e., when we have multiple message queues because of cut-through registrations, we do timed waits. Change-Id: I29ade95dba449659fe46008bb1af502276a7c5fd Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-31fix socket send() return size checkqchang1-1/+1
Change-Id: I098c671607c75cb34d04f421b4d16b73f7b47392 Signed-off-by: qchang <qing.chang1@huawei.com>
2018-02-24LDP: Refactor epoll_ctl wrapper.Dave Wallace1-45/+80
- Add AF_UNIX transaction to sock_test_client/server echo test to verify mixed epoll ldp implementation. - Misc cleanup / refactoring of ldp code. - Fix LDP_DEBUG in test/socket_test.sh Change-Id: Ib524c824728f109007d8c4d07d74603b6c687902 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-23VCL/LDP: Suppress trace output unless debug is enabled.Dave Wallace1-14/+19
Change-Id: Iaef2fe4b8c6b57d54ef6309423c9a0acba8a2f89 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-09LD_PRELOAD: Refactor nomenclature (vcom -> ldp).Dave Wallace1-0/+3447
Change-Id: Id3891fe2873b631f8f69c1ca2905968130678561 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>