summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
AgeCommit message (Collapse)AuthorFilesLines
2018-10-31session: prioritize postponed sessionsFlorin Coras3-45/+33
If sessions cannot be handled during the current dispatch loop iteration, ensure that they are first to be handled in the next. Change-Id: Ifc6215900f8cfd530d4886b58641189f0ccf9bb7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-31session: add wrk contextFlorin Coras5-157/+166
Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-28session: move test to unittest pluginFlorin Coras1-1756/+0
Change-Id: I4921054b4e42bac3442d399681b21b613ce8b681 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-28session: extend connect api for internal appsFlorin Coras12-119/+397
Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-25session/tcp: improve cliFlorin Coras4-24/+82
Change-Id: I91c9d040fc9b9b63f7109eeaac334c47fb1226cf Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-25tcp/session: add tx pacerFlorin Coras6-2/+233
Adds tx pacing infrastructure for transport protocols that want to use it. Particularly useful for connections with non-negligible rtt and constrained network throughput as it avoids large tx bursts that lead to local interface tx or network drops. By default the pacer is disabled. To enabled it for tcp, add tx-pacing to tcp's startup conf. We are still slightly inefficient in the handling of incoming packets in established state so the pacer slightly affect maximum throughput in low lacency scenarios. Change-Id: Id445b2ffcd64cce015f75b773f7d722faa0f7ca9 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-23c11 safe string handling supportDave Barach14-70/+70
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-18tls: fix connection failures/interrupts at scale (VPP-1464)Florin Coras1-2/+6
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-18tcp: fix cleanup of non established connections (VPP-1463)Florin Coras1-0/+1
- fix delete of connection in syn-received - fix delete of half-open connection Change-Id: I72ff4b60406a2762d998328c52f41adea40d2c1b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-16tls: fix multi threaded medium scale test (VPP-1457)Florin Coras3-6/+10
- ensure session enqueue epoch does not wrap between two enqueues - use 3 states for echo clients app, to distinguish between starting and closing phases - force tcp fin retransmit if out of buffers while sending a fin Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-16vcl: fix bidirectional tests (VPP-1455)Florin Coras1-24/+24
- 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-14session: mark apis for deprecationFlorin Coras1-2/+9
Change-Id: I913ffc963928b74cf4753b6b9a0eed4436887e04 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-12session: don't wait indefinitely for apps to consume evts (VPP-1454)Florin Coras1-10/+28
Change-Id: I544b24d2b2c4a09829773cf180d1747f4b087d4c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-05session: fix local session tagging and cleanupFlorin Coras3-7/+5
Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04udp_echo: fix cut-through server modeFlorin Coras2-19/+26
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03session: fix first segment manager cleanupFlorin Coras2-4/+5
Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02tls: fix disconnects for sessions with pending dataFlorin Coras3-4/+13
TLS can enqueue events to itself when app session queue cannot be entirely drained. If a pending disconnect is handled before any such event, session layer may try to dequeue data on deallocated sessions. Change-Id: I5bfc4d53ce95bc16b6a01e1b0e644aafa1ca311b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-29session: lock msg queues while generating control eventsFlorin Coras1-12/+6
Change-Id: I229ce9c306a97956c87ccb8f7a1c5c9dac94ab31 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-20session/svm: add want_tx_event flag to fifoFlorin Coras1-6/+7
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-19session: improve close procedureFlorin Coras5-19/+48
Change-Id: I6201a044e70ab6a58db8212960c57edc77c41f96 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-15session: ensure detach is done with worker barrierFlorin Coras1-7/+12
Change-Id: I98a79f2c3b0268c414dd295c7ebfc561ce049d4b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-14vcl: keep track of unexpected eventsFlorin Coras2-5/+4
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: improve read and fifo event handlingFlorin Coras3-1/+4
Change-Id: Ic1c51818b8aa8dbd164e70bb3b7471868e5af6f6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-10session: lock app worker mq for io eventsFlorin Coras4-29/+25
Also fixes vcl client/server stats and closing procedure. Change-Id: I7d5a274ea0a3c8ea13062bf61bf402248dfe1a19 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08vcl: set worker pthread stop keyFlorin Coras1-1/+1
Otherwise the key destructor is not called on pthread_exit. Change-Id: I11e6b9683a926eecd3f40a44aab41924ff9c3101 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08session: detect namespace for transport appsFlorin Coras2-4/+19
Change-Id: I770607cb213d538a29d7bd5762682981b01e9d18 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-07session: fix reentrant listensFlorin Coras2-8/+13
Change-Id: I72d400401a308012b43513179870823f6f921e44 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-07vcl: refactor test client to support workersFlorin Coras1-1/+1
Change-Id: I7fcfddc2bc7d9a64f8aa0d57ba5d11d325a15ce1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06vcl/session/svm: fix coverity warningsFlorin Coras1-3/+3
Change-Id: I27532b3ab244dc95955e836a42b229a6e4e32818 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06session: support multiple worker bindsFlorin Coras12-325/+593
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-31VPP-1408: Fix bug that wrong tx fifo drop in buffer chains flow of dgram modeshubing guo1-1/+4
-- Not drop session dgram hdr when to drop processed udp message from tx fifo Change-Id: Id5ce5780817041bca05011f7b9b53e97a6d78da4 Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-30vcl: add support for multi-worker appsFlorin Coras2-1/+7
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/session: use mq for bind repliesFlorin Coras5-0/+121
Change-Id: Iac6e1c32cf99c5392a29f7366401b7fc39e463e3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24session: fix coverity warningsFlorin Coras3-5/+12
Change-Id: I2a25bba675fc9c84e5d391533e92b9a041637405 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24session: add support for multiple app workersFlorin Coras14-703/+1238
Refactor session layer to support multiple workers per application. Change-Id: Ie67354688d396449d14bbbb8c56050206e307cd8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24tcp: fix cc recovery re-entry and persist timer popFlorin Coras2-2/+11
Change-Id: I89e8052f2d2c36dd3de5255c4ee570722dc58227 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-23session: fix retrieval of local sessions if app is detachedFlorin Coras1-1/+3
Change-Id: I0f5c1dc99610b65646c3b5cf8da7aea273371e4d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-15Remove client_index field from replies in APIOndrej Fabry2-4/+1
- replies should not need to contain client_index since it is used to identify sender of requests to VPP Change-Id: Iece3853b3f020054ee1652b149d0cf8d9580db4e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-10vcl: support for eventfd mq signalingFlorin Coras9-69/+249
- 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-08-04socket api: multiple fds in one msgFlorin Coras1-1/+2
Change-Id: I77a6e092a42290eed7201ad4a62e0d00ef997d2b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-31vcl: add read/write udp supportFlorin Coras3-17/+32
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-28session/dlmalloc: coverity fixesFlorin Coras1-1/+1
Change-Id: I17ffec018f5d2fb06a7a3af6d8bc6128ffee3ae6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-27vcl: use events for epoll/select/read/writeFlorin Coras9-32/+46
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-07-23session: send rx events only if session readyFlorin Coras2-2/+9
Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-19session: coverity warningsFlorin Coras1-8/+10
Change-Id: I4505954c737e8c6a3d4177c6833f2b12099e6dd4 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17session: send ctrl msg over mqFlorin Coras8-62/+519
Change-Id: I242056bc46ddb671064665916b2687860292dcb2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17session: use msg queue for eventsFlorin Coras9-179/+424
Change-Id: I3c58367eec2243fe19b75be78a175c5261863e9e Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17session: make sure segment sizes are page alignedFlorin Coras1-1/+3
Change-Id: Ibbba75d069ca1bbf9e5a1b8bd2f405d32021c656 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-11session: push tx notifications only if neededFlorin Coras1-1/+6
VPP-1340 Change-Id: Ia3f2fc054dbfb2ba912a768c70466e7042024e32 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-08session/svm: fix coverity warningsFlorin Coras1-1/+5
Change-Id: Ic5daed1f6c23d9561a04e235dcbf257f190d066a Signed-off-by: Florin Coras <fcoras@cisco.com>