aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Collapse)AuthorFilesLines
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
2021-07-14vcl:fix segfault when unshare NO_MQ sessionliuyacan1-1/+2
Session in LISTEN_NO_MQ state has no vpp_evt_q.This would cause a segfault when vcl try to send msg to vpp. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0d21831dbed148cd1b0ca7c083aeeef9e813ef2f
2021-07-12session: api cleanupFilip Tehlar1-29/+42
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Iacc58d27ac51c8a1c571087f98297e046b3477c2
2021-07-06vcl: fix packetdrill test errorwanghanlin1-1/+1
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I36d9affa5ee7160e95ee0ed463595bef752bbe9a
2021-07-06vcl: print current app state for timeoutwanghanlin1-2/+2
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Id701b1a1bee4e41b76d324ea05beb07ca57f825c
2021-07-06vcl: fix return value check for ldp_fd_to_vlshwanghanlin1-3/+3
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Iaad4022e84f4979016bb46c2ff5cfc5d43d6ff50
2021-06-30vcl: coverity fixesFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I290e4b0dff6afe7ce755074f3aaaf945dbbf3e09
2021-06-29vcl: improvements to epoll ltFlorin Coras3-52/+85
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If585b9c48f67599c56a8c4b4a5139375bc4287f6
2021-06-29vcl: Don't use app_socket_api to notify VPP in parent when child exitedwanghanlin1-1/+5
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2
2021-06-29vcl: Don't memset events to optimize CPU usagewanghanlin1-8/+6
In stress test case, memset may consume a lot of CPU because vls_epoll_wait is called very frequently. Type: improvement Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I9b4e1d6e1c4d7217cf0b2529d8efed792dea7b40
2021-06-28vcl: epoll fix postponed evt handlingFlorin Coras1-6/+33
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3d208f8ef4638e7557929f4b2bca4d640af85baa
2021-06-24vcl: fix vcl_session_write_ready when connectingliuyacan1-0/+4
Applications like curl will poll the fd after a non-blocking connect, so we need to avoid returning the wrong event. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I7ea146fc954fda631b3d88b46bb80adfbcdf137c
2021-06-22vcl: validate vep handle when copying sessions on forkwanghanlin1-0/+31
When copying sessions from parent on fork, we should validate vep handle in order to EPOLL_CTL_DEL in vcl_session_cleanup correctly when child exit. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I7696ecd898460c9a296d2800e46c7140e2218ed7
2021-06-22vcl: move child wrk cleanup from sighandler to vls_epoll_waitwanghanlin1-1/+42
Main process may enter sighandler with a lock, such as lock in localtime or in mspace_free, and child wrk cleanup may try to get such locks and cause deadlock. The patch move cleanup to vls_epoll_wait to wait app's next call. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I9b208038a0f49b0ace44684189234aeac9d94730
2021-06-16vcl: fix fifo sharingFlorin Coras4-2/+26
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iec1fe8315a057214901250d5fb06d1c1e33dda46
2021-06-16vcl: fix worker cleanupFlorin Coras1-0/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I575068df56623f24c0290fa42b8d301548a089d4
2021-06-16vcl: basic support for epoll level-triggered evtsFlorin Coras3-5/+102
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2d5039cd35edd02ffa2439bcac119d0647234385
2021-06-14vcl: improve shutdown()liuyacan6-54/+40
This commit does following: - Change the behavior of shutdown() with SHUT_RDWR flag. - Check SHUT_RD flag when read() - Change the errno when write() after SHUT_WR - Remove unused code All the above modification passed the packetdrill test. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0c81f52e563562e58580d70976526b898e65e915
2021-06-10vcl: touch fifo on epoll del only if session openFlorin Coras1-3/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0971c18a183319d09486459b0da08d44ce38acef
2021-06-07vcl: accept zero length writesFlorin Coras1-7/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I84985f59274e77219a38ea6ac865fc73ac635d72