aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
AgeCommit message (Collapse)AuthorFilesLines
2019-05-25tcp: handle fin+rst in same frameFlorin Coras1-1/+8
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-20session: add support for vrf in session unformat (VPP-1546)Florin Coras1-7/+22
Change-Id: Ic5ba751c2bd2db9af4a21d3db40cc305d1208c30 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit baee8d498830bbbf54ec76e7c0c887c6373fe985)
2019-01-12session: generate wrong thread errors instead of crashingFlorin Coras2-10/+31
Change-Id: I7e59ae718d2722c49d42b22a0874e1645a191e89 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-10session/vcl: improve fifo tx notificationsFlorin Coras3-49/+50
Change-Id: Ied476c417c8ba5b4d7c615125c36eecd9ca64fbc Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-05vcl/session: add api for changing session app workerFlorin Coras5-15/+176
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 Johnson4-14/+20
* 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-01buffers: remove unused codeDamjan Marion1-2/+1
Change-Id: If2bbfbc52994f5de0879763e0b7a7864498debb6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-01vcl/ldp: add write msg function and fine tuningFlorin Coras2-6/+31
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-28session: free session after transport and app confirmFlorin Coras6-64/+79
In addition to that, a bit of refactoring. Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-22tcp: improve waitclose in closing statesFlorin Coras2-0/+19
Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-21http server: improvementsFlorin Coras2-2/+3
- use http sessions to track communication with peer (as opposed to using the raw sessions) - for static server send ok message prior to sending data - static server can now handle GET requests spread over multiple packets. Good for testing http/tcp implementation. Change-Id: I767a790de9a42e7087db5ce8eefd8efaf598c695 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-21tcp: fix fin_wait_1 condition to send finFlorin Coras2-1/+14
Also add the closed-waiting session state wherein the session still allows the transport to send oustanding data. Change-Id: Ic47807379906ef2010934381ff0b9e53c7e631d8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-19session: add cli option to dump session elogFlorin Coras2-3/+30
Change-Id: I1f42644f143bb65ee764c0f869b402595126adac Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-19tcp/session: notify transport of close when tx fifo is not emptyFlorin Coras1-10/+8
Disconnect transport even if tx fifo is not empty and have transport deal with the problem. In case of tcp, add timer to fin_wait_1. If it expires and we're still in established state, cleanup but only after waiting for session tx events to cleanup. Change-Id: I45759a3c43dd096bb2c03daf5372416c30678d62 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-19session: handle close before app accept replyFlorin Coras3-7/+5
Change-Id: Ic35bbf55851087d70bfacc1eab4dea4285f98c86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-18tcp/session: drop connections if message queue is fullFlorin Coras2-7/+10
Also cleanup session table when transport closes and app didn't reply to the close notification. Change-Id: Ie3d518e3afff73437561561b46dbf695c24632ad Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17vcl/session: handle reset/disconnect before app acceptFlorin Coras3-11/+18
Also further improves reset handling. Change-Id: I6e517632f700f181761726b965134e0c217eb06d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13session/tcp: support tx flush markFlorin Coras3-3/+21
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-05session/tcp: postpone cleanup on resetFlorin Coras3-3/+9
Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04vcl: cleanup children that use _exit()Florin Coras1-0/+2
Change-Id: Ia56c2698adb0ea7811203844dc4db10e121fbc42 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04vcl: test refactor and improvementsFlorin Coras2-2/+8
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30vcl: wait for segments with segment handleFlorin Coras5-2/+12
Instead of waiting for notification from binary api. Change-Id: I5ecab857d6bcdbed62d6bb06709570c4cf6b19ea Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30session: segment handle in accept/connect notificationsFlorin Coras8-25/+99
Change-Id: I03884b6cde9d4c38ae13d1994fd8d37d44016ef0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30session: use endpt fib index if app in default nsJohn Lo1-1/+6
Change-Id: Icf1408c50a6438c81e16033e83b2a76ce6eb0166 Signed-off-by: John Lo <loj@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29vcl: basic support for apps that forkFlorin Coras1-1/+1
- 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-23session: fix coverity app name warningFlorin Coras1-10/+20
Change-Id: I1bbad8716b9be3f2413aaebd400887c1e2aa3c7a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-21session: improve app cliFlorin Coras3-25/+70
Change-Id: I766c0b2bfd5f781e4fe5df615a7ecd139b7d2cc4 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-21session: cleanup use of api_client_indexFlorin Coras5-151/+91
Change-Id: I8a680be62ab91d2ccb144641981a635506973a49 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-18vcl/session: apps with process workersFlorin Coras7-28/+113
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 Barach7-40/+45
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-08tcp: pacer and mrtt estimation improvementsFlorin Coras1-2/+2
- update pacer once per burst - better estimate initial rtt - compute smoothed average for higher precision rtt estimate Change-Id: I06d41a98784cdf861bedfbee2e7d0afc0d0154ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-07tcp: consume incoming buffers instead of reusingFlorin Coras3-7/+14
Instead of reusing buffers for acking, consume all buffers and program output for (dup)ack generation. This implicitly fixes the drop counters that were artificially inflated by both data and feedback traffic. Moreover, the patch also significantly reduces the ack traffic as we now only generate an ack per frame, unless duplicate acks need to be sent. Because of the reduced feedback traffic, a sender's rx path and a receiver's tx path are now significantly less loaded. In particular, a sender can overwhelm a 40Gbps NIC and generate tx drop bursts for low rtts. Consequently, tx pacing is now enforced by default. Change-Id: I619c29a8945bf26c093f8f9e197e3c6d5d43868e Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-05tcp: send unsent data in fast recoveryFlorin Coras2-3/+3
Allows sending of unsent data in fast recovery and consolidates logic in tcp, instead of splitting it between tcp fast retransmit and tcp output path called by the session layer. Change-Id: I9b12cdf2aa2ac50b9f25e46856fed037163501fe Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-02session: measure dispatch period only if under loadFlorin Coras5-11/+29
Also reset pacer on tcp retransmit timeout Change-Id: I5a9edee4c00d1d169248d79587a9b10437c2bd87 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-01tcp: fast retransmit pacingFlorin Coras3-12/+45
Force pacing for fast retransmit to avoid bursts of retransmitted packets. Change-Id: I2ff42c328899b36322c4de557b1f7d853dba8fe2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-31session: fix sh session cliFlorin Coras1-1/+1
Change-Id: Idbc7b61393c6d0e3b8ea950397a89d21b1cf3a42 Signed-off-by: Florin Coras <fcoras@cisco.com>
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>