summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
AgeCommit message (Collapse)AuthorFilesLines
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
2020-12-14misc: refactor clib_bitmap_foreach macroDamjan Marion1-4/+4
Type: refactor Change-Id: I077110e1a422722e20aa546a6f3224c06ab0cde5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-2/+2
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-11vcl: fix listener session close problemwanghanlin1-1/+1
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I34ac04f05b84b271679aafc253f1606f11e29835
2020-11-26vcl: avoid coalescing dgrams on readFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I035f1ef26202bbcf918548cbaa3cdbc17944bf8a
2020-11-19vcl: stop tracking vpp event queues and thread indexFlorin Coras1-45/+21
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Icbee02a39650bc792532adc714bcf4f47f3fbe59
2020-10-29vcl: support fifo segments with ct sessionsFlorin Coras1-7/+12
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Icf0194f569da88f26a4cba29d8fe75a0bddfc144
2020-10-29vcl session: minimize ct io eventsFlorin Coras1-4/+10
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic4072fbc182fff38a28b415be0bb16f0559a4064
2020-10-29vcl: fix epoll fd cleanupFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2886155495ac0e518b9dc09856132cc2f6843503
2020-10-27vcl: postpone unhandled ctrl events if neededFlorin Coras1-63/+112
Unhandled control events, i.e., events delivered outside of epoll/select loops, that need to be propagated to apps should be postponed such that epoll and select can later deliver them. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3d05e154382631a16a19e71494c2d92c35dacb70
2020-10-26vcl: avoid epoll cleanup before app closeFlorin Coras1-69/+74
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I09f9faab72e6b77c975b8b79694081216c6ba115
2020-10-21vcl: wait for sendto to connect if neededFlorin Coras1-8/+15
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I39948b046c79dea1b034619e1eaa22dd8a4997fb
2020-10-20vcl: confirm reset on transport cleanupFlorin Coras1-3/+16
Type: fix Change-Id: Ife579f305409bf987639634213008a7d7f35acd7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-10-20vcl: more session struct cleanupFlorin Coras1-71/+72
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8e466e789c860caaa55f67095a57fc6ab670f32b
2020-10-20vcl: convert vep variables into flagsFlorin Coras1-60/+49
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ief017abc4879bc928746d9f5b9d2cfe04da89bd3
2020-10-19vcl: cleanup read and write readyFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib6afedf24c7bd7cc0d98bb324a83517030a05aa7
2020-10-16vcl: remove accept state and rename connect to readyFlorin Coras1-11/+8
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I57fcc6f9c154a6f83e0d59873b76c2e380e6f90a
2020-10-15vcl: refactor session state enumFlorin Coras1-90/+82
Only allow one state instead of using flags. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I08ffccbf8c3f6e2f61533996bb36c799cbc931e7