VPP/HostStack/VclEchoClientServer

From fd.io
< VPP‎ | HostStack
Revision as of 18:25, 6 October 2022 by Maros.ondrejicka (Talk | contribs)

Jump to: navigation, search

The VCL echo server/client test applications, vcl_test_server and vcl_test_client, are bespoke performance test applications which support all of VPP's HostStack transport layer protocols, i.e., tcp, udp, quic and tls. They utilize VPPComsLibrary (VCL), as opposed to 'raw session layer' (see here), APIs to verify performance and correct handling of connection/stream events with uni-directional and bi-directional streams of data. The apps can be found in the build tree at:

$ ./build-root/build-vpp[_debug]-native/vpp/bin/vcl_test_[server/client]

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

Start vpp1 and attach the server application:

$ VCL_CONFIG=/path/to/vcl.conf ./build-root/build-vpp_debug-native/vpp/bin/vcl_test_server -p tcp 1234 

Then start vpp2 and attach the client:

$ VCL_CONFIG=/path/to/vcl.conf ./build-root/build-vpp_debug-native/vpp/bin/vcl_test_client -U -p tcp <vpp1_ip> 1234 

The current command line options for vcl_test_server are:

 vcl_test_server [OPTIONS] <port>
 OPTIONS
 -h               Print this message and exit.
 -6               Use IPv6
 -w <num>         Number of workers
 -p <PROTO>       Use <PROTO> transport layer
 -D               Use UDP transport layer
 -L               Use TLS transport layer

The current command line options for vcl_test_client are:

 vcl_test_client [OPTIONS] <ipaddr> <port>
 OPTIONS
 -h               Print this message and exit.
 -6               Use IPv6
 -c               Print test config before test.
 -w <dir>         Write test results to <dir>.
 -X               Exit after running test.
 -p <proto>       Use <proto> transport layer
 -D               Use UDP transport layer
 -L               Use TLS transport layer
 -E               Run Echo test.
 -N <num-writes>  Test Cfg: number of writes.
 -R <rxbuf-size>  Test Cfg: rx buffer size.
 -T <txbuf-size>  Test Cfg: tx buffer size.
 -U               Run Uni-directional test.
 -B               Run Bi-directional test.
 -V               Verbose mode.
 -I <N>           Use N sessions.
 -s <N>           Use N sessions.
 -q <n>           QUIC : use N Ssessions on top of n Qsessions

Example vcl.conf:

 vcl {
   app-socket-api /var/run/vpp/app_ns_sockets/001
   app-scope-global
   app-scope-local
   namespace-id 001
   namespace-secret 001
   use-mq-eventfd
 }

Create socket specified by app-socket-api by issuing app ns add command in corresponding VPP instance:

vpp# app ns add id 001 secret 001 sw_if_index 1 if eth0

VPP's startup.conf should include following (even though current configuration reference doesn't show these parameters):

 session {
   enable
   use-app-socket-api
 }

Out of date

Out of date tutorial here