-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: net: zperf: Convert to use the new shell
Use new shell instead of the legacy one. This commit also fixes the configuration file mess and allows the program to be run on more hardware. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Loading branch information
Showing
20 changed files
with
1,033 additions
and
1,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.8.2) | ||
|
||
macro(set_conf_file) | ||
if(PROFILER) | ||
set(CONF_FILE prj_${BOARD}_prof.conf) | ||
if(EXISTS ${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf) | ||
set(CONF_FILE "${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf") | ||
elseif(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf) | ||
set(CONF_FILE | ||
"prj.conf ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf") | ||
else() | ||
set(CONF_FILE prj_${BOARD}.conf) | ||
set(CONF_FILE "prj.conf") | ||
endif() | ||
endmacro() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources( | ||
app PRIVATE | ||
target_sources(app PRIVATE | ||
src/shell_utils.c | ||
src/zperf_session.c | ||
src/zperf_shell.c | ||
) | ||
target_sources_ifdef( | ||
CONFIG_NET_UDP | ||
app PRIVATE | ||
src/zperf_udp_receiver.c | ||
src/zperf_udp_uploader.c | ||
) | ||
target_sources_ifdef( | ||
CONFIG_NET_TCP | ||
app PRIVATE | ||
src/zperf_tcp_receiver.c | ||
src/zperf_tcp_uploader.c | ||
) | ||
|
||
target_compile_definitions_ifdef( | ||
PROFILER | ||
app PRIVATE | ||
PROFILER | ||
) | ||
|
||
target_include_directories(app PRIVATE | ||
$ENV{ZEPHYR_BASE}/subsys/net/ip | ||
$ENV{ZEPHYR_BASE}/samples/task_profiler/profiler/src | ||
) | ||
|
||
if(PROFILER) | ||
assert(0 "PROFILER is not supported yet") | ||
# KBuild did this, but this did not work, not sure why. | ||
# export PROFILER_NO_SHELL_REGISTER=1 | ||
# obj-y += ../../../task_profiler/profiler/ | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CONFIG_NET_L2_IEEE802154=y | ||
CONFIG_IEEE802154_CC2520=y | ||
CONFIG_NET_6LO_CONTEXT=y | ||
|
||
CONFIG_NET_PKT_RX_COUNT=24 | ||
CONFIG_NET_PKT_TX_COUNT=24 | ||
CONFIG_NET_BUF_RX_COUNT=48 | ||
CONFIG_NET_BUF_TX_COUNT=48 | ||
CONFIG_NET_BUF_DATA_SIZE=128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_NET_L2_BT=y | ||
CONFIG_NET_L2_BT_SHELL=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# USB Device Settings | ||
CONFIG_USB=y | ||
CONFIG_USB_DEVICE_STACK=y | ||
|
||
# Select USB Configurations | ||
CONFIG_USB_DEVICE_NETWORK_ECM=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
common: | ||
harness: net | ||
tags: net zperf samples | ||
# TODO: Does not work properly with native_posix, need more TLC | ||
platform_exclude: native_posix | ||
sample: | ||
description: TBD | ||
name: TBD | ||
description: Network performance measurement tool for Zephyr | ||
name: zperf | ||
tests: | ||
test: | ||
harness: net | ||
platform_whitelist: qemu_x86 | ||
tags: samples net | ||
test_netusb_ecm: | ||
harness: net | ||
extra_args: CONF_FILE="prj_netusb.conf" | ||
extra_args: OVERLAY_CONFIG="overlay-netusb.conf" | ||
extra_configs: | ||
- CONFIG_NET_PKT_RX_COUNT=10 | ||
- CONFIG_NET_PKT_TX_COUNT=10 | ||
- CONFIG_NET_TCP=n | ||
platform_whitelist: quark_se_c1000_devboard 96b_carbon | ||
tags: samples usb net | ||
tags: samples usb net zperf | ||
test_netusb_eem: | ||
harness: net | ||
extra_args: CONF_FILE="prj_netusb.conf" | ||
extra_args: OVERLAY_CONFIG="overlay-netusb.conf" | ||
extra_configs: | ||
- CONFIG_USB_DEVICE_NETWORK_ECM=n | ||
- CONFIG_USB_DEVICE_NETWORK_EEM=y | ||
- CONFIG_NET_PKT_RX_COUNT=10 | ||
- CONFIG_NET_PKT_TX_COUNT=10 | ||
- CONFIG_NET_TCP=n | ||
platform_whitelist: quark_se_c1000_devboard 96b_carbon | ||
tags: samples usb net | ||
tags: samples usb net zperf | ||
test_netusb_rndis: | ||
harness: net | ||
extra_args: CONF_FILE="prj_netusb.conf" | ||
extra_args: OVERLAY_CONFIG="overlay-netusb.conf" | ||
extra_configs: | ||
- CONFIG_USB_DEVICE_NETWORK_ECM=n | ||
- CONFIG_USB_DEVICE_NETWORK_RNDIS=y | ||
- CONFIG_NET_PKT_RX_COUNT=10 | ||
- CONFIG_NET_PKT_TX_COUNT=10 | ||
- CONFIG_NET_PKT_RX_COUNT=32 | ||
- CONFIG_NET_PKT_TX_COUNT=32 | ||
- CONFIG_NET_TCP=n | ||
platform_whitelist: quark_se_c1000_devboard 96b_carbon | ||
tags: samples usb net | ||
tags: samples usb net zperf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.