summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27vcl: postpone unhandled ctrl events if neededFlorin Coras1-0/+5
Unhandled control events, i.e., events delivered outside of epoll/select loops, that need to be propagated to apps should be postponed such that epoll and select can later deliver them. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3d05e154382631a16a19e71494c2d92c35dacb70
2020-10-20vcl: more session struct cleanupFlorin Coras1-32/+35
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8e466e789c860caaa55f67095a57fc6ab670f32b
2020-10-20vcl: convert vep variables into flagsFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ief017abc4879bc928746d9f5b9d2cfe04da89bd3
2020-10-19vcl: cleanup read and write readyFlorin Coras1-2/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib6afedf24c7bd7cc0d98bb324a83517030a05aa7
2020-10-16vcl: remove accept state and rename connect to readyFlorin Coras1-4/+2
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I57fcc6f9c154a6f83e0d59873b76c2e380e6f90a
2020-10-15vcl: refactor session state enumFlorin Coras1-30/+35
Only allow one state instead of using flags. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I08ffccbf8c3f6e2f61533996bb36c799cbc931e7
2020-10-12vcl svm: segments improvementsFlorin Coras1-0/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I717c64666972bb4e440cb3d1180a5cb26ee25577
2020-09-16vcl: refactor bapi client index for sapi reuseFlorin Coras1-2/+5
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibebb6f7d4e610570693e213acd2f6d9332c563c6
2020-09-14vcl: add support for app socket apiFlorin Coras1-0/+18
To enable add "app-socket-api /path/to/socket" to vcl.conf. On vpp side, add use-app-socket-api to session stanza in startup.conf VPP allocates a socket per application namespace which it places in the app_ns_sockets subfolder of the run folder (default /var/run/vpp). The socket used implicitly selects the app namespace for the vcl app. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifc14b93dcbf6ef9bed1852d46cd069f4855b92ef
2020-09-14vcl: cleanup bapi and wrk registrationFlorin Coras1-41/+32
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0391db5c3ad038265cb8ebf9de02925653e35959
2020-08-26vcl: fix duplicated key of session_index_to_vlsh_table in multiplehanlin1-0/+7
threads vcl workers scenario Type: fix In multiple threads vcl workers scenario, multiple vcl workes can create sessions with same index. Because only one vls worker created, key of session_index_to_vlsh_table is duplicated. Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I7e1f5bc471adc5378194452aef85e611f5d0df1d
2020-08-12vcl: mt detection and cleanupFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I521c110fd4d7445bd585c96d4c768f16a0a7d3b8
2020-08-12vcl: support multi-threads with session migrationhanlin1-1/+6
Currently, mutlti-threads only support one dispatch thread and multiple worker threads, eventually only dispatch thread is a vcl worker and can interact with epoll. This patch will register all threads as vcl worker, and then each thread can interact with epoll now. Moreover, session migration also supported, such as socket created in thread A and used (bind, connect and etc.) in thread B. Type: feature Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: Iab0b43a33466968c1423d7d20faf1460c8589d91
2020-08-11vcl: support inter worker rpcFlorin Coras1-0/+6
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I664cd14c84fc5cf2ffe61efce99c95219b44fad7
2020-06-15vcl: move helper functions out of header fileFlorin Coras1-1/+7
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3889fd80b145cf80f76f6054d63247e76bdf20ff
2020-05-26vcl: do not propagate epoll events if session closedFlorin Coras1-0/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1e9652b476bbc07852b4e701a948c36a0d8c67fa
2020-05-25vcl: fix udp connected checkFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I83dafe10cdc78fbb9a751f32155cd84d281b12d9
2020-04-17vcl: fix app destroyFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I21daa87b1a301142270a1bf20680dd9e9395aac9
2020-04-03session: improve error reportingFlorin Coras1-2/+0
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03session udp: fix transport flags and migrationFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
2020-04-01session udp: support connect on listenersFlorin Coras1-0/+6
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2
2020-04-01vcl: support sendto for dgramsFlorin Coras1-0/+19
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2a0fdced6a3ae262b30cda6a51f1fa96c1d44665
2020-03-27vcl: support for uword segmentsFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibfe203fda5a0c88b26eb50bee8a430dd2cfb7dca
2020-03-06vcl: refactor vls to minimize lock usageFlorin Coras1-1/+2
Type: refactor - per vls worker private pool of sessions - deep copy of vls worker data structures on fork - maintain a global, i.e., heap allocated, and lock protected pool of elements that track sessions that are shared between workers (due to forking). Credit for uncovering the issue goes to Intel team contributing code to VSAP (Ping, Yuwei, Shujun, Guoao). Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id7d8bb06ecd7b03e4134f1cae23e740cf4634649
2020-02-14vcl: fix ldp read on closing sessionFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I60be191866d20721951ad22f571a2a3275511e12
2020-02-13vcl: clear accept msg flagsFlorin Coras1-1/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb513232e7b091c8f767726bfa1deb10a7e3b751
2020-02-13vcl: handle close after resetFlorin Coras1-1/+1
Can happen if a connection is reset before fully accepted. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0ae68d71b66722dd19ca6f1cee44a080e5ff4447
2020-02-06vcl: fix session closing errorFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I94f1365569e98d43486d9528faafc6d7c3ad88f7
2020-02-04vcl: switch to closed state after app closeFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I851db474538de76d5f70dd6d6f83a6487a5a02bd
2020-01-30vcl session: propagate cleanup notifications to appsFlorin Coras1-0/+1
Type: feature Change-Id: I7f8e3763d7f8364563a25d0fcc782976b906b325 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-16vcl: add rx event on epoll ctl if neededFlorin Coras1-0/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib6d0387076a4bb0b52e4cdfdcd62b6060b704fe6
2019-12-21session: move add/del segment msg to mqFlorin Coras1-0/+4
Type: refactor Change-Id: I32234173ebd69f80acb1afa4039fffbd19157f6d Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-11vcl: separate binary api connections per thread workerFlorin Coras1-0/+4
Type: fix Change-Id: I2d72efc74a3b0a5b9e4da265475b1b01bf361125 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-22vcl: add config option for preferred tls engineFlorin Coras1-0/+1
Type: feature Change-Id: If6c095c9b737cb524a9232dcfa9be0f93f04d114 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30vcl: initialize ctrl_mq in workersFlorin Coras1-0/+3
Type: fix Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-27session: move ctrl messages from bapi to mqFlorin Coras1-3/+6
Type:refactor Moves connect, disconnect, bind, unbind and app detach to message queue from binary api. Simplifies app/vcl interaction with the session layer since all session control messages are now handled over the mq. Add/del segment messages require internal C api changes which affect all builtin applications. They'll be moved in a different patch and might not be back portable to 19.08. Change-Id: I93f6d18e551b024effa75d47f5ff25f23ba8aff5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-05vcl: fix bapi disconnect with socket transportFlorin Coras1-0/+1
Type:fix Change-Id: I7b69c28118f3d7054a20ca48792dfc403a8e2694 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-19session: Use parent_handle instead of transport_optsNathan Skrzypczak1-1/+1
Type: feature This is mostly used for quic in the case of a stream creation (i.e. connect on an already established QUIC session). We want do default parent_handle to INVALID to be able to distinguish it from parent_handle = 0 Change-Id: Id5ac0b0155a3c44e51334231b711e4fd87a96a10 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-18vcl: add QUIC supportNathan Skrzypczak1-1/+27
Type: feature * Adds the concept of a "connectable listener" : a session that can be both connected and accepted on. * vppcom_session_is_connectable_listener (fd) that tells if the fd is a connectable listener * vppcom_session_listener (fd) that gives you the listener's fd that accepted the session (if any) * vppcom_session_n_accepted (fd) that gives the number of sessions a listener accepted. Change-Id: Id89d67d8339fb15a7cf7e00a9c5448175eca04fc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-18session: Refactor invalid session idx/handleNathan Skrzypczak1-0/+1
Type: refactor Change-Id: I885d9d2af1674f705339e3e96f87ff766965c9e5 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-06vcl: avoid hash table lookup on acceptFlorin Coras1-1/+0
Type: refactor Change-Id: I363a97b9f5ab0dbda78e13582630e78d57fb83e7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-16Add transport_opts to connect_sock bapiNathan Skrzypczak1-0/+1
Needed by QUIC to distinguish Q/Ssessions Change-Id: Idcc9e46f86f54a7d06ce6d870edec1766e95c82d Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-04-25session: cleanup segment manager and fifo segmentFlorin Coras1-1/+1
Change-Id: I984f347fb465c0c405cef668d8690457e81788e2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-15vcl: cleanup debug messagesFlorin Coras1-1/+1
Change-Id: Ida3ecffc9a4d7a080ad63cd48fd4b5330b732ffb Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06session: use vpp to switch io events for ct sessionsFlorin Coras1-27/+5
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-04vcl: remove unused fields and structuresFlorin Coras1-17/+0
Change-Id: I49a95c4e2eb17e5a6ab514dde2505294a4c01353 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-21vcl/session: send unlisten over message queueFlorin Coras1-12/+6
Change-Id: I68cd6c0e6be3e8088792df3885ae190bb00462b0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-14Add -fno-common compile optionBenoît Ganne1-1/+1
-fno-common makes sure we do not have multiple declarations of the same global symbol across compilation units. It helps debug nasty linkage bugs by guaranteeing that all reference to a global symbol use the same underlying object. It also helps avoiding benign mistakes such as declaring enum as global objects instead of types in headers (hence the minor fixes scattered across the source). Change-Id: I55c16406dc54ff8a6860238b90ca990fa6b179f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-02-04session: cleanup part 1Florin Coras1-2/+2
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-31vcl: improve handling of close on rwFlorin Coras1-0/+28
Change-Id: Ie01a37612d7e3e0d0bad0f0aa9583b3ed411f46f Signed-off-by: Florin Coras <fcoras@cisco.com>