Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions samples/net/zperf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ project(zperf)
target_sources(app PRIVATE
src/main.c
)

if (CONFIG_NET_SAMPLE_CODE_RELOCATE)
# Relocate key networking stack components and L2 layer to RAM
zephyr_code_relocate(LIBRARY subsys__net__ip
LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP)
zephyr_code_relocate(LIBRARY subsys__net
LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP)
if (CONFIG_NET_L2_ETHERNET)
zephyr_code_relocate(LIBRARY drivers__ethernet
LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP)
zephyr_code_relocate(LIBRARY subsys__net__l2__ethernet
LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP)
endif()
endif()
22 changes: 22 additions & 0 deletions samples/net/zperf/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 NXP
# SPDX-License-Identifier: Apache-2.0

source "Kconfig.zephyr"

config NET_SAMPLE_CODE_RELOCATE
bool "Relocate networking code into RAM"
select CODE_DATA_RELOCATION
help
Relocate networking code into RAM when running the zperf
sample. Can improve performance on platforms with fast code
RAM.

if NET_SAMPLE_CODE_RELOCATE

config NET_SAMPLE_CODE_RAM_NAME
string "Networking code RAM location"
default "RAM"
help
Region to relocate networking code to

endif # NET_SAMPLE_CODE_RELOCATE
2 changes: 2 additions & 0 deletions samples/net/zperf/boards/mimxrt1050_evk.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Note: HW accleration does not support IPV6
CONFIG_ETH_MCUX_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
14 changes: 0 additions & 14 deletions samples/net/zperf/boards/mimxrt1050_evk.overlay

This file was deleted.

2 changes: 2 additions & 0 deletions samples/net/zperf/boards/mimxrt1060_evk.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Note: HW accleration does not support IPV6
CONFIG_ETH_MCUX_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
14 changes: 0 additions & 14 deletions samples/net/zperf/boards/mimxrt1060_evk.overlay

This file was deleted.

4 changes: 4 additions & 0 deletions samples/net/zperf/boards/mimxrt1064_evk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Note: HW accleration does not support IPV6
CONFIG_ETH_MCUX_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
4 changes: 4 additions & 0 deletions samples/net/zperf/boards/mimxrt1170_evk_cm7.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Note: HW accleration does not support IPV6
CONFIG_ETH_MCUX_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"