summaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Collapse)AuthorFilesLines
2020-05-27vcl: fix ldp fcntl64Florin Coras3-40/+24
Type: fix Ticket: VPP-1882 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I342d8f928fcc7de74f9bd288c1a5d63ea1f90020 (cherry picked from commit 0ab36f55753d3d1417c41f8a3aec5e79a882555c)
2020-05-26vcl: do not propagate epoll events if session closedFlorin Coras2-6/+17
Type: fix Ticket: VPP-1880 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1e9652b476bbc07852b4e701a948c36a0d8c67fa
2020-05-18vcl: remove udpc transportFlorin Coras2-9/+1
Type: refactor Ticket: VPP-1875 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I145ff3301f168973c4f7f32c337bbcac47900705 (cherry picked from commit 3ca663e743dda703e76d8493a0c5cf13d7004c63)
2020-05-16vcl svm: fix rx event losshanlin1-2/+5
When vcl_epoll_wait_handle_mq handles rx events exceeding maxevents, VPP will not signal because cursize > 0, and the remaining rx events cannot be triggered because the eventfd event has been read. Therefore, we should dequeue all events until cursize = 0. And then handle msg up to maxevents with vcl_epoll_wait_handle_mq_event and those beyond with vcl_handle_mq_event. Type: fix Ticket: VPP-1873 Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I8a0c87cb41c837deb8284b40f668cc3c7d9d6e56 Signed-off-by: hanlin <hanlin_wang@163.com> (cherry picked from commit d0e646f6892e9c85278c9538760a8940c86dcdbb)
2020-05-12vcl: de-init vcl on destroyFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If3372e3edd403240c2c9da746246170549a3e644
2020-05-04vcl: allow vcl worker index to be set by applicationsPivo2-0/+11
When using vppcom_session* apis to setup TCP sessions in applications build outside of the VPP repository, it is necessary to set the worker_index explicitly when these apis are called from the none-VCL worker threads. An example is when data is to be sent to the TCP session that is originated from a different thread, like the main program thread or from the bin api thread. This change allows the application to set it. Type: fix Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: I37f3654a49ea9a8cf3a0d3d0e672583018c12299
2020-04-30vcl: disconnect both flavors of bapi transport on destroyFlorin Coras1-5/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6697296b45c5816a31535b0cf44b8e726292b8bb
2020-04-29vcl: add separate fcntl64 ldp handlerFlorin Coras1-5/+12
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb81e2901398dd6ae94931c705a704c7b52bbb36
2020-04-25session vcl: propagate transport cleanup notificationsFlorin Coras1-0/+11
Type: improvement Can be used to force app to close a connection on which it still waits for data. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7c3a8245cbbc23728e4408feb63a659a11f718ed
2020-04-25vcl: generate select events on read/write errorsFlorin Coras2-8/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3429f9d0406b6d710846fc82d77400f26f77fdf4
2020-04-22vcl: fix use-after-freeBenoît Ganne1-1/+2
Make sure we disconnect from vlib prior to free-ing the last worker, as we'll need to access it. Type: fix Change-Id: Id5bdd17f0f5efa1ce52021b4270eb4f1e95cc61d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-20vcl: ensure sessions are open on select eventsFlorin Coras1-7/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4d56b61af574dfdaf6028160ce331606bdf65609
2020-04-20vcl: expand vcl select maps in ldp if neededFlorin Coras1-4/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I56c487821233cebf2146745a4706cb573cc088a5
2020-04-17vcl: fix app destroyFlorin Coras3-21/+21
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I21daa87b1a301142270a1bf20680dd9e9395aac9
2020-04-07udp session: jumbo frames and configurable mtuFlorin Coras1-1/+0
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6b750bef5df0f8544e05177ccd480f87a020832d
2020-04-06vcl session: enforce full dgram reads/writesFlorin Coras2-24/+53
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4a3861e31ca42faf0b59f8f09393fb10413bf3af
2020-04-06session udp: shared local endpointsFlorin Coras1-1/+3
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
2020-04-04misc: strcpy be goneDave Barach1-1/+1
Causes static analysis "vulnerability" warnings Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1
2020-04-04vcl: fix vcl_test.py sonarcloud issueDave Wallace1-14/+9
- Updated comment to indicate the original intermittent test failure still occurs when running make test with TEST_JOBS > 1. - The original workaround has been retained until the root cause can be determined to avoid test failures in the LF CI infra with patches containing non-vcl code changes. Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I2645acd4bf2b16fbb2b0e297c8c2919fc6199c13
2020-04-03session: improve error reportingFlorin Coras3-6/+4
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03session udp: fix transport flags and migrationFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
2020-04-03session: remove obsolete apisFlorin Coras1-1/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia14800710aca7c1bc315b6da3c69d623f79a5b63
2020-04-02udp session vcl: add udp iperf testFlorin Coras1-0/+36
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib4bc2ce781887a84055a4d5cdb7f453fc7d52c79
2020-04-01session udp: support connect on listenersFlorin Coras3-5/+54
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2
2020-04-01vcl: support sendto for dgramsFlorin Coras2-35/+45
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2a0fdced6a3ae262b30cda6a51f1fa96c1d44665
2020-03-27vcl: support for uword segmentsFlorin Coras2-11/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibfe203fda5a0c88b26eb50bee8a430dd2cfb7dca
2020-03-25session: api to add new transport typesFlorin Coras2-8/+0
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee
2020-03-24vcl: fix ldp recv return on errorFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae
2020-03-24vcl: fix ldp writev 0 vecsFlorin Coras1-12/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iec5db8dcf3a019b731e15fd79d0208d6eb10943b
2020-03-07vcl: fix coverity warningFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35fba8f17bdd6e2f5612358608ff6c13f4b431fe
2020-03-06vcl: refactor vls to minimize lock usageFlorin Coras2-105/+418
Type: refactor - per vls worker private pool of sessions - deep copy of vls worker data structures on fork - maintain a global, i.e., heap allocated, and lock protected pool of elements that track sessions that are shared between workers (due to forking). Credit for uncovering the issue goes to Intel team contributing code to VSAP (Ping, Yuwei, Shujun, Guoao). Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id7d8bb06ecd7b03e4134f1cae23e740cf4634649
2020-03-05session: API cleanupJakub Grajciar3-19/+41
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ib752a3425c076eb53bc5255a48039cbb74b1fcce Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-25svm: refactor fifoFlorin Coras1-2/+4
Type: refactor Switch from a wrapped byte space to a "continuous" one wherein fifo chunks are appended to the fifo as more data is enqueued and chunks are removed as data is dequeued. The fifo is still subject to a maximum size, i.e., maximum number of bytes that can be enqueued, so the max number of chunks associated to the fifo is also constrained. When enqueueing data, which must fit within the available free space, if not enough "supporting" chunk memory is available, the fifo asks the fifo segment for enough chunk memory to ensure that the write can succeed. To avoid allocating large amounts of small chunks due to small writes, if possible, the size of the chunks requested is lower capped by min_alloc. When dequeuing data, all the chunks that have been completely drained, i.e., head moved beyond the chunks’ end bytes, are unlinked from the fifo and returned to the fifo segment. The one exception to this is the last chunk which is never unlinked. Change-Id: I98c1dbd9135fb79650365c7e40c29238b96cd4ee Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-02-14vcl: fix ldp read on closing sessionFlorin Coras2-15/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I60be191866d20721951ad22f571a2a3275511e12
2020-02-13vcl: clear accept msg flagsFlorin Coras2-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb513232e7b091c8f767726bfa1deb10a7e3b751
2020-02-13vcl: handle close after resetFlorin Coras2-10/+32
Can happen if a connection is reset before fully accepted. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0ae68d71b66722dd19ca6f1cee44a080e5ff4447
2020-02-06vcl: fix session closing errorFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I94f1365569e98d43486d9528faafc6d7c3ad88f7
2020-02-04vcl: switch to closed state after app closeFlorin Coras3-4/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I851db474538de76d5f70dd6d6f83a6487a5a02bd
2020-01-30vcl session: propagate cleanup notifications to appsFlorin Coras2-40/+68
Type: feature Change-Id: I7f8e3763d7f8364563a25d0fcc782976b906b325 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-23vcl: always report EPOLLHUP/EPOLLRDHUP on closeFlorin Coras1-4/+0
Type: fix Change-Id: I3d24a7973c7113ffeb9109e89cda7fa960e73a5b Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-23vcl session: udp session migration notificationsFlorin Coras1-0/+39
Type: feature Change-Id: I402549818ba6e078802e914293304174dc6625c2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-16vcl: add rx event on epoll ctl if neededFlorin Coras2-2/+18
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib6d0387076a4bb0b52e4cdfdcd62b6060b704fe6
2020-01-14tests: fix worker thread initializationPaul Vinciguerra1-3/+8
from threading.thread __init__: This constructor should always be called with keyword arguments. If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread. Type: test Change-Id: Ifa89202e97053a4baf19e9a0ca0913430d5087a3 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-3/+3
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: I7280e5c5ad10a66c0787a5282291a2ef000bff5f
2020-01-03vcl: add feature.yamlFlorin Coras1-0/+22
Type: docs Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifda0404cfc6710d7ecf21da96eb1cb92750b495f
2019-12-30vcl: hold errno when calling LDBGhanlin1-1/+5
Type: fix Call trace of LDBG: LDBG->clib_warning->_clib_error->dispatch_message->os_puts->writev However, writev will hijacked by LDP, and then execute following code: if ((errno = -ldp_init ())) return -1; Now, errno will be set. Because we always call LDBG just before return from ldp_accept4, listen, and etc. So errno will be overwritted after LDBG called. Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I7a90f3a14772994f11f09650481411796e3f5630
2019-12-27vcl: EPOLLOUT should be generated when epoll_ctl called with EPOLLOUThanlin1-0/+20
event Type: fix When we call epoll_ctl to add or mod fd with EPOLLOUT event, mostly to check if we can write. So we expect a EPOLLOUT event should be generated immediately unless tx queue is full. Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: Ie99986a44dbb07b6ff2fba6512171056f79e77bd
2019-12-23vcl: fix multi-thread app segment attachingFlorin Coras1-32/+27
Type: fix Guard segment attaching/deletion, not only the hash table CRD operations. Change-Id: Ic96e4adedffb73baf89e971438596927e6daf930 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-21session: move add/del segment msg to mqFlorin Coras4-102/+119
Type: refactor Change-Id: I32234173ebd69f80acb1afa4039fffbd19157f6d Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-17vcl: RX event may lost when accept session repeatedlywanghanlin1-1/+1
Type: fix Some applications may call accept repeatedly to process all connect request until get EAGIAIN error. Subsequent call may get RX event of previous accepted session, then should process it rather than just discard it. Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Ice53442de66289a62591b79a9cc31e883e894c23