summaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Collapse)AuthorFilesLines
2018-01-25session: add support for memfd segmentsFlorin Coras1-2/+1
- update segment manager and session api to work with both flavors of ssvm segments - added generic ssvm slave/master init and del functions - cleanup/refactor tcp_echo - fixed uses of svm fifo pool as vector Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-25Event log entries for VCLKeith Burns (alagalah)1-1/+258
Change-Id: I8303859ef65552f64c94525c9b1112ec9a1a88d0 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-20VCL/LD_PRELOAD: Fix unfiltered debug output.Dave Wallace2-5/+4
Change-Id: I625b219fe6ffd21f87a163244569a4075cd432a4 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-19LD_PRELOAD: Fix Coverity Warning CID 182227Dave Wallace1-1/+1
Change-Id: I2698a59db29cbace49335e035478b5f456d0b06a Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-19Elog entries for VCLKeith Burns (alagalah)1-2/+225
Change-Id: Ica8470aaf581e69a74fe4f0fc0296ff3fb6f87d3 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-18LD_PRELOAD: Fix coverity warningsDave Wallace1-4/+13
** CID 182185: Memory - illegal accesses (UNINIT) ** CID 182184: Memory - illegal accesses (UNINIT) ** CID 182183: (UNINIT) ** CID 182182: Memory - illegal accesses (UNINIT) ** CID 182181: Memory - illegal accesses (UNINIT) ** CID 182180: Uninitialized variables (UNINIT) ** CID 182179: Null pointer dereferences (REVERSE_INULL) ** CID 182178: Uninitialized variables (UNINIT) ** CID 182177: Uninitialized variables (UNINIT) Change-Id: I33e043572db493eef58d85c5096ceac5a7d41c7a Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-18Event log entries for VCLKeith Burns (alagalah)1-1/+300
Change-Id: I288ecd7f39422ed900a5c6fbaf9c939ab5c06880 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-17LD_PRELOAD: stateless LDPDave Wallace9-7369/+3776
- Refactor LDP to be stateless. - Use upper bit of fd to identify tag as VCL session. - Clean up debug output. - Add VCOM config env vars for app name and sid bit. - Add VCL get/set attributes - Add VCL poll implementation. Change-Id: I4603ae88254c460a024fdb79fe91c6d1ef9bc7b9 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-17ELOG additions for VCLKeith Burns (alagalah)1-41/+148
Change-Id: I61557f9ad9ca2a033ba01bd25a7a8cd4d5ce092e Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-09VCL eventlog - track create/deleteKeith Burns (alagalah)1-0/+199
Change-Id: I972b7d264e612ab04eb4671253f3654a76578e1c Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-09api: refactor vlibmemoryFlorin Coras1-17/+14
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-06Initial structure for VCL event logging.Keith Burns (alagalah)1-6/+84
- WIP: taking a LARGE patch and breaking into smaller chunks - large LDP/VCL refactor in progress. This minimizes rebase. - LARGE patch removed clib_warning()s erroneously - VPPCOM_DEBUG checks duplicated deliberately as clib_warning() usage will be refactored. Change-Id: I5905ed074187fe22c9f1320fd07ffcaab3a0f63c Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-12-15VCL-LDPRELOAD: Fix Coverity Warning CID 178776Dave Wallace3-98/+68
- Fix broken unit test code. - Check for NULL ptr in vppcom_session_attr() VPPCOM_ATTR_GET_*_ADDR endpoint parameters. Change-Id: I01169edce098ee855a9cba08893c2b08c93ea6c3 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-14session: cleanup attach flagsFlorin Coras1-4/+5
Change-Id: I39d21d15677f57e10b69b8842f2cbca277abddf0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-11vcl: fix session preallocationFlorin Coras1-0/+2
Change-Id: I174ba43380e97104f6721af647c699922e996f5a Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-30VCL: add vpp api q length to config file.Dave Wallace2-2/+25
Change-Id: Ibe3e6cea0ea2fc700ef0a284c8ea5fe5d5476514 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-29VCL-LDPRELOAD: Fix connect return value handling.Dave Wallace1-20/+15
Change-Id: I51d82f39d450834f0ba4d9415aa3e62eb61fc1e9 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-29VCL: drain the vpp app event queue.Dave Wallace1-0/+13
Change-Id: If988b8ad33465819d0e5ab9ef92ffd69b3c7851c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-27vcl: fix session handle in accept replyFlorin Coras1-3/+3
Change-Id: I5afd840c07714fc457bb37f8f40e1fcc0bd11314 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-25VCL: include vpp context in accept session reply msg.Dave Wallace1-17/+41
Change-Id: I753e94ed4630ad32b7c496cad3a3ba88a5cbd1f6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-25VCL: improve debug outputDave Wallace6-223/+339
- Refactor debug output to include vpp handle associated with session id where appropriate. - Fix vcom_connect return value on error. - Refactor vcom_socket_epoll_pwait(). - Fix sock_test_server/client connect failure handling. Change-Id: I2649596aa4b8a77d9bd876409a76810cb2785797 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-22VCL: remove bogus ASSERT().Dave Wallace1-2/+0
Change-Id: I810cbcd13f73c0376c6be64ce2d11404bdd1755f Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-21VCL: close-on-empty state transition refactoring.Dave Wallace2-660/+763
- Refactor session disconnect/close state transitions. Only remove session state when app calls close(). Add HUP/reset feedback by returning ECONNRESET. - Update debug messages. - Use VCL_LOCK_AND_GET_SESSION macro more extensively Change-Id: I23d372834b901a6726e6d6c1061df73ad967882f Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-20VCL: Update lcl addr/port from connect session reply msg.Dave Wallace1-0/+4
Change-Id: Ic738448007e49b0b36e336ffd50e800b04ad3c6d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-19VCL-LDPRELOAD: Fix CID179207Dave Wallace2-4/+19
Change-Id: Ia6b9e39d5a2ef064cf71bfe87cb4b4a0648d735d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-17vppcom: improve listener session handlingFlorin Coras1-40/+90
Change-Id: I86b2e2c5a655e53a915fbf62ff04ee23c86de234 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-14VCL-LDPRELOAD: add sendfile/sendfile64 implementation.Dave Wallace10-53/+301
Change-Id: If0c399269238912456d670432d7e953c9d91b9fb Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-11VCL: clean up disconnect_session debug output.Dave Wallace1-14/+25
- Run VPP in xfce4-terminal in VCL unit tests. Change-Id: Iba6a870617a811261de0a54fa38cdb5109ae1d07 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-12VCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity ↵Steven2-56/+47
errors Fixed out-of-bounds access in vcom_socket.c by limiting the copy to the size of the address field that was passed. Truncation will occur if the address field is not big enough. Fixed inequality comparison in vppcom.c by using the predefined macro MAP_FAILED. Change-Id: I9517c29ae811d08058621bd548a352b4d4f05139 Signed-off-by: Steven <sluong@cisco.com>
2017-11-10VCL: Fix accept state machine, EPOLLET logic.Dave Wallace2-178/+258
Change-Id: I909b717e5c62e91623483bdbb93d9fe4c14f0be7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-10VCL-LDPRELOAD: Fix epoll_pwait timeout.Dave Wallace2-12/+17
Change-Id: I5712f45c35dbdf34141c42b9d864cad1f918e5e8 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-09VCL: Set debug output level from env varDave Wallace2-35/+60
Change-Id: Ia99047715ed652eca1aea1e4144e407f9608d59e Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-07VCL: Fix error handling during heap allocDave Wallace1-13/+24
Change-Id: Ia8ab2b8677296f3d7d4a33e1faee494926e3b509 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-07VCL: handle process fork.Dave Wallace1-268/+223
Change-Id: I3e57d60fb5e42713effd4412288eccfa08f0be82 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-07VCL-LDPRELOAD: enable accept4() wrapperDave Wallace7-59/+79
Change-Id: I56567953fb8329315393047913e30fc7f2242bdb Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-06VCL_LDPRELOAD: mixed libc/vcl epoll fd'sDave Wallace5-170/+176
Change-Id: Ibc82781ddef5ea0517220b9054db3d53ec348c6c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-02VCL: application proxy configurationDave Wallace3-99/+157
- Add support to configure VCL to set application proxy transport types and app_is_proxy flag via vcl config file or env vars. - Clean up debug output. - Rename session_scope -> app_scope. Change-Id: I6e35f3cdd84daf0112133af8f33acd0152f87ca3 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-30vcl: fix compiling on newer systemsDamjan Marion1-0/+3
Build fails on ubuntu 17.10... Change-Id: I98dfffa3f8f5f9bca2ba97a856709714fbeec49c Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-27LDPRELOAD: Fix out-of-scope variable coverity errorSteven1-2/+1
>>> CID 178271: Memory - illegal accesses (RETURN_LOCAL) >>> Using "ep", which points to an out-of-scope variable "_ep". Change-Id: Icf21e602bc2718bfedd9480e9da41aff8693048e Signed-off-by: Steven <sluong@cisco.com>
2017-10-26VCL: refactor session close / disconnect.Dave Wallace1-66/+60
Change-Id: Ib0797faaa3f21c7577330bb8d0e801d43e01110e Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-26VCL-LDPRELOAD: Fix more coverity warningsDave Wallace3-16/+22
vcom.c: CID 178227: Logically dead code in vcom.c vcom_socket.c: CID 178254: Dereference after null check CID 178250: Out-of-bounds access vppcom.c: CID 178252: Unused value Suppress vppcom_session_attr() debug output. Change-Id: I1d47bafb84fc0ad00c642392ae3cb6761fd3fb17 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-26VCL-LDPRELOAD: Fix CID 178251 & CID 178253Dave Wallace2-32/+47
- CID 178251 Dereference after null check in vcom_socket.c - CID 178253 Logically dead code in vppcom.c Change-Id: I2a24cd53727fec76cf1a6d60f90414ff92567818 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-26VCL: add session namespace support.Dave Wallace3-11/+135
Change-Id: I04f1b63e66260d99c0dd180b0295a55a9b750df7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-25VCL: Return data for recvfrom(MSG_PEEK)Steven1-11/+23
Implement recvfrom(MSG_PEEK) by returning data in the provided buffer without moving the read pointer Change-Id: Idc1b22632d78e8a499cce7d48c15e8bab0b0bf88 Signed-off-by: Steven <sluong@cisco.com>
2017-10-25VCL/LDPRELOAD: Add support for getsockopt, sendto, and recvfromSteven3-34/+194
Add support for getsockopt, sendto, and recvfrom. Not all options for the system calls are supported yet. Only the options used by curl and wget are supported for now. Change-Id: I2e0ed7349a0273616b3831c201e7c117725ca287 Signed-off-by: Steven <sluong@cisco.com>
2017-10-24VCL-LDPRELOAD: Fix coverity warnings.Dave Wallace3-12/+12
- CID 178225: Constant expression result - CID 178220: Logically dead code - CID 178222: Logically dead code - CID 178227: Logically dead code - CID 178223: Same on both sides - CID 178226: Same on both sides Change-Id: Ie0c80edb41390cf2308e54938be85d865e292138 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-24VCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.soDave Wallace15-0/+14733
- Move VCL & VCL-LDPRELOAD source into src/vcl - Statically link vppcom into libvcl-ldpreload.so Change-Id: I778300b37e8b06640d9dbc01caf297edf7a6edb7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>