Difference between revisions of "VPP/HostStack"

From fd.io
< VPP
Jump to: navigation, search
(Documentation)
Line 56: Line 56:
  
 
[[VPP/HostStack/LDP/nginx | nginx with LD_PRELOAD]]
 
[[VPP/HostStack/LDP/nginx | nginx with LD_PRELOAD]]
 +
 +
== Tests ==
 +
CSIT iperf3 [https://docs.fd.io/csit/master/report/vpp_performance_tests/hoststack_testing/iperf3/index.html#b-1t1c-xl710-base-scale results]
 +
 +
Make test VCL tests [https://git.fd.io/vpp/tree/src/vcl/test source code]
 +
 +
Unit tests for [https://git.fd.io/vpp/tree/src/plugins/unittest/tcp_test.c tcp], [https://git.fd.io/vpp/tree/src/plugins/unittest/session_test.c session layer] and [https://git.fd.io/vpp/tree/src/plugins/unittest/svm_fifo_test.c svm infra]
  
 
== Running List of Presentations ==
 
== Running List of Presentations ==

Revision as of 18:16, 6 April 2021

Description

VPP's host stack is a user space implementation of a number of transport, session and application layer protocols that leverages VPP's existing protocol stack. It roughly consists of four major components:

  • Session Layer that accepts pluggable transport protocols
  • Shared memory mechanisms for pushing data between VPP and applications
  • Transport protocol implementations (e.g. TCP, QUIC, TLS, UDP)
  • Comms Library (VCL) and LD_PRELOAD Library
VPP HostStack Arch

Documentation

Set Up Dev Environment - Explains how to set up a VPP development environment and the requirements for using the build tools

Session Layer - Goes over the main features of the session layer

VCL - Description and configuration

TLS Application - Describes the TLS Application Layer protocol implementation

Getting Started

Applications can link against the following APIs for host-stack service:

  • Builtin C API. It can only be used by applications hosted within VPP
  • "Raw" session layer API. It does not offer any support for async communication
  • VCL API that offers a POSIX-like interface. It comes with its own epoll implementation.
  • POSIX API through LD_PRELOAD

A number of test applications can be used to exercise these APIs. For many of the examples in the tutorials section below, it is assumed that two VPP instances have been brought up and properly configured to ensure networking connectivity between them. To test that network connectivity is available, the builtin ping tool can be used. As a convention, we consider the first vpp instance (vpp1) to be the one the server is attached to and the second instance (vpp2) to be the one where the client application is attached. For illustrative purposes all examples use TCP as a transport protocol but other available protocols could be used.

One of the simplest ways to test that the host stack is running would be to use the builtin echo applications. On vpp1, from the cli do:

# test echo server uri tcp://vpp1_ip/port

and on vpp2:

# test echo client uri tcp://vpp1_ip/port

For more details on how to further configure the client/server apps to do throughput and CPS testing see here and for more examples check the tutorials section.

Tutorials/Test Apps

Test Builtin Echo Client/Server Apps

Test External Echo Client/Server Apps

Test VCL Echo Client/Server Apps

Test HTTP Server App

Test Proxy App

iperf3 with LD_PRELOAD

sshd with LD_PRELOAD

nginx with LD_PRELOAD

Tests

CSIT iperf3 results

Make test VCL tests source code

Unit tests for tcp, session layer and svm infra

Running List of Presentations