summaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Collapse)AuthorFilesLines
2019-11-21vcl: if the ldp user send buf with 0 len, it will assert failed.jiangxiaoming1-1/+1
Type: fix Change-Id: I8ff60cf8726c463491c687e170ad0b1026a1303a Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
2019-11-14vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64Carl Smith3-0/+42
Glibc 2.28 now provides fcntl64 which is used instead of fcntl by defining fcntl as fcntl64 in fcntl.h Type: fix Change-Id: I87fedfbf3e0d241aafdc920e90f824d71353e0e6 Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
2019-11-12vcl: fix nonblocking accept with >1 event in the queueCarl Smith1-3/+3
We discard unwanted events until we get an ACCEPTED. But if we are non-blocking we need to check the queue length every time and EAGAIN if empty before waiting. Type: fix Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz> Change-Id: Ie0c7e5cb00f0d37d2e1534f8bb384221ff56f2e3
2019-11-08vcl: fix epoll connected events sidFlorin Coras1-2/+1
Type: fix Use sid returned by vcl_session_connected_handler instead of trying to infer it from vpp session handle. Change-Id: Ic0fbb90ec2bd851b435fc3f2a34265ac9a8ab29f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-29vcl: handle rx notifications on reused sessionsFlorin Coras1-0/+2
Type: fix Ignore events on sessions that have been reused but not fully initialized. Change-Id: Ided020eb5245d665d0a2e4a9e1f8a6dddebae009 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-22vcl: handle segment map errorsFlorin Coras1-8/+12
Type: fix Change-Id: Ibd122a4565c067627c4bbc8cac7df2d5b6497392 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-22vcl: add config option for preferred tls engineFlorin Coras3-1/+11
Type: feature Change-Id: If6c095c9b737cb524a9232dcfa9be0f93f04d114 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-21vcl: add api to set lcl ipFlorin Coras2-6/+40
Type: feature Change-Id: I40169fbbe8a20670dd612c341b6c78b5c925bf74 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-09hsa: use crypto_engine_type_t for TLSNathan Skrzypczak1-1/+1
Type: refactor This patch does the following conversions TLS_ENGINE_X -> CRYPTO_ENGINE_X tls_engine_type_t -> crypto_engine_t It does not change numbering of engines Change-Id: I872dfaec3a6713bf4229c84d1ffd98b8b2419995 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-30vcl: initialize ctrl_mq in workersFlorin Coras2-1/+5
Type: fix Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30vcl: allow non-blocking connectsFlorin Coras2-3/+16
Type: feature Change-Id: I55349f482ce6781337f747b2f0d2c0a027c3a675 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-27session: move ctrl messages from bapi to mqFlorin Coras5-167/+133
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-21vcl: fix ldp_set_app_name overflowBenoît Ganne1-5/+2
In case of overflow, we null-terminate the parameter ('app_name') instead of ldp global name ('ldp->app_name'). Moreover, snprintf() always safely null-terminate the destination string even in case of overflow. Type: fix Fixes: 048b1d6ab7 Change-Id: I4d8b0e020a228e982b6699d652b341c5afe92993 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-05vcl: fix bapi disconnect with socket transportFlorin Coras3-1/+13
Type:fix Change-Id: I7b69c28118f3d7054a20ca48792dfc403a8e2694 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-02vcl: initialize worker thread index and heap map slotFlorin Coras1-0/+3
Type: fix Change-Id: I7e762b43a2a074dc81cb7b0f6446e315e63ecae5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-31vcl: fix epoll chain validationFlorin Coras1-22/+22
Type:fix Change-Id: I91dfe7e0ae2e632022fbf639ca16c93f570849de Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-29vcl: fix config parsing of hex valuesFlorin Coras1-24/+23
Type:fix Change-Id: I31f35dd86fb6efb04d4a449f7fc834296baaa043 Signed-off-by: Tal Saiag <tal.saiag@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-19vcl: fix coverity warningFlorin Coras1-1/+2
Type:fix Change-Id: I7b91ce9359f94131882ab430606586b1a6cf3e02 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-19session: Use parent_handle instead of transport_optsNathan Skrzypczak4-5/+5
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 Skrzypczak3-15/+200
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-07-12vcl: fix namespace debug printBenoît Ganne1-2/+1
vcm->cfg.namespace_id is a vector and not a null-terminated C-string. Type: fix Fixes: 8af2054b78 Change-Id: I9324712f053066790a30fed617c9cac673f0fbd7 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-08vcl: add worker unregister apiFlorin Coras2-0/+12
Type:feature Change-Id: Ie73644aed94e58d5dce822de5000183e414401df Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-08vcl: cleanup listener accept fifoFlorin Coras1-0/+14
Type: fix Change-Id: Ic470d429f4bf1924185f720d66efe06f4727bcbd Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-02vcl: handle fd rcv msg errorFlorin Coras1-4/+12
Type:fix Also cleanup worker fds on error. Reported by coverity Change-Id: I52cf77ca90e9ba1cc8ee9ddb3edaeabdc073beda Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-29svm: rename fifo tx notifications to reflect useFlorin Coras1-8/+8
Type: refactor Change-Id: I651db44acdcb666a9c63e1037352cf88c68795b5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-26hsa: move vcl test apps to hsaFlorin Coras7-4812/+1
Type: refactor Change-Id: I352975585c1091bfc5b85d7f8fe985f9059820a7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne2-10/+6
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-06vcl: avoid hash table lookup on acceptFlorin Coras2-24/+27
Type: refactor Change-Id: I363a97b9f5ab0dbda78e13582630e78d57fb83e7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-06vcl: cap epoll dequeue batch size to max eventsFlorin Coras1-14/+14
Type: fix Change-Id: Ia9be1413cf9423552137885521cefdbecc3e5df5 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-05-16Add transport_opts to connect_sock bapiNathan Skrzypczak2-0/+2
Needed by QUIC to distinguish Q/Ssessions Change-Id: Idcc9e46f86f54a7d06ce6d870edec1766e95c82d Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-09vls: relax copy on fork locksFlorin Coras1-2/+2
Change-Id: I08cb7180364a5ef8444c9895c6d4f4842661b2a7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-09ldp: add option to eanble transparent TLS connectionsYu Ping2-2/+90
If LDP_TRANSPARENT_TLS is set, LDP transparently converts TCP into TLS connnection. Verified in Nginx LD_PRELOAD mode. Change-Id: I2229be61a0deb723bf5d94a2193ecb792dd997fb Signed-off-by: Yu Ping <ping.yu@intel.com>
2019-04-25session: cleanup segment manager and fifo segmentFlorin Coras3-12/+12
Change-Id: I984f347fb465c0c405cef668d8690457e81788e2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-25session: use teps in accept/connect notificationsFlorin Coras1-9/+9
Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-17vcl/session: tx notifications for cut-thru sessionsFlorin Coras1-0/+8
Change-Id: I076c753e419bbb177d2d28609190715e9895b398 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-16svm_fifo rework to avoid contention on cursizeSirshak Das2-13/+14
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-08host stack: update stale copyrightFlorin Coras3-3/+3
Change-Id: I33cd6e44d126c73c1f4c16b2041ea607b4d7f39f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-04ldp: ignore TCP_CORK socket optionFlorin Coras1-0/+1
Change-Id: Iffc3d2fbb478d5cd228959f4f2653d0508887489 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29vls: add pthread check on vls_attrFlorin Coras1-1/+7
Change-Id: I455d108dfe52d45d040167fecb37b33e9d630c3c Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-25VCL: add TLS opt to socket_test.shDave Wallace2-6/+6
- add TLS transport opt to socket_test.sh - resolve clash in vcl_test* args with socket_test.sh opts Change-Id: I952d5b64942664bc3af1098f67445e0f4b93ab32 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-03-20vcl: mark app state as failed if attach failsFlorin Coras1-8/+11
Change-Id: If6c3b9a9136390fb740e5c00fd270b7962a1c4ab Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-20ldp: force exit if constructor init failsFlorin Coras1-2/+5
Change-Id: I0c4659b9e413cf7291ec9e3b5a67de8ad8028cd3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-15vcl: cleanup debug messagesFlorin Coras16-261/+191
Change-Id: Ida3ecffc9a4d7a080ad63cd48fd4b5330b732ffb Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-14vcl: fix coverity warningFlorin Coras1-1/+1
Change-Id: I048276fd26e6e079ce31b9aeb1265f5d929f8540 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-11ldp: fix worker alloc when using eventfdsFlorin Coras1-1/+15
Change-Id: Icfba7ae9cbf504a8966923eac06c9eb0e11899d2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-10vcl: update buf if whole buf cannot be done at oncewuzhouhui1-0/+1
Change-Id: I0d56d2cee012b46da848362f322d6f246f8bf4c2 Signed-off-by: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
2019-03-08session/tcp/vcl: fixes and optimizationsFlorin Coras2-13/+51
Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-07session: cleanup instances of deprecated io evtsFlorin Coras1-1/+1
Change-Id: Iad119e05ae5e570fbfcf66747c95822cee647c99 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06session: use session index instead of fifo for evtFlorin Coras1-38/+43
Avoids derefrencing fifo pointers whose segments could have been unmapped. Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6 Signed-off-by: Florin Coras <fcoras@cisco.com>