aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-10session/vcl: improve fifo tx notificationsFlorin Coras1-4/+14
Change-Id: Ied476c417c8ba5b4d7c615125c36eecd9ca64fbc Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-08vcl/ldp: select cleanup/improvementsFlorin Coras1-43/+28
Change-Id: I640e69388f2ab0f66ad60c5165c749f5a5a9f525 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-07vcl/ldp: add locked sessions shim layerFlorin Coras1-11/+28
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-35/+171
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-04Add TLS support for VCLPing Yu1-3/+52
Ater this patch, vcl_test_client and vcl_test_server can work happily with TLS connection. "-S" is to indicate TLS connection. Change-Id: I761894b0b5929912691625f0fe63604725b55978 Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-16/+21
* 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-49/+32
Change-Id: I882b4c495426551fad63372dc106496c5e8c141e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-01vcl/ldp: add write msg function and fine tuningFlorin Coras1-20/+21
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-28vcl: handle invalid sessions in epollFlorin Coras1-3/+10
Change-Id: I62d37f3c05451e5667863a2c6c551872d5dac1ea Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-23vcl: fix coverity warningsFlorin Coras1-1/+5
Change-Id: I24445b08a46041c370094ebba4243422e2342a26 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17vcl: handle reset while reading/writing dataFlorin Coras1-17/+9
Change-Id: I73d1dde5b78bbb7835f3a4f0d35fc0d5e46ec103 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17vcl/session: handle reset/disconnect before app acceptFlorin Coras1-65/+137
Also further improves reset handling. Change-Id: I6e517632f700f181761726b965134e0c217eb06d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13ldp/vcl: reduce debug verbosityFlorin Coras1-29/+16
Also cleanup some ldp debug code. Change-Id: I23d1b9d744289244f4778f623702fc2b5d6fcd8b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13session/tcp: support tx flush markFlorin Coras1-3/+14
For tcp this means that the last enqueued data goes out with a psh bit set. Change-Id: I29d357ecae6f02e748b59a7b799150ec73d14ba2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05bapi: add options to have vpp cleanup client registrationFlorin Coras1-5/+8
A client can send a memclnt delete message and ask vpp to cleanup the shared memory queue. Obviously, in this case no delete reply is sent back to the client. Change-Id: I9c8375093f8607680ad498a6bed0690ba02a7c3b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05ldp: avoid calling write in destructorsFlorin Coras1-2/+2
Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04vcl: cleanup children that use _exit()Florin Coras1-11/+95
Change-Id: Ia56c2698adb0ea7811203844dc4db10e121fbc42 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04vcl: test refactor and improvementsFlorin Coras1-7/+10
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03vcl: handle worker process exitFlorin Coras1-5/+31
Change-Id: Ife05d25fd736ae3064f01e974e5aecc5b48de924 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03svm: use explicit svm fifo segment main for slavesFlorin Coras1-1/+1
Change-Id: Id39d64bf1b49345a3dc31c63360569212aba6865 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30vcl: wait for segments with segment handleFlorin Coras1-38/+30
Instead of waiting for notification from binary api. Change-Id: I5ecab857d6bcdbed62d6bb06709570c4cf6b19ea Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29vcl: basic support for apps that forkFlorin Coras1-117/+138
- 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-0/+6
Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-27ldp: sid to fd mapper for apps with multiple workersFlorin Coras1-0/+6
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-21session: cleanup use of api_client_indexFlorin Coras1-1/+0
Change-Id: I8a680be62ab91d2ccb144641981a635506973a49 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-18vcl/session: apps with process workersFlorin Coras1-16/+63
Allow apps to register child processes as app workers. In particular, on fork vcl now registers the child process with vpp as a new worker. Change-Id: I52a65fbc3292962b1f6e1fe0f6153f739e6e0d4a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-39/+40
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-14vcl/ldp: fix pollFlorin Coras1-13/+25
Change-Id: I8eb5546ff8634d5498d8ce5bbc9407bceb9ae3ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-16vcl: fix bidirectional tests (VPP-1455)Florin Coras1-12/+15
- add epoll dequeued events beyond maxevents to unhandled - filter multiple epoll rx events Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-14vcl: fix empty epoll returns (VPP-1453)Florin Coras1-0/+3
Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-07vcl: use want_tx_evt for ct sessionsFlorin Coras1-5/+4
Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-29vcl: handle old events before blocking in epollFlorin Coras1-1/+4
Change-Id: I3e62c787882d93c3bfb398ed0d04ef56b3a60b2b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-22vcl: remove vcl_eventFlorin Coras1-1/+0
Change-Id: I0f805ae47f6e9465070a54d85f164bc74877af01 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-20session/svm: add want_tx_event flag to fifoFlorin Coras1-22/+14
Have applications use explicit flag to request events from vpp when it transmits from a full fifo. Change-Id: I687c8f050a066bd5ce739d880eaec1f286038d95 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-14vcl: keep track of unexpected eventsFlorin Coras1-251/+293
If sessions are marked as blocking, events for other sessions received while waiting for the blocking sessions, are added to a pending list and processed later. Change-Id: Ia6c71006b1c2bcb78af708390da0cd436af397cc Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-12vcl: add apis that expos fifo as bufferFlorin Coras1-22/+106
Change-Id: I4bd9c9f73499711e04b38d53daa5c917a4285bf5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-12vcl: improve read and fifo event handlingFlorin Coras1-13/+13
Change-Id: Ic1c51818b8aa8dbd164e70bb3b7471868e5af6f6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-10session: lock app worker mq for io eventsFlorin Coras1-3/+11
Also fixes vcl client/server stats and closing procedure. Change-Id: I7d5a274ea0a3c8ea13062bf61bf402248dfe1a19 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08vcl: register workers in orderFlorin Coras1-0/+1
Change-Id: Ibc74e7f7587f8b17fc0dcec20cc4530b9dd4c3ca Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-07vcl: refactor test client to support workersFlorin Coras1-7/+13
Change-Id: I7fcfddc2bc7d9a64f8aa0d57ba5d11d325a15ce1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06vcl/session/svm: fix coverity warningsFlorin Coras1-1/+8
Change-Id: I27532b3ab244dc95955e836a42b229a6e4e32818 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06session: support multiple worker bindsFlorin Coras1-16/+23
Allows app workers to listen on the same session endpoint. Incoming connects are spread across the workers in a round-robin fashion Change-Id: Ib5f5817230d9abc6127a85cdbdcad70d980c0f7f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-30vcl: add support for multi-worker appsFlorin Coras1-435/+414
Add basic support for app registration of multiple workers. LDP does not work with multi-worker apps. Change-Id: I3fc421a2a591a077b275827463f874b261415a63 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28vcl: remove session locksFlorin Coras1-251/+126
Support for multi-worker apps will be added in future patches. This also disables vce. Change-Id: I43b0ed2d5daa2b3d8f8a12fb18bd89dcdfa0619d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28vcl/session: use mq for bind repliesFlorin Coras1-4/+58
Change-Id: Iac6e1c32cf99c5392a29f7366401b7fc39e463e3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-25vcl: remove unused binary api handlersFlorin Coras1-11/+73
Change-Id: Ifc36e3934574ba479f71157f797b2d0745b1d100 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-17vcl: unset fifo events only in read/writeFlorin Coras1-57/+21
Avoids accumulation of io event messages when the receiver is slow to read. Change-Id: I3a713d339a6ac0781c010be1fbad5a7963ab02c6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-10vcl: support for eventfd mq signalingFlorin Coras1-160/+319
- 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-31vcl: add read/write udp supportFlorin Coras1-65/+77
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-27vcl: use events for epoll/select/read/writeFlorin Coras1-620/+910
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>