Difference between revisions of "VPP/HostStack/EchoClientServer"

From fd.io
< VPP‎ | HostStack
Jump to: navigation, search
(External Echo Server/Client)
(External Echo Server/Client)
Line 26: Line 26:
 
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 <code>src/vnet.am</code> with:
 
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 <code>src/vnet.am</code> with:
  
# sed -i 's/noinst_PROGRAMS += tcp_echo udp_echo/bin_PROGRAMS += tcp_echo udp_echo/' src/vnet.am
+
# 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 <code>vnet.am</code> under the path <code>build-root/build-vpp-native/vpp/.libs</code>
 
Alternatively, the two apps are accesible without modifying <code>vnet.am</code> under the path <code>build-root/build-vpp-native/vpp/.libs</code>
 +
 +
=== Half-duplex throughput testing ===
 +
 +
vpp1#
 +
host where vpp2 runs# tcp_echo client no-return fifo-size 4096 use-svm-api mbytes 10000

Revision as of 17:44, 9 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 callback functions for receiving data. For simple debugging of the stack, start two debug images and:

On vpp1 (the server), from the cli do:

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

and on vpp2 (the client):

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

Half-Duplex single connection throughput

For connection oriented transport protocols like TCP processing is pinned to a core so for testing purposes running vpp with one core (main thread) is enough.

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 sets 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 throughput testing

vpp1#
host where vpp2 runs# tcp_echo client no-return fifo-size 4096 use-svm-api mbytes 10000