aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-06session: basic support for interrupt modeFlorin Coras1-4/+26
Experimental support for session layer interrupt mode. When enabled (use-private-rx-mqs must be set) session queue node switches to interrupt state when lightly loaded, i.e., no events and less than 1 vector/dispatch. Because transport protocols require a periodic time update, when in interrupt state the session queue node workers register a timerfd with the unix-epoll-input node that when triggered signals, i.e., wakes up, the queue node. Under light load, the timer is set to trigger every 1ms whereas if no session is allocated, the worker moves to idle state and the timeout is set to 100ms. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I905b00777fbc025faf9c4074fce4c516cd139387
2021-03-30session: interrupt mode for session node on main threadFlorin Coras1-15/+20
Signal, and implicitly run, main thread session queue node via interrupts instead of the queue process node. Process node still needed for timers. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5efd393effc8dad65e4125a3d0ad1be6b7484cb7
2021-03-29svm session vcl: per app rx message queuesFlorin Coras1-0/+6
Add option to use per app private segments for app to vpp message queues, as opposed to exposing internal message queues segment. When so configured, internal message queues are still polled by the session queue node but external app message queues are handled by a new input node (appsl-rx-mqs-input) that runs in interrupt state. Signaling of the node, when mqs receive new messages, is done through eventfds epolled by worker epoll input nodes. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iffe8ce5a9944a56a14e6d0f492a850cb9e392d16
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion1-32/+28
Type: improvement Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion1-1/+1
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-02-15session: coverity fixFlorin Coras1-3/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic28ee0e7cd313686b820e7003a47d17b844b8a89
2021-02-09tls: dtls initial implementationFlorin Coras1-1/+1
Type: feature Basic dtls transport protocol implementation that relies on openssl wire protocol implementation. Retries/timeouts not yet supported. To test using vcl test apps, first ensure all arp entries are properly resolved and subsequently: server: vcl_server -p dtls 1234 client: vcl_client -p dtls <server-ip> 1234 -U -N 2000000 -T 1460 -X Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I04b4516a8fe9ce85ba230bcdd891f33a900046ed
2021-01-25svm: add custom q implementation for mqFlorin Coras1-3/+0
Add separate queue implementation for the message queue as it's custom tailored for fifo segments as opposed to binary api. Also move eventfds to the private data structures. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6df0c824ecd94c7904516373f92a9fffc6b04736
2021-01-09session svm: fix fifo migrationFlorin Coras1-14/+15
Allocate and attach a new pair of private fifos in the right private slice when a session is cloned. This ensures that private fifos are not shared between workers. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib700d18104d2ca79aa8a07434cdcdcab0bef13a5
2020-12-29session: remove fifo segment va allocatorFlorin Coras1-6/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7b2fd896dfa6df46916f46327975b95561809f00
2020-12-29svm: allow mq attachments at random offsetsFlorin Coras1-3/+4
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic373cd2c11272da539eb4b0db27227f36f2f9688
2020-12-28session: convert evt q segment to fifo segmentFlorin Coras1-12/+13
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I63a44e11322f6fe27255820524e022f6d710b083
2020-12-24svm: split fifo into private and shared structsFlorin Coras1-6/+6
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id8e77e8b2623be719fd43a95e181eaa5b7df2b6e
2020-11-25session: add startup option to poll in mainFlorin Coras1-2/+5
Type: improvement Needed to support multi-worker tests Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I68d5590cece24a744513dc6c324dfb2861a38a94
2020-11-24svm: support for multi-segment enqueuesFlorin Coras1-11/+38
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I06c7022a6afbb146b23cbd3a430497ec9e8be73d
2020-11-24session: init lookup before dgram accept notificationFlorin Coras1-1/+3
Avoids potential session pointer invalidation Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ide9ba0ab732707d3dda6019ebb77f0b9489dfda7
2020-11-09session: remove support for shm bapi attachmentFlorin Coras1-38/+20
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I21bda0c46406aff54ad8fe5e44491e8e332de170
2020-11-09session: default to using memfd mq segmentsFlorin Coras1-0/+1
First step towards deprecating the use of binary api's segment for mq allocation. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9d3d17e4d406575d64e0426bb65465130a84980a
2020-10-26session: fix feature disableFlorin Coras1-2/+16
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I69e912ddf64d8ec89f8d93e02a201781b99de0bd
2020-10-13session: allow custom config of segment basevaFlorin Coras1-0/+2
Type: improvement Change-Id: If9ea09d652c228004492cf47854a7f6c1f8b3bc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-09-30svm: harmonize ssvm namesFlorin Coras1-2/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I26e4ad6bfd9e0be7745f6ba948bf51550fd4215e
2020-09-30svm session: use new clib mem apis for segmentsFlorin Coras1-3/+5
"sh memory map" now reports shared memory segments mapped by session layer for applications. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7debdcd06c7728abfb5cf817a1ccc37de495472c
2020-09-14session: add unix socket api for app attachmentFlorin Coras1-0/+2
This is an af_unix socket alternative to the binary api. To enable it, add use-app-socket-api under session stanza in startup.conf. When the socket api is enabled, attachments through the binary api are disabled. The socket api only works with memfd fifo segments, i.e., shm segments are not supported. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I55ffcee201d004846daeeec85c700c7e7a578d43
2020-07-24session: cleanup lookup table for rejected sessionFlorin Coras1-1/+4
Type: fix Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id20f693a5acdee74ab534e9964418973537b977f
2020-04-28vlib: add ASSERT to vlib_time_now(...)Dave Barach1-1/+1
Calling vlib_time_now (&vlib_global_main) from a worker thread is a bad mistake. ASSERT (vm->thread_index == __os_thread_index) will catch it. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I55af6de84e06143f8f43adc62103b77267a7a441
2020-04-20session: avoid rx notifications on accepting sessionsFlorin Coras1-0/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iba37e528e968104c3ba9c8324438ba695ddddfd1
2020-04-17session tcp: track half open in app wrkFlorin Coras1-8/+37
Type: improvement Do extra checks when establishing an active connect and cleanup pending connects if application detaches. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibe9349db57b313ba2aa5ea3960ef5cf755f5098a
2020-04-13session: remove ho with fifos supportFlorin Coras1-21/+5
Type: refactor UDPC (removed) was the only consumer. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2812bf58d3c68fe021ec73acaa1bd00ef3172846
2020-04-13session: cleanup debug codeFlorin Coras1-15/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie6c03195019fe18c547b22f4387d7f2b14b71461
2020-04-13session: adding debug eventsSrikanth Akula1-0/+15
Type: feature Enhancing the debugging capability of tcp session layer by measing time spent for various events. This is meant only for debugging purpose Signed-off-by: Srikanth Akula <srakula@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9f401881b345bcae5f7d8050338637fd47b3723b Signed-off-by: Srikanth Akula <srakula@cisco.com>
2020-04-09session: fix leak on accept fifo alloc failureFlorin Coras1-3/+13
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia928d6ea05ff7cb9a15e1ddc58234d000ebfd7fb
2020-04-09session: update fifo slice on session migrationFlorin Coras1-10/+44
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic5fb0f95c58ad70925a365004fe911ac8f2d2382
2020-04-08udp: cleanup input nodeFlorin Coras1-0/+30
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida9daefc20a161b36d6f36c56267123c7f2efc01
2020-04-07session: add more session errorsFlorin Coras1-5/+9
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9b246eb8a99020de9e5859147c456096fe2e3389
2020-04-06session udp: shared local endpointsFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
2020-04-03session: improve error reportingFlorin Coras1-13/+14
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03session: init port_proto_type asapFlorin Coras1-7/+11
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idc9b1423846edb46755a255ecc14070e9250d192
2020-03-30tcp: reuse session infra for syns and resetsFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I71df27049ef0193578f0c42f8f8bbd5c54e4d53e
2020-03-25session: api to add new transport typesFlorin Coras1-6/+20
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee
2020-03-20session: export session_alloc_for_connectionAndreas Schultz1-1/+1
Type: refactor Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: I45c6f434065ab0ad8ada3184b5a875a32a1b3faa
2020-03-19tcp: force deschedule if no send space availableFlorin Coras1-1/+3
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iae9f118f710153b6c0e390265039db7434e67ed8
2020-03-19session tcp udp: consolidate transport snd apisFlorin Coras1-0/+13
Type: improvement Use only one api to retrieve transport send parameters. Additionally, allow transports to request postponing and descheduling of events. With this, tcp now requests descheduling of sessions when the connections are stuck probing for zero snd_wnd Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I722c974f3e68fa15424c519a1fffacda43af050c
2020-02-25session: basic fifo-tuning-logicRyujiro Shibuya1-0/+26
- Allowing application to register custom fifo-tuning-logic. - Adding an example custom fifo-tuning-logic in hs_app/proxy. Type: feature Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2aca14d1f23d5c3c9debb7f4c46aca3a15a8d1b9
2020-02-12tcp: improve invalid packet handling in syn-rcvdFlorin Coras1-1/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie356b4d45d47e30c185caf2e66cdb16f1a97046f
2019-12-11api: Use vl_msg_push/pop_heapNathan Skrzypczak1-3/+2
Type: refactor Change-Id: I0eb46676fc22ce6825b2d879498df344b5a855e8 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-10api: multiple connections per processDave Barach1-1/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-11-29session: no cleanup notification for forced deletesFlorin Coras1-1/+2
Type: refactor Change-Id: Ib36cc3f1173d093e9050f9fecda343df2aa3dc1f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-11-19session: Fix out of order mqNathan Skrzypczak1-1/+2
Type: fix Change-Id: I522db62db50fc0fa46a6dd7cddd32e2f09b5e5a6 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-18session: extra checks in session validationSrikanth Akula1-0/+26
Type: fix Adding few extra checks while doign session validationwq! Signed-off-by: Srikanth Akula <srakula@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4d18b5ad97d1802ce38a07aeb56b5f35939c1187
2019-11-12session: session enable in multiworkerNathan Skrzypczak1-1/+16
Having session enable in config file wasn't working for multiple workers Type: fix Change-Id: Ib29ba540a6e1d714e7e470f4c7518e3d266fe7ca Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>