zephyr/samples/net/throughput_server
Paul Sokolovsky 028aae1ec9 net: config: Rename Kconfig options to correspond to library name
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.

Also, minor dependency, etc. tweaks are made.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-08-13 18:42:31 -07:00
..
src samples: net: tp: Avoid compiler warning 2018-07-24 09:20:46 -04:00
CMakeLists.txt samples: net: perf: Add sample for throughput measurement 2018-01-29 01:57:41 +05:30
prj_frdm_k64f.conf net: config: Rename Kconfig options to correspond to library name 2018-08-13 18:42:31 -07:00
README.rst samples: net: perf: Add sample for throughput measurement 2018-01-29 01:57:41 +05:30
sample.yaml samples: net: perf: Add sample for throughput measurement 2018-01-29 01:57:41 +05:30

.. _throughput-server-sample:

Throughput Server
#################

Overview
********

The throughput-server sample application for Zephyr implements a UDP server
that complements the throughput-client tool from Zephyr `net-tools`_ repository.
The throughput-server listens for incoming IPv4 or IPv6 packets (sent by the
throughput-client) and optionally sends the packets back.
Note that it makes sense to use this sample (only) with high-performance
bearer like Ethernet.

The source code for this sample application can be found at:
:file:`samples/net/throughput_server`.

Building and Running
********************

The application can be used on multiple boards and with different bearers.
Emulation using QEMU is not recommended because the ethernet connection in
QEMU is done using a serial port with SLIP, so it is very slow.

There are configuration files for different boards and setups in the
throughput-server directory:

- :file:`prj_frdm_k64f.conf`
  Use this for FRDM-K64F board with built-in ethernet.

Build throughput-server sample application like this:

.. zephyr-app-commands::
   :zephyr-app: samples/net/throughput_server
   :board: <board to use>
   :conf: <config file to use>
   :goals: build
   :compact:

Make will select the default configuration file based on the BOARD you
specified to CMake.

Note that shell support is not activated in the throughput-server so that
we can save some memory and have as many net_buf's configured in the system
as possible.

Running throughput-client in Linux Host
=======================================

In this example, the throughput-server is run on a board and throughput-client
is run on a Linux host. The throughput-client can be found at the `net-tools`_
project.

Open a terminal window and type:

.. code-block:: console

    $ cd net-tools
    $ ./throughput-client -F -s 200 2001:db8::1

Note that throughput-server must be running on the device under test before you
start the throughput-client application in a host terminal window.

.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools