session: support local sessions and deprecate redirects 75/10475/17
authorFlorin Coras <fcoras@cisco.com>
Thu, 8 Feb 2018 23:10:09 +0000 (15:10 -0800)
committerFlorin Coras <fcoras@cisco.com>
Wed, 14 Feb 2018 08:54:43 +0000 (00:54 -0800)
commitf8f516a8b0ccab2f5d9796f90419bf2661c750af
treef02f6c01ed1bf33aeb4ebb5714af470e537f87c2
parent7758bf68a03a32f17c07154172157f5bdf30e684
session: support local sessions and deprecate redirects

Memfd backed shared memory segments can only be negotiated over sockets.
For such scenarios, the existing redirect mechanism that establishes
cut-through sessions does not work anymore as the two peer application
do not share such a socket.

This patch adds support for local sessions, as opposed to sessions
backed by a transport connection, in a way that is almost transparent to
the two applications by reusing the existing binary api messages.
Moreover, all segment allocations are now entirely done through the
segment manager valloc, so segment overlaps due to independent
allocations previously required for redirects are completely avoided.
The one notable characteristic of local sessions (cut-through from app
perspective) notification messages is that they carry pointers to two
event queues, one for each app peer, instead of one. For
transport-backed sessions one of the queues can be inferred but for
local session they cannot.

Change-Id: Ia443fb63e2d9d8e43490275062a708f039038175
Signed-off-by: Florin Coras <fcoras@cisco.com>
24 files changed:
src/svm/ssvm.c
src/svm/svm_fifo_segment.h
src/tests/vnet/session/tcp_echo.c
src/tests/vnet/session/udp_echo.c
src/vcl.am
src/vnet/session-apps/echo_server.c
src/vnet/session-apps/http_server.c
src/vnet/session-apps/proxy.c
src/vnet/session/application.c
src/vnet/session/application.h
src/vnet/session/application_interface.c
src/vnet/session/application_interface.h
src/vnet/session/segment_manager.c
src/vnet/session/segment_manager.h
src/vnet/session/session.api
src/vnet/session/session.h
src/vnet/session/session_api.c
src/vnet/session/session_lookup.c
src/vnet/session/session_lookup.h
src/vnet/session/session_table.h
src/vnet/session/session_test.c
src/vnet/session/stream_session.h
src/vnet/session/transport.h
test/test_session.py