summaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Collapse)AuthorFilesLines
2022-12-14vcl: enable gso for 'sendmsg' in LDP mode.Dou Chao3-16/+62
Some upon apps(e.g. Nginx-quic) package it's several protocol buffers into a struct msg which is a combination of gso_buffer and gso_size. but if HostStack regardless the gso_size to the buffer and split the buffer with default mss, that cause peer client failed on parsing the package. Type: improvement Signed-off-by: Dou Chao <chao.dou@intel.com> Change-Id: I805eb642be826038ba96d1b85dad8ec0c0f6c459 Signed-off-by: Dou Chao <chao.dou@intel.com>
2022-10-27vcl: register workers when reattaching to vppMaros Ondrejicka3-2/+51
Type: improvement Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I82a286e2872338974c1930138c30db78103ae499
2022-10-11vppinfra: fix AddressSanitizerBenoît Ganne1-0/+2
When checking for CLIB_SANITIZE_ADDR to enable specific behavior for AddressSanitizer, we must have vppinfra/clib.h included as it is defined there. Type: fix Change-Id: I9060c3c29c1289d28596c215a1d1709b2ea7c84e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-10-06vcl: add api to check if vcl disconnected from vppMaros Ondrejicka2-1/+21
Type: feature Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I98bc108360f9d04a33126865ce49d2702cbe9cdf
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-27vcl: repatch "align the RST behaviour with kernel"Yacan Liu1-1/+1
The previous patch[37164] was a bit flawed. Type: fix Signed-off-by: Yacan Liu <liuyacan@corp.netease.com> Change-Id: Ia9d8b9c7853e8f4b960ce7de26d0384243deb667
2022-09-26api: replace print functions wth formatDamjan Marion1-7/+5
Type: improvement Change-Id: I7f7050c19453a69a7fb6c5e62f8f57db847d9144 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-09-20vcl: align the RST behaviour with kernelYacan Liu1-1/+13
When ESTABLISHED TCP connection is terminated by an RST packet, EPOLLHUP + EPOLLRDHUP would be updeliever by VCL. If not using VPP, app would receive EPOLLHUP + EPOLLERR + EPOLLIN(if requested) + EPOLLRDHUP(if requested). libevent will interpret the two cases as different EV combinations. Below is the code snippet for libevent v2.12: if (what & EPOLLERR) { ev = EV_READ | EV_WRITE; } else if ((what & EPOLLHUP) && !(what & EPOLLRDHUP)) { ev = EV_READ | EV_WRITE; } else { if (what & EPOLLIN) ev |= EV_READ; if (what & EPOLLOUT) ev |= EV_WRITE; if (what & EPOLLRDHUP) ev |= EV_CLOSED; } Type: fix Signed-off-by: Yacan Liu <liuyacan@corp.netease.com> Change-Id: Ice3d2861183b6ea499f66b727bbe175eeae5cb05
2022-09-15vcl: add hugepage for vcl configure and svmJunfeng Wang4-2/+11
add hugepage for vcl configure and svm Type: feature Signed-off-by: Junfeng Wang <drenfong.wang@intel.com> Change-Id: I6a8905e3fec23d840e629114b1e5a403d0a258ef
2022-07-20vcl: new vcl api to get detailed session errorsRadha krishna Saragadam3-0/+42
Sometimes VPP rejects application connection requests due to various reasons. Some errors application can retry to get a successful connection. In a non-blocking session, VCL sends EPOLLHUP. An application can call a new API vppcom_session_get_error to find the details and retry depending on the error. Type: fix Signed-off-by: Radha krishna Saragadam <krishna_srk2003@yahoo.com> Change-Id: If0e21a8e25701f66a190a2799b2209e0c31f897c
2022-06-30vcl: check if listener valid on disconnect cleanupFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie057d0d5a51d3226a1a188cf9d48a5d82dc4a3c7
2022-06-10vcl: fix iperf3 server crash issue when it runs over vpp host stack.Liangxing Wang1-1/+8
Issue: Let iperf3 server run via ldp and vcl on top of vpp's host stack. If iperf3 client connects this iperf3 server with tcp MSS setting option, iperf3 server will always crash. Root cause: When MSS option is specified by iperf3 client, iperf3 server will recreate the listening socket firstly, then call setsockopt() to set MSS immediately. Iperf3 code can be referred here: https://github.com/esnet/iperf/blob/58332f8154e2140e40a6e0ea060a418138291718/src/iperf_tcp.c#L186. However, in vcl layer vpp_evt_q of this recreated session is not allocated yet. So iperf3 server crashes with vpp_evt_q null pointer access. Fix: Add session vpp_evt_q null pointer check in vcl_session_transport_attr(). Add a vcl test case for this MSS option scenario. Type: fix Signed-off-by: Liangxing Wang <liangxing.wang@arm.com> Change-Id: I2863bd0cffbe6e60108ab333f97c00530c006ba7
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion1-1/+1
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-31vcl: fix api detach if attach failedFlorin Coras2-1/+12
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idd1df83bb01951c2455b23c08e3cc1fcd9b91064
2022-03-17vcl: fix invalid socket readFilip Tehlar1-1/+1
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ic8cc12788d9062f30faa992afaecc0c64078c4d7
2022-03-03vcl: validate vls_epoll_ctl inputsFlorin Coras1-2/+18
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I315ef0122ccb21ccfef117a58b1dc998127618ce
2022-03-02vcl: fix segment detach post api disconnectFlorin Coras2-9/+36
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0982f0f5c8186f9ed962db49a14f35aa19f6a276
2022-02-17vcl: add support for reconnectFilip Tehlar4-1/+127
Supported only when eventfd option is enabled. Type: feature Change-Id: Ic9d6e38604e978f7bc8e54d74fe9b8f3fc53622d Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2022-02-09vcl: make eventfd flag configurable from envFilip Tehlar2-0/+8
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Id25e2188c9167b2e187923ebe10660e0bc9c3c0a
2022-01-19svm: update number of segments in svm_fifo_segmentsFlorin Coras1-1/+1
In addition to returning the number of bytes also update the number of segments to reflect the number used. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia87dc2aa62cea38b18dfa83df94dc2abe29d5121
2021-12-14api: verify message size on receiptKlement Sekera1-1/+6
When a message is received, verify that it's sufficiently large to accomodate any VLAs within message. To do that, we need a way to calculate message size including any VLAs. This patch adds such funcionality to vppapigen and necessary C code to use those to validate message size on receipt. Drop messages which are malformed. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2903aa21dee84be6822b064795ba314de46c18f4
2021-12-08vcl: validate closed sessions on disconnect and resetFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0375d639e979e29d287dc9fee16b0434fb5c788b
2021-12-07vcl: debug code improvementsFlorin Coras1-36/+33
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I18cd4131c692e776c98eba36161813035e9dec53
2021-12-07vcl: handle reordering of disconnect and reset msgsFlorin Coras2-11/+61
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I817e8510029a060876697701b81a952286597db1
2021-12-06vcl: fix ldp shared listener bitmap leakFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id1e273bf80c1cc687ce7e5ea3b8cc6a3ec3862f9
2021-11-30vcl: improve handling of failed connectsFlorin Coras1-10/+13
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If6235888cb0870ec3e1279ab1856a00715bd6c68
2021-11-30vcl: avoid ip format function vnet dependencyFlorin Coras3-169/+187
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I89103d4c99b21c5a466dbe511f0151bd754559a0
2021-11-29vcl: fix build with older gccFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic941065aa7d7c0002863a6391c8914089c438445
2021-11-15vcl: add DSCP support in VCLFilip Tehlar3-0/+15
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I835675267c997b5dc92a0aaccdb58648bc786bb9
2021-11-11vcl: notify vpp if connected inexistent sessionFlorin Coras1-1/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6939a0cdb02067440dce01cb0771f07099ca841e
2021-11-03vcl: fix event triggered after closing connections.liuyacan1-1/+15
Improve the accuracy of epoll event(EPOLLRDHUP). Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: Ia31e696a0666c417ca99e684c6a4515f1cafc646
2021-10-22vcl: fix cfg parser handling of empty linesFlorin Coras1-0/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibef04947c3a2f4e700233157d581ed54558b51ed
2021-10-15vcl: narrow the scope of the restriction of vlsh_bit_valwanghanlin1-3/+4
The restriction of vlsh_bit_val only effect select/pselect, so move the check to select/pselect function. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I3585c83cfc2f0a2fd834450be650dccda67e3faa
2021-10-04vcl: remove unsed configsFlorin Coras3-38/+2
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If755cf38e6b30e8757f2c6fb4cf5e6642fa87e52
2021-09-28api: API trace improvementsFilip Tehlar1-4/+5
Type: improvement * add support for JSON format in API trace * add ability to replay JSON API trace in both VPP and VAT2 * use CRC for backward compatibility check during JSON API replay * fix API trace CLI (and remove duplicits) * remove custom dump * remove vppapitrace.py * update docs accordingly Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-23vcl: grab wrk create lock soonerFlorin Coras1-3/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0faeef20c57486564122e39f01f31c8c45f38014
2021-09-10vcl: avoid duplicated events in epoll ltliuyacan1-4/+6
1. Filter event ACCEPTED for lt (same as event RX) 2. Do lt check before vppcom_epoll_wait_xxx to avoid delivering duplicated events. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: Ib41c880ceb5072d49e11ab42e31e54398703c0b5
2021-09-10vcl: fix free segments assertFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I837820fd1759cab55f42c54950e991a215234737
2021-09-01vcl: ignore rx events for sessions in epoll lt listFlorin Coras1-2/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I75f935cda00c335d0aefe02bff6fa8505dd931a8
2021-08-30vcl: fix vlsh conversion errorliuyacan1-3/+1
vlsh may not belong to the current vcl worker. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I75f962313e538fcd2b1cc6dffca53997648ca43e
2021-08-12session vcl: cert key add/del with socket apiFlorin Coras3-10/+117
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I70791285cbf427479d2dcbf70ffdce2253add2fb
2021-08-02vcl: fix sendto for dgramsliuyacan1-4/+4
We need to set rmt address before sending connect, otherwise VPP would connect to 0.0.0.0:0 and return invalid remote ip. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I85ae6931c2ba9f2f77c9ab19a2f801f50745449c
2021-08-02vcl: fix sleep time in ldp_pselect()liuyacan1-1/+2
Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: Ic9c5b23be4bde88880972be35525f12fa2c6dc10
2021-07-31vcl: fix ldp for __recv_chk socket callsSivaprasad Tummala2-0/+17
add ldp support for handling __recv_chk socket calls. Type: fix Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: I33221c465ac607bc665fcba500dd399a56b32df6
2021-07-29vcl: move vls pool lock to process local stateFlorin Coras1-6/+7
We only support one vls worker per process and therefore should not share lock between processes. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I57bb536cf3bf04e8de031b07cb885f80b4fa03c9
2021-07-29vcl: vls cleanup and more docsFlorin Coras1-101/+167
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If32dd21842b99e176db1d4eb9f6c6a51fbff1bfe
2021-07-27vcl: configure the cert-key pair from appSivaprasad Tummala1-4/+4
add the cert/key pair as selected by app. Type: fix Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: I3cef5bebadd8b192a65857d5f4aa6883c2a8d372
2021-07-27vcl: fix some risk after fork()liuyacan1-9/+17
1.Not only the session in state VCL_STATE_LISTEN_NO_MQ has no queue. Session in CLOSED also didn't. 2.Refresh vls->wrk_index in child process, or this value will become invalid if parent exit. 3.Set vlsh->vls_wrk_index once vls_worker_alloc() is called, then vls_get_worker_index() can be simplified. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: If4f5e134915eafd74ce38f585d65ce8836b2e553
2021-07-25vcl: fix shutdown deadlock issueliuyacan1-1/+1
Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I4974815ecb0e3bff01af983f086ca15d77fd6fb4
2021-07-22session vcl: explit mq indices in ctrl messagesFlorin Coras3-15/+16
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8e80252b85dda9a8f5699109264dc1b913581442