summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-31vcl: fix api detach if attach failedFlorin Coras1-1/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idd1df83bb01951c2455b23c08e3cc1fcd9b91064
2022-02-17vcl: add support for reconnectFilip Tehlar1-0/+52
Supported only when eventfd option is enabled. Type: feature Change-Id: Ic9d6e38604e978f7bc8e54d74fe9b8f3fc53622d Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
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-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 Coras1-11/+59
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I817e8510029a060876697701b81a952286597db1
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 Coras1-167/+59
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I89103d4c99b21c5a466dbe511f0151bd754559a0
2021-11-15vcl: add DSCP support in VCLFilip Tehlar1-0/+13
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-04vcl: remove unsed configsFlorin Coras1-5/+2
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If755cf38e6b30e8757f2c6fb4cf5e6642fa87e52
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-12session vcl: cert key add/del with socket apiFlorin Coras1-10/+6
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-07-22session vcl: explit mq indices in ctrl messagesFlorin Coras1-9/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8e80252b85dda9a8f5699109264dc1b913581442
2021-07-06vcl: fix packetdrill test errorwanghanlin1-1/+1
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I36d9affa5ee7160e95ee0ed463595bef752bbe9a
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 Coras1-45/+80
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If585b9c48f67599c56a8c4b4a5139375bc4287f6
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-16vcl: basic support for epoll level-triggered evtsFlorin Coras1-5/+94
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2d5039cd35edd02ffa2439bcac119d0647234385
2021-06-14vcl: improve shutdown()liuyacan1-26/+31
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
2021-06-07vcl: avoid multiple reads on peekFlorin Coras1-0/+4
Only try once and return what was found. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I50b1d26babf1b7431d36f6b7472a1fb01475bb35
2021-06-05vcl: epoll error handling fixes and improvementsFlorin Coras1-5/+20
- return VPPCOM_EEXIST if attempting to re-add a session - return VPPCOM_ENOENT if the session to be removed is not epolled - generate EPOLLIN if adding it through a mod operation on a session that has data and did not have the event previously set. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I728a06b8cf84af8d8c1dea7406e284de8886dffc
2021-06-03session: lcl transport info on acceptFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia46b0b8afed30f84b244c06f0457303f9e8832cd
2021-05-25srtp: basic implementation based on libsrtp2Florin Coras1-0/+7
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic5e99938a5f130e83de6d590d2f89252d055bceb
2021-05-12session: support half-close connectionliuyacan1-1/+55
Some app(e.g. Envoy) may call shutdown() instead of close() when draining connection. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
2021-05-01vcl: attr api to set endpt ext configFlorin Coras1-1/+19
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I06cd3721c1b534e9449bf96760c02ca30628c21e
2021-04-28vcl: fix epoll wait with indefinite timeoutFlorin Coras1-28/+16
Also avoid syscalls if timeout is 0. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9193d731c51a1432a52c89d5e54e6406e5100c96
2021-04-22vcl session: refactor passing of crypto contextFlorin Coras1-4/+11
Pass tls/quic crypto context using extended config instead of bloating conect/listen messages. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0bc637ae310e6c31ef1e16847501dcb81453ee94
2021-04-22vcl session: extended connect/listen configurationFlorin Coras1-0/+27
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic8d9386fef37ffd3446aaeb93a96ee6d60633831
2021-04-14session tcp vcl: api to update connection attributesFlorin Coras1-16/+82
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifdd6024daf044751895bb8d2deabad41d3a80c92
2021-03-22vcl: fix libc epoll pwait starvedwanghanlin1-0/+3
We call vls_epoll_wait with 0 timeout to process unhandled_evts_vector in ldp_epoll_pwait_eventfd. But vls_epoll_wait will then call vppcom_epoll_wait_eventfd to process events in event queue. If there are continuous events to be handled, then libc_epoll_pwait have no chance to be called. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Ia4f61d0d438a3475bfde9f6715805274671d4e75
2021-02-23vcl: fix coverity warningFlorin Coras1-7/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id9f922eafe4a68661d2858d72fc548a372e9596a
2021-02-22vcl: support sockopt of SO_REUSEPORT and SO_DOMAINwanghanlin1-0/+15
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I800cfffb07bf7d4c4d1454b73febdba03f7d6b75
2021-02-18vcl: epoll out deq notifications only if fifo existsFlorin Coras1-4/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia37d8474224f6074826c9ffb82feb919b2ef52f7
2021-02-10vcl: validate seg handle on migrate only if neededFlorin Coras1-5/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3c15a465f84f2ceb6bd5f1c459899824d4bc1c90
2021-02-09tls: dtls initial implementationFlorin Coras1-0/+7
Type: feature Basic dtls transport protocol implementation that relies on openssl wire protocol implementation. Retries/timeouts not yet supported. To test using vcl test apps, first ensure all arp entries are properly resolved and subsequently: server: vcl_server -p dtls 1234 client: vcl_client -p dtls <server-ip> 1234 -U -N 2000000 -T 1460 -X Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I04b4516a8fe9ce85ba230bcdd891f33a900046ed
2021-02-05session svm: non blocking mqFlorin Coras1-103/+33
Avoid synchronizing producers and the consumer. Instead, only use mutex or spinlock (if eventfds are configured) to synchronize producers. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie2aafbdc2e07fced5d5e46ee2df6b30a186faa2f
2021-01-28vcl: support set/get vrf attributeFlorin Coras1-0/+21
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I011faa52939d44bdc90de69ad381dc1eea8c8eb3
2021-01-28vcl: fix select want deq ntf for ct sessionsFlorin Coras1-32/+35
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2d008a12da6c6e68ad8955a638b44d09e4febd8d
2021-01-28vcl: honor time wait in eventfd epoll waitFlorin Coras1-11/+35
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4bfdeb4bfbdcf333cfd4047a80edd04e35a371fc
2021-01-07vcl session: switch to generic cert key apisFlorin Coras1-2/+37
Remove the deprecated tls apis. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia1e12bd813671146f0aca22e83d04c23ac13e595
2020-12-29svm: allow mq attachments at random offsetsFlorin Coras1-13/+12
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic373cd2c11272da539eb4b0db27227f36f2f9688
2020-12-24svm: split fifo into private and shared structsFlorin Coras1-73/+41
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id8e77e8b2623be719fd43a95e181eaa5b7df2b6e