2017-01-08 05:10:06 +08:00
|
|
|
zperf: Network Traffic Generator
|
2016-12-22 12:23:04 +08:00
|
|
|
################################
|
|
|
|
|
2016-05-13 04:20:39 +08:00
|
|
|
Description
|
|
|
|
===========
|
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
zperf is a network traffic generator for Zephyr that may be used to
|
2016-05-13 04:20:39 +08:00
|
|
|
evaluate network bandwidth.
|
|
|
|
|
|
|
|
Features
|
|
|
|
=========
|
|
|
|
|
|
|
|
- Compatible with iPerf_2.0.5.
|
|
|
|
- Client or server mode allowed without need to modify the source code.
|
2016-05-26 16:12:36 +08:00
|
|
|
- Working with task profiler (PROFILER=1 to be set when building zperf)
|
2016-05-13 04:20:39 +08:00
|
|
|
|
|
|
|
Supported Boards
|
|
|
|
================
|
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
zperf is board-agnostic. However, to run the zperf sample application,
|
|
|
|
the target platform must provide a network interface supported by Zephyr.
|
|
|
|
|
|
|
|
This sample application has been tested on the following platforms:
|
|
|
|
|
|
|
|
- Freedom Board (FRDM K64F)
|
|
|
|
- Quark SE C1000 Development Board
|
|
|
|
- QEMU x86
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
============
|
|
|
|
|
|
|
|
- iPerf 2.0.5 installed on the host machine
|
|
|
|
- Supported board
|
|
|
|
|
|
|
|
Depending on the network technology chosen, extra steps may be required
|
|
|
|
to setup the network environment.
|
2016-11-21 21:51:56 +08:00
|
|
|
|
|
|
|
Usage
|
|
|
|
=====
|
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
If Zephyr acts as a client, iPerf must be executed in server mode.
|
|
|
|
For example, the following command line must be used for UDP testing:
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-04 05:02:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ iperf -s -l 1K -u -V -B 2001:db8::2
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
|
|
|
|
In the Zephyr console, zperf can be executed as follows:
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-04 05:02:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
zperf> udp.upload 2001:db8::2 5001 10 1K 1M
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
|
|
|
|
If the IP addresses of Zephyr and the host machine are specified in the
|
|
|
|
config file, zperf can be started as follows:
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-04 05:02:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
zperf> udp.upload2 v6 10 1K 1M
|
2016-11-21 21:51:56 +08:00
|
|
|
|
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
If Zephyr is acting as a server, set the download mode as follows:
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-04 05:02:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
zperf> udp.download 5001
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
|
|
|
|
and in the host side, iPerf must be executed with the following
|
|
|
|
command line:
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-04 05:02:59 +08:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ iperf -l 1K -u -V -c 2001:db8::1 -p 5001
|
2016-11-21 21:51:56 +08:00
|
|
|
|
2017-01-08 05:10:06 +08:00
|
|
|
|
|
|
|
iPerf output can be limited by using the -b option if Zephyr is not
|
|
|
|
able to receive all the packets in orderly manner.
|