Difference between revisions of "VPP/HostStack/VclEchoClientServer"

From fd.io
< VPP‎ | HostStack
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The VCL echo server/client test applications, vcl_test_server and vcl_test_client, are bespoke performance test applications which supports all of VPP's HostStack transport layer protocols:
+
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 [[VPP/HostStack/ExternalEchoClientServer |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:
* tcp
+
* udp
+
* quic
+
* tls
+
 
+
They utilize VPPComsLibrary (VCL), as opposed to 'raw session layer' (see [[VPP/HostStack/ExternalEchoClientServer |here]]), APIs to verify performance and correct handling of connection/stream events with uni-directional and bi-directional streams of data.
+
 
+
They can be found in the build tree at
+
  
 
  <code>$ ./build-root/build-vpp[_debug]-native/vpp/bin/vcl_test_[server/client]</code>
 
  <code>$ ./build-root/build-vpp[_debug]-native/vpp/bin/vcl_test_[server/client]</code>
Line 15: Line 7:
 
Start vpp1 and attach the server application:
 
Start vpp1 and attach the server application:
  
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_test_server -p tcp 1234 </code>
+
  <code>$ VCL_CONFIG=/path/to/vcl.conf ./build-root/build-vpp_debug-native/vpp/bin/vcl_test_server -p tcp 1234 </code>
  
 
Then start vpp2 and attach the client:
 
Then start vpp2 and attach the client:
  
  <code>$ ./build-root/build-vpp_debug-native/vpp/bin/vpp_test_client client -U -p tcp <vpp1_ip> 1234 </code>
+
  <code>$ VCL_CONFIG=/path/to/vcl.conf ./build-root/build-vpp_debug-native/vpp/bin/vcl_test_client -U -p tcp <vpp1_ip> 1234 </code>
  
 
The current command line options for vcl_test_server are:
 
The current command line options for vcl_test_server are:
Line 57: Line 49:
 
   -s <N>          Use N sessions.
 
   -s <N>          Use N sessions.
 
   -q <n>          QUIC : use N Ssessions on top of n Qsessions
 
   -q <n>          QUIC : use N Ssessions on top of n Qsessions
 +
</code>
 +
 +
Example vcl.conf:
 +
 +
<code>
 +
  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
 +
  }
 +
</code>
 +
 +
Create socket specified by app-socket-api by issuing ''app ns add'' command in corresponding VPP instance. For example:
 +
<code>vpp# app ns add id 001 secret 001 sw_if_index 1 if eth0</code>
 +
 +
VPP's startup.conf should include following (even though current [https://s3-docs.fd.io/vpp/22.10/configuration/reference.html configuration reference] doesn't show these parameters):
 +
 +
<code>
 +
  session {
 +
    enable
 +
    use-app-socket-api
 +
  }
 
</code>
 
</code>
  
 
=== Out of date ===
 
=== Out of date ===
 
Out of date tutorial [[VPP/VPPCommunicationsLibrary | here]]
 
Out of date tutorial [[VPP/VPPCommunicationsLibrary | here]]

Latest revision as of 18:26, 6 October 2022

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. For example:

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