Difference between revisions of "VPP/HostStack"

From fd.io
< VPP
Jump to: navigation, search
(Running List of Presentations)
(External Echo Server/Client)
Line 40: Line 40:
 
For more details on how to further configure the client/server apps to do throughput and CPS testing see [[VPP/HostStack/EchoClientServer | here]]
 
For more details on how to further configure the client/server apps to do throughput and CPS testing see [[VPP/HostStack/EchoClientServer | here]]
  
=== External Echo Server/Client ===
+
=== External Echo Server/Client (vpp_echo) ===
  
The external test echo apps can be found under
+
The VPP external echo server/client test application (vpp_echo), is a bespoke performance test application which supports all of the VPP HostStack transport layer protocols:
 +
* tcp
 +
* udp
 +
* quic 
 +
Vpp_echo utilizes the 'native HostStack APIs' to verify performance and correct handling of connection/stream events with uni-directional and bi-directional streams of data.
 +
It can be found in the build tree at
  
  <code>$./build-root/build-vpp[_debug]-native/vpp/bin/</code>
+
  <code>$ ./build-root/build-vpp[_debug]-native/vpp/bin/vpp_echo</code>
 +
 
 +
and as of VPP 20.01 is included in the main vpp debian package (e.g. vpp_20.01-release-amd64.deb)
  
 
Start vpp1 and attach the server application:
 
Start vpp1 and attach the server application:
  
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/tcp_echo uri tcp://vpp1_ip/port use-svm-api</code>
+
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_echo uri tcp://vpp1_ip/port</code>
  
 
Then start vpp2 and attach the client:
 
Then start vpp2 and attach the client:
  
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/tcp_echo client uri tcp://vpp1_ip/port use-svm-api</code>
+
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_echo client uri tcp://vpp1_ip/port</code>
  
Note that use-svm-api option is not needed for the udp_echo app.
+
The current command line options for vpp_echo are:
  
 
=== VCL socket client/server ===
 
=== VCL socket client/server ===

Revision as of 23:27, 3 February 2020

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, SCTP, 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 Architecture - Goes over the main features of the session layer

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 all the examples 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.

Builtin Echo Server/Client

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

External Echo Server/Client (vpp_echo)

The VPP external echo server/client test application (vpp_echo), is a bespoke performance test application which supports all of the VPP HostStack transport layer protocols:

  • tcp
  • udp
  • quic

Vpp_echo utilizes the 'native HostStack APIs' to verify performance and correct handling of connection/stream events with uni-directional and bi-directional streams of data. It can be found in the build tree at

$ ./build-root/build-vpp[_debug]-native/vpp/bin/vpp_echo

and as of VPP 20.01 is included in the main vpp debian package (e.g. vpp_20.01-release-amd64.deb)

Start vpp1 and attach the server application:

$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_echo uri tcp://vpp1_ip/port

Then start vpp2 and attach the client:

$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_echo client uri tcp://vpp1_ip/port

The current command line options for vpp_echo are:

VCL socket client/server

For more details see the tutorial here

Tutorials/Test Apps

Test HTTP Server App

Test Echo Client/Server Apps

Test Proxy App

sshd with LD_PRELOAD

iperf3 with LD_PRELOAD

Running List of Presentations