Difference between revisions of "VPP/HostStack/EchoClientServer"

From fd.io
< VPP‎ | HostStack
Jump to: navigation, search
(Half-duplex single connection throughput testing)
Line 13: Line 13:
 
  vpp2# test echo client uri <transport>://vpp1_ip/port fifo-size 4096 test-timeout 100 no-return mbytes 10000
 
  vpp2# test echo client uri <transport>://vpp1_ip/port fifo-size 4096 test-timeout 100 no-return mbytes 10000
  
The <code>no-echo</code> and <code>no-return</code> options configure the server and the client for half-duplex operation, <code>fifo-size</code> sets configures the two to use 4MB rx and tx fifos and <code>mbytes</code> configures the client to do a 10GB transfer.
+
The <code>no-echo</code> and <code>no-return</code> options configure the server and the client for half-duplex operation, <code>fifo-size</code> configures the two to use 4MB rx and tx fifos and <code>mbytes</code> configures the client to do a 10GB transfer.
  
 
== External Echo Server/Client ==
 
== External Echo Server/Client ==

Revision as of 06:16, 28 May 2018

The host stack can be used by both internal and external, with respect to vpp, applications. For debugging and performance testing two pairs of such apps have been developed.

Builtin Echo Server/Client

These applications leverage the internal C apis to establish connections, shared memory fifos for sending and receiving data and callback functions for data reception events. For simple debugging of the stack, start two debug images and on the server (vpp1) and client (vpp2) do the following:

vpp1# test echo server uri <transport>://vpp1_ip/port
vpp2# test echo client uri <transport>://vpp1_ip/port

Half-duplex single connection throughput

vpp1# test echo server uri <transport>://vpp1_ip/port fifo-size 4096 no-echo 
vpp2# test echo client uri <transport>://vpp1_ip/port fifo-size 4096 test-timeout 100 no-return mbytes 10000

The no-echo and no-return options configure the server and the client for half-duplex operation, fifo-size configures the two to use 4MB rx and tx fifos and mbytes configures the client to do a 10GB transfer.

External Echo Server/Client

These applications leverage the binary api for establishing connections and shared memory fifos for data exchanges. We only support at this time a tcp and a udp echo app. To build the two applications one must change src/vnet.am with:

# sed -i 's/noinst_PROGRAMS += tcp_echo udp_echo/bin_PROGRAMS += tcp_echo udp_echo/' src/vnet.am

Alternatively, the two apps are accesible without modifying vnet.am under the path build-root/build-vpp-native/vpp/.libs

Half-duplex single connection throughput

vpp1# test echo server uri tcp://vpp1_ip/port fifo-size 4096 no-echo 
vpp2# session enable
vpp2_host# tcp_echo client no-return fifo-size 4096 [use-svm-api] mbytes 10000

There is no change to the server with respect to the builtin apps testing, on vpp2 session layer must be enabled and on the host where vpp2 runs, the echo app is started with no-echo option to indicate that the transfer is half-duplex, fifo size is set to 4MB. If vpp is started without a socket transport for the binary api use-svm-api must be used as tcp_echo defaults to connect using the socket transport.

Recommended half-duplex throughput testing configuration

  • 16k mbufs
  • 1 thread (main thread) since connection oriented transport protocols like TCP have sessions pinned to a core
  • 4k rx/tx-descriptors
  • 1 rx-queue, 1 tx-queue