aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps
AgeCommit message (Collapse)AuthorFilesLines
2024-10-19hsa: refactor proxy to minimize lock usageFlorin Coras2-169/+303
Use per worker context to minimize proxy session lock usage for io events. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia0ea204a8b09f72300fd40745b299246d5d0ddb7
2024-10-15hsa: switch proxy to using first worker connectsFlorin Coras2-29/+77
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I04821236ba8ab02525bd99a1ed4572dfcf5e5131
2024-10-14hs-test: http_static wrk testsMatus Fabian1-6/+19
Type: test Change-Id: I87cddb88f2a62e79d66832827134ddaa95740839 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-07hsa: cannot delete/unlisten default uriSteven Luong1-1/+1
Although it is rare that one wants to remove the default uri listener, we should still support it. The problem is that we strip the null character on unformatting the input. We should not add a null character on formatting the default uri. Type: fix Change-Id: I08520dbd2a2448639ce023f9fd75555bc620e7ee Signed-off-by: Steven Luong <sluong@cisco.com>
2024-10-03session: use proper name for ct transportFlorin Coras1-2/+2
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iebf5155a429c77143df9eb44f504fea28cddaf98
2024-09-28hsa: Add multiple listeners supportSteven Luong1-10/+123
It is desirable that http cli server can support multiple listeners. This is needed for supporting both ip4 and ip6 at the same time. Added the optional keyword listener add | del to the http cli server command. Example usage: start ip4 default uri and then add ip6 uri http cli server http cli server uri http://2001::2/80 listener add Type: improvement Change-Id: I884a4cd64ff676f9759a062b6d607a1742f610f3 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-17vcl: add http support to vcl_test_protosAritra Basu3-8/+432
Type: improvement Change-Id: Ibb493f1d7713d0e10b8bd1d5ff17b89967b53b8a Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-13http: update body_len from u32 to u64Aritra Basu3-10/+19
Type: improvement Change-Id: I381541fb180d6d6ba42e4d231d22a73c5d33ef65 Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-13hsa: fix proxy ao connectMatus Fabian1-0/+7
Make sure that proxy server doesn't try to open connection to the target multiple times. When client is uploading huge amount of data it might happen that proxy_rx_callback is called again before connection to the target is established. Type: fix Change-Id: I4d272d37bc545f6f8790a115c8d26bcf3ea84f22 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-11hsa: fix proxy ao tx callbackFlorin Coras1-11/+8
Reuse existing proxy_force_ack for active open tx callback. This makes sure proxy session is tcp (as opposed to tls) and also makes sure the ack is sent from the thread that owns the proxy session. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9692fa2c4feefd3db701f9449a35495cf7b3d9dc
2024-09-10hsa: http_tps coverity fixMatus Fabian1-7/+9
Type: fix Change-Id: Iea00a03dc94dfd6d1f0532e629d2f3b38cb26c07 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-08http: large POST handlingMatus Fabian1-39/+115
Type: improvement Change-Id: I28b8e8ccbff6f97e669b0048011b187decbfc892 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-06session: add Source Deny ListSteven Luong7-8/+29
With this feature, session enable is now modified to have 3 modes of operation session enable -- only enable session session enable rt-backend sdl -- enable session with sdl session enable rt-backend rule-table -- enable session with rule-table session rule tables are now created on demand, upon adding first rule to the rule table. refactor session table to remove depenency from sesssion rules table. Now session rules table APIs take srtg_handle and transport proto instead of srt pointer. Type: feature Change-Id: Idde6a9b2f46b29bb931f9039636562575572aa14 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-08-29vcl: add support to write segmentsAritra Basu2-5/+34
Type: improvement Change-Id: Icfdaed6b70b83668127656930afcb4ac3c63b234 Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-08-28hsa: http_cli coverity fixMatus Fabian1-1/+1
Type: fix Change-Id: I23c55e6be08cc02332da9375d2eb19b74b79427c Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28http: http_state_wait_app_reply improvementMatus Fabian1-0/+8
set http status according to whether app also sent the body Type: improvement Change-Id: Ia41603cc21b410ca6929ec3d3e7c4c6808305769 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-06http: client POST methodMatus Fabian2-0/+570
Type: improvement Change-Id: Iaa70abcee02866f9a6426a6e8e4709eeba0e8114 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29http: client code improvementMatus Fabian3-40/+72
Client app can sends request target, custom header and body to HTTP layer. In response it receives all bytes as received from transport, aditionally we provide offset and length of headers and body. In addtion client app is now able to receive response with all status codes and Host header field is set in request at protocol layer. Type: improvement Change-Id: I8c8e2c8f99cdf500126b7c2c722aebc254aa0d9f Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23http: state machine fixMatus Fabian2-0/+172
When client sends second request without waiting for response of the first request http_ts_rx_callback should drop request (pipelining is not supported) instead of invoking return to state machine which can lead to erroneous state, e.g. reading random data from server app fifo. Added simple http static server url handler for testing to simulate long running request processing, for now hardcoded delay 5 seconds. Type: fix Change-Id: Ied9f7e2e4ee64c982f045c0f7f99a2dc5d7a2108 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23http: return more than data from server appMatus Fabian2-17/+82
Server app could return headers in front of body/data buffer. Offers apis for building and serialization of headers section. HTTP layer now only add Date, Server and Content-Lengths headers, rest is up to app. Well known header names are predefined. Type: improvement Change-Id: If778bdfc9acf6b0d11a48f0a745a3a56c96c2436 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-13http: return more than url to server appMatus Fabian2-35/+103
Provide all bytes as received from transport as data in the http message to server. Additionally provide offset and length of target path, target query, headers and body. Offers apis for parsing of headers, percent decoding, target path/query syntax verification. Type: improvement Change-Id: Idbe6f13afa378650cc5212ea7d3f9319183ebbbe Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14http: notify client when connection failedMatus Fabian1-0/+6
Type: fix Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14http: fix server sending all status codesMatus Fabian1-0/+7
Type: fix Change-Id: I4bc748e3091c2fbe0142d1b74d21a543a62c4ce0 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-07http: notify client on request errorMatus Fabian1-2/+16
Notify client app that we errored out while trying to generate request. Type: fix Change-Id: I3e20fe22d8a927ae8e9bf8391297e10c974dc941 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-01http: fix client receiving large dataFilip Tehlar1-5/+8
HTTP client was relying on synchronous rx notifications to the client app when moving lage data from underlying transport proto. Recent change in session layer made such notifications asynchronous making http client not working. This patch fixes the issue. Type: fix Change-Id: I4b24c6185a594a0fe8d5d87c149c53d3b40d7110 Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-25hsa: Link against libepoll-shimTom Jones1-2/+2
Type: improvement Change-Id: I08610ce71282f10c587d956b27e0f572a812bedd Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24hsa: fix http client error handlingMatus Fabian1-1/+1
Type: fix Change-Id: I5595260b903e3e1f15caccd168914f33f7161b59 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-03-12misc: remove GNU Indent directivesDamjan Marion5-12/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-02-26hsa: Undef libepoll-shims close on FreeBSDTom Jones1-0/+11
libepoll-shim has some hacks to enable functionality, one of these redefines close as a macro. This conflicts with a close call back. On FreeBSD undefine this macro at point of use. Type: improvement Change-Id: I7b4f7cd874f3451d76c580cf999369426d9e89c2 Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-02http: unify client/server state machinesFilip Tehlar1-2/+13
Type: improvement Change-Id: I57a816fbed8b681dec201edc8d5950a34a555a2b Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-31hsa: use common app session interface in echo testsFilip Tehlar4-86/+56
Type: test Change-Id: Ib320cfb5e20f12614c013a92ac15490f8ca3a7ce Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-30hsa: preallocate sessions on server sideFilip Tehlar1-107/+110
Type: test Change-Id: Ib809f5a6c9e2f08d87f0070231df04d5f0040ca0 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-27hsa: fix coverity warningFilip Tehlar1-0/+5
Type: test Change-Id: Iba94edb7eb439ddc994d9a16cb52108373d052ce Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-26hsa: unify echo test setupFilip Tehlar10-544/+1026
Type: test Change-Id: I8665492c2f7755901a428aacdb27e98329ff557a Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-13hsa: fix coverity issue CID-313635Dave Wallace2-2/+8
Type: fix Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-09-04session: fix allocation of proxy fifosFlorin Coras1-20/+40
Fifos need to be synchronously allocated once a transport like tcp accepts a session. Since events are now delivered asynchronously, proxy apps must explicitly register a cb function that manages fifo allocation prior to being notified of connect event. Type: fix Fixes: 0242d30 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7df973b7014e53e0766ea2bdc61e9871160bc18b
2023-08-09session: async rx event notificationsFlorin Coras2-4/+4
Move from synchronous flushing of io and ctrl events from transports to applications to an async model via a new session_input input node that runs in interrupt mode. Events are coalesced per application worker. On the one hand, this helps by minimizing message queue locking churn. And on the other, it opens the possibility for further optimizations of event message generation, obviates need for rx rescheduling rpcs and is a first step towards a fully async data/io rx path. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id6bebcb65fc9feef8aa02ddf1af6d9ba6f6745ce
2023-07-27hsa: add total bytes parameter to vcl_test_clientFilip Tehlar1-1/+17
Type: test Change-Id: Ib1131eedb8eeaa9adfed9cfc47beeb1c7c8adb5c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-13hsa: fix echo client initFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb2d1e6e0949844a70c81b218ca7dc83690776ca
2023-05-20hsa: add an option to configure ns in http cliFilip Tehlar1-1/+16
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ia81f1d8e706dbce9e57319d993bff595e6ba6f03
2023-05-19hsa: make http cli client thread safeFilip Tehlar1-6/+29
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I9e6fd29c0e09406e48215f06977b2d4678650669
2023-05-16hsa: detach app on unsuccessful listenFilip Tehlar1-0/+12
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Idba74f880a251dbeec2205ee41e16b40d4799b06
2022-12-23hsa: fix echo client workers initializationBenoît Ganne1-5/+4
We were creating an additional worker not backed by any VPP threads, leading off-by-1 access in the session main workers vector. Also uses vec_elt_at_index() when accessing session main workers vector elements to catch those errors more easily. Type: fix Change-Id: I6059116b7b64ae6b26ad83c1fcf55df8522868ad Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-12-02session: move connects to first workerFlorin Coras1-6/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I035e3fdbb52eca010ad7b2c20ca2930cb1645978
2022-11-30hsa: session rpc for echo client cli notificationsFlorin Coras1-7/+12
Also, use connected udp for builtin echo apps Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie24d7e97f4f27b67df9ceff3c268954485255c2d
2022-11-10http: support client connectFilip Tehlar3-0/+531
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I0738c0aefb41ab6c0ff717cfccd1df75ddb481fa
2022-11-05hsa: echo client crash when it fails to connect to remoteSteven Luong1-1/+1
When echo client fails to connect to remote, it should quit. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I787423bdc61a58eea48bab7bd8b73137626c02b4
2022-11-03misc: fix failing TestNs/TestHttpTps test in hstfMaros Ondrejicka1-1/+6
Type: fix Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I03cbd05d6d887d2ce8e7b7d20522e04012c5fe7a
2022-09-29api: deprecate vl_msg_api_set_handlersDamjan Marion1-5/+12
Type: refactor Change-Id: I7b7ca9ec62cb70243c5b7e87968eab1338d67ec8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-09-26api: replace print functions wth formatDamjan Marion1-7/+5
Type: improvement Change-Id: I7f7050c19453a69a7fb6c5e62f8f57db847d9144 Signed-off-by: Damjan Marion <damarion@cisco.com>