summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26session tcp: handle rxt and acks as custom eventsFlorin Coras1-0/+25
Type: feature Control ack generation and retransmissions with session layer scheduler. Change-Id: Iacdf9f84ab81f44851980aa45a83e75f29be2b7b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-25session: add transport deleted stateFlorin Coras1-8/+11
Type: fix Distinguish between closed and deleted states to avoid deleting the session prior to the transport connection. Change-Id: Ia285ce94b26a70773f8c0ce9d2c73095d3e2a337 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-23session: reorganize dispatch logicFlorin Coras1-2/+2
Type:refactor Change-Id: Id796d0103e61e15c35a586d8cbd3d8916487b84d Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-19session: improve event loggingFlorin Coras1-11/+2
Type:feature Change-Id: I67a52ee48963a66915e2ebd116626eb9c296a9a5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-17session: use llist in session node evt handlingFlorin Coras1-14/+11
Type: refactor Change-Id: I24159e0a848f552b4e27acfb5fe6f2cd91b50a19 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-16session: fix node enable sequenceVladimir Kropylev1-1/+1
Type: fix Change the sequence to first allocate session_manager and then enable the session-nodes. During “session enable”, sometimes an issue was seen when in some cases POLLING node calls transport_update_time -> tcp_update_time -> tcp_set_time_now which access tcp_main.wrk_ctx before tcp_main_enable allocates the wrk_ctx. 0 0x00007ffff73f7778 in tcp_set_time_now (wrk=<optimized out>) at src/vnet/tcp/tcp.h:953 1 tcp_update_time (now=11.059735140000001, thread_index=<optimized out>) at src/vnet/tcp/tcp.c:1192 2 0x00007ffff75a75de in transport_update_time (time_now=11.059735140000001, thread_index=thread_index@entry=1 '\001') at src/vnet/session/transport.c:740 3 0x00007ffff75a0f4c in session_queue_node_fn (vm=0x7fff74913480, node=0x7fff75e7d5c0, frame=<optimized out>) at src/vnet/session/session_node.c:873 Change-Id: Id2288dd05ba179af2ff22c58bac1331fc21a1c7d Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-07-15session: allow transports to generate closed notificationsFlorin Coras1-26/+27
In contrast to the closing notification, whereby a transport informs the session layer that is beginning the closing procedure, this allows transports to notify the session layer of the fact that the transport is "fully" closed, i.e., it expects no more data. Also: - adds app closed state for sessions - changes tcp to have it notify when an active close has finished Type: feature Change-Id: I13c738006c03f85015e05ab82843a33a69382aaf Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-09session: notify app of session and transport cleanupFlorin Coras1-3/+18
Type:feature Change-Id: Ic9515c0b11ca6f75503f47ec6b2c58d240afb144 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-08session: add flag to disable session lookupNathan Skrzypczak1-2/+2
Type: feature Change-Id: I1369859be0a722ea37e5d3ecb35dee5684fc69f8 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-03quic: fifo notifications fixAloys Augustin1-0/+1
Add SESSION_IO_EVT_RX handling in session_send_evt_to_thread to allow internal apps to send rx events ("tx notifications") to quic. Add a call to quic_send_packets in quic_custom_app_rx_callback to ensure QUIC ACKs are sent if there is no other activity on the connection. Type: fix Change-Id: I885e01e6475e5b0274f274e9dd34d4a771719e69 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-06-29svm: rename fifo tx notifications to reflect useFlorin Coras1-2/+2
Type: refactor Change-Id: I651db44acdcb666a9c63e1037352cf88c68795b5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-28session: add half_open_has_fifos for UDPCNathan Skrzypczak1-6/+23
Type: fix Change-Id: Iede83a4e72b88fd55bf56ec0ca71c9196ce743cd Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-27session: Add transport vft protocol optionsNathan Skrzypczak1-1/+2
Type: refactor Change-Id: I4e0afc206e4871596c2ed8a6ca00914a379f1526 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-24session: full lock on session_send_evt_to_threadNathan Skrzypczak1-10/+2
Type: fix This was causing issues in QUIC when an app client & the protocol app compete for the worker msg_queue. Might not be ideal performance- wise. Change-Id: I629892253d5b5d968f31ad1d56f18463e143d6b4 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-19session: call session_dequeue_notify after svm_fifo_dequeue_dropVladimir Kropylev1-1/+4
Type: fix dequeue_notify callback at app-layer needs to know available space in fifo, so, session_dequeue_notify should be called after svm_fifo_dequeue_drop Change-Id: I136675d29ec32bea9b33a05deb6710f72ce8d5b1 Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-06-17session: use listener_handle instead of listener_indexNathan Skrzypczak1-2/+3
Type: refactor Change-Id: I97fa59a0ba0b6b7a98698926020ffffcf6ae6ba3 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-25tcp: handle fin+rst in same frameFlorin Coras1-1/+8
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-08session: send tx events when data is dequeuedFlorin Coras1-0/+4
Change-Id: Ib8cb19361c42e38e3f68d7147358378fff161eb1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-30svm: more fifo refactor/cleanupFlorin Coras1-8/+7
Change-Id: Ie76c69641c8598164d0d00fd498018037258fd86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-25session: use teps in accept/connect notificationsFlorin Coras1-6/+4
Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-24Add get_endpoint in transport vftAloys Augustin1-1/+15
This allows QUIC & TLS specific logic to be implemented, and meaningfull IP/port to be returned when connection is overridden. Change-Id: Id79c59fe4d7b16d36f0e96ad3e281c4026b5fe65 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-16svm_fifo rework to avoid contention on cursizeSirshak Das1-3/+3
Problems Addressed: - Contention of cursize by producer and consumer. - Reduce the no of modulo operations. Changes: - Synchronization between producer and consumer changed from cursize to head and tail indexes Implications: reduces the usable size of fifo by 1. - Using weaker memory ordering C++11 atomics to access head and tail based on producer and consumer role. - Head and tail indexes are unsigned 32 bit integers. Additions and subtraction on them are implicit 32 bit Modulo operation. - Adding weaker memory ordering variants of max_enq, max_deq, is_empty and is_full Using them appropriately in all places. Perfomance improvement (iperf3 via Hoststack): iperf3 Server: Marvell ThunderX2(AArch64) - iperf3 Client: Skylake(x86) ~6%(256 rxd/txd) - ~11%(2048 rxd/txd) Change-Id: I1d484e000e437430fdd5a819657d1c6b62443018 Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2019-04-16Allow sessions to be allocated in app's RX callbacksAloys Augustin1-3/+11
This enables applications to create sessions in their RX callbacks, which can invalidate the session pointer. This is required for the QUIC protocol implementation. Change-Id: I6072c1c368fd9d17a960ec086a788089dd6f54b4 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-09session: fix session flagsFlorin Coras1-3/+0
Change-Id: I681169b82c661b7f0bf19f09d07d76ac1d3ed173 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-05tcp: do not delete session on establish popFlorin Coras1-2/+8
Also: - force reset if wait close pops in fin-wait-1 with unsent data - adds more event logging. Change-Id: I4ddada046214fa71e17514cdec57b3026f84a283 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02session: use app cb function wrappersFlorin Coras1-4/+3
Change-Id: I77ad9eb4d4c7699397aa4be6a973ef37c60db4c5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29Integrate first QUIC protocol implementationNathan Skrzypczak1-2/+9
Currently supports on single stream exposed through standard internal APIs Based on libquicly & picotls by h2o Change-Id: I7bc1ec0e399d1fb02bfd1da91aa7410076d08d14 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-03-25UDP: Fix session registration in lookup tableAloys Augustin1-0/+4
This fixes a bug where packets could be sent but not received when opening an UDP connection. Change-Id: I0993dd806b277374232d551167970ab13a62dbf9 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-03-18session: add session flagsFlorin Coras1-13/+6
- use flag instead of enqueue_epoch for enqueueing rx events. - use flag for proxy sessions Change-Id: Iec3eee55a68d02536ece6329348a3369c7c7412e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-11tls: fixes and improvementsFlorin Coras1-6/+2
- disconnect sessions through session layer apis instead of directly notifying the app worker. - improve cli - increase fifo sizes for tls app Change-Id: I8a7d2865b3b00724e2a9da29fa4a906ea867da9b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06session: use session index instead of fifo for evtFlorin Coras1-3/+4
Avoids derefrencing fifo pointers whose segments could have been unmapped. Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06session: use vpp to switch io events for ct sessionsFlorin Coras1-9/+12
Instead of allocating pairs of message queues per cut-thru session and having the applications map them, this uses vpp as an io event message switch. Change-Id: I51db1c7564df479a7d1a3288342394251fd188bb Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-04session: remove svm_segment_index from session structFlorin Coras1-2/+1
Change-Id: I42ef9ee38f93600a0d6f2699b1b2a0a201fcec9c Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-02session: cleanup/rename functionsFlorin Coras1-86/+40
- remove unused functions - rename old "stream" functions Change-Id: Icbb03daa9f9f1c58b5be5c38aa8a9cbcf9159b47 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-02session: cleanup session event typesFlorin Coras1-15/+16
Change-Id: I87bdf705341dd760f0be907a663aa64140977d39 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-01session: refactor local connectsFlorin Coras1-0/+7
- Switches local connects to cut-thru transport - Removes local sessions as a separate session type Change-Id: I997c6355d8c8e4f2110678f785b0f5d96bba47f7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-27session: refactor local/cut-through listensFlorin Coras1-6/+4
Introduce a cut-through transport as replacement to local sessions. This first patch removes the per app local listener pools and switches local listeners to sessions with cut-through transport. Change-Id: I98b20c25bc5df5f4110bf66f76c650a973032618 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-21tcp: drop outstanding data when entering closing stateFlorin Coras1-1/+1
Change-Id: I92a009b9630b0d882ea3c5c99aad88ed6f5109a0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-18session: move fifo allocation logic to app workerFlorin Coras1-136/+58
Change-Id: I1662ec4b5503cb64a8a86a2441842311d959b3a6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-18tcp: harden for high scale scenariosFlorin Coras1-0/+7
- Better handle buffer starvation scenarios - Handle case when both peers enter recovery due to packet loss. - Fix passive open establish cleanup Change-Id: I2f28baa2ff0383bb8f5f6d2452b49aa38ce69bce Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-11session: add config for evt qs segment sizeFlorin Coras1-2/+5
Change-Id: I286d0d53a9ef2d6e28cd301eae25fc119d491f22 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-09session: refactor listen logicFlorin Coras1-3/+3
Make app-listener the handle for app listens. Consequently transport and local listen sessions are now associated to the app-listener. Change-Id: I9397a26d42cccb100970b6b4794c15bac2e11465 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-06transport: cleanupFlorin Coras1-27/+20
- move transport specific types to transport_types - add transport wrapper functions for interaction with transport protocol vfts Change-Id: I93f70d884585fc2f41c4a605e310c80e8a8972f2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-05session: cleanup part 3Florin Coras1-33/+8
Aggregate session specific types, getters and setters under session_types.h Change-Id: Ib205337502654969d60c72d1800c90247e1a9068 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-04session: cleanup part 1Florin Coras1-83/+80
Rename core data structures. This will break compatibility for out of tree builtin apps. - stream_session_t to session_t - server_rx/tx_fifo to rx/tx_fifo - stream_session.h to session_types.h - update copyright Change-Id: I414097c6e28bcbea866fbf13b8773c7db3f49325 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-17vcl/session: replicate events for shared sessionsFlorin Coras1-8/+46
Change-Id: I7fb5402d4a530b5f2ffd9bb5787632099f4b4189 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-10session/vcl: improve fifo tx notificationsFlorin Coras1-1/+5
Change-Id: Ied476c417c8ba5b4d7c615125c36eecd9ca64fbc Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-2/+7
* 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-01vcl/ldp: add write msg function and fine tuningFlorin Coras1-4/+17
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 Coras1-53/+67
In addition to that, a bit of refactoring. Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6 Signed-off-by: Florin Coras <fcoras@cisco.com>