session vcl: support abstract sockets for app ns 42/33242/5
authorFlorin Coras <fcoras@cisco.com>
Fri, 23 Jul 2021 15:39:26 +0000 (08:39 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 23 Jul 2021 17:42:48 +0000 (17:42 +0000)
commit7cb471a0279ab2a3740a49d6ce9cf7b24f0a3f4d
tree244a17d7b4c4e138b51fe5226db414f206562172
parentf6e284b20c7a5b774ae21934fbf3f07801d61fc2
session vcl: support abstract sockets for app ns

App namespaces can now be associated to a linux ip netns, e.g.:

app ns add id <ns_id> secret <n> sw_if_index <n> netns <netns>

If session layer's app sock api is enabled, this triggers the creation
of an abstract listening socket in the netns that has been configured.
For the example above that would be @vpp/session/<ns_id>.

Consequently, vcl, or other apps attaching to vpp, can connect to said
abstract socket from an ip netns without the need to share unix domain
socket files. In particular, for vcl it's enough to set app-socket-api
to @vpp/session/<ns_id> in the conf file.

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I26fdc626a760a3f423c5b8be4251623f6e9cd73a
src/vnet/session/application_namespace.c
src/vnet/session/application_namespace.h
src/vnet/session/session.api
src/vnet/session/session_api.c