diff options
author | 2024-01-04 11:53:28 -0600 | |
---|---|---|
committer | 2024-01-31 15:24:54 -0600 | |
commit | aa394e52221d74690d9d36cddae18ec9526a1059 (patch) | |
tree | a476e61483d70fb2403f11dd6fbfe090f9832fa4 /host | |
parent | ci: refactor streaming steps (diff) | |
download | uhd-aa394e52221d74690d9d36cddae18ec9526a1059.tar.xz uhd-aa394e52221d74690d9d36cddae18ec9526a1059.zip |
ci: add x440 streaming step
Diffstat (limited to 'host')
-rw-r--r-- | host/tests/pytests/conftest.py | 3 | ||||
-rw-r--r-- | host/tests/pytests/test_raw_udp_streaming.py | 48 | ||||
-rw-r--r-- | host/tests/pytests/test_streaming.py | 45 | ||||
-rw-r--r-- | host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf | 22 | ||||
-rwxr-xr-x | host/tests/streaming_performance/setup100gbe.sh | 299 | ||||
-rwxr-xr-x | host/tests/streaming_performance/setup10gbe.sh (renamed from host/tests/streaming_performance/setup.sh) | 0 |
6 files changed, 413 insertions, 4 deletions
diff --git a/host/tests/pytests/conftest.py b/host/tests/pytests/conftest.py index cf05d5320..b1498a9d1 100644 --- a/host/tests/pytests/conftest.py +++ b/host/tests/pytests/conftest.py @@ -7,7 +7,8 @@ dut_type_list = [ "E320", "X310", "X310_TwinRx", - "x410" + "x410", + "x440" ] diff --git a/host/tests/pytests/test_raw_udp_streaming.py b/host/tests/pytests/test_raw_udp_streaming.py index e9619be10..f135f3315 100644 --- a/host/tests/pytests/test_raw_udp_streaming.py +++ b/host/tests/pytests/test_raw_udp_streaming.py @@ -80,6 +80,46 @@ def generate_x410_100GbE_test_cases(metafunc, test_length, dut_fpga, sfp_int0, s stress_params = test_length_utils.test_length_params(iterations=2, duration=600) parametrize_test_length(metafunc, test_length, fast_params, stress_params) +def generate_x440_100GbE_test_cases(metafunc, test_length, dut_fpga, sfp_int0, sfp_int1): + if dut_fpga.upper() == 'CG_400': + test_cases = [ + # Test Lengths dual_SFP rate rx_rate rx_channels dest_addr dest_port adapter host_interface keep_hdr test case ID + # -------------------------------------------------------------------------------------------------------------------------------------------------------- + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 500e6, 500e6, "0", "192.168.110.1", 1234, "sfp0", sfp_int0, True, id="SFP0_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 500e6, 500e6, "1", "192.168.110.1", 1234, "sfp0", sfp_int0, False, id="SFP0_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "2", "192.168.110.1", 1234, "sfp0", sfp_int0, True, id="SFP0_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "3", "192.168.110.1", 1234, "sfp0", sfp_int0, False, id="SFP0_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "4", "192.168.110.1", 1234, "sfp0", sfp_int0, True, id="SFP0_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "5", "192.168.110.1", 1234, "sfp0", sfp_int0, False, id="SFP0_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "6", "192.168.110.1", 1234, "sfp0", sfp_int0, True, id="SFP0_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "7", "192.168.110.1", 1234, "sfp0", sfp_int0, False, id="SFP0_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 500e6, 500e6, "0", "192.168.120.1", 1234, "sfp1", sfp_int1, True, id="SFP1_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 500e6, 500e6, "1", "192.168.120.1", 1234, "sfp1", sfp_int1, False, id="SFP1_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "2", "192.168.120.1", 1234, "sfp1", sfp_int1, True, id="SFP1_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "3", "192.168.120.1", 1234, "sfp1", sfp_int1, False, id="SFP1_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "4", "192.168.120.1", 1234, "sfp1", sfp_int1, True, id="SFP1_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "5", "192.168.120.1", 1234, "sfp1", sfp_int1, False, id="SFP1_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "6", "192.168.120.1", 1234, "sfp1", sfp_int1, True, id="SFP1_FULL_PACKET_1x100GbE-1xRX@500e6")], + [{}, pytest.param(False, 500e6, 500e6, "7", "192.168.120.1", 1234, "sfp1", sfp_int1, False, id="SFP1_RAW_PAYLOAD_1x100GbE-1xRX@500e6")], + ] + + if dut_fpga.upper() == 'CG_1600': + test_cases = [ + # Test Lengths dual_SFP rate rx_rate rx_channels dest_addr dest_port adapter host_interface keep_hdr test case ID + # -------------------------------------------------------------------------------------------------------------------------------------------------------- + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 1000e6, 1000e6, "0", "192.168.110.1", 1234, "sfp0", sfp_int0, True, id="SFP0_FULL_PACKET_1x100GbE-1xRX@1000e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 1000e6, 1000e6, "1", "192.168.110.1", 1234, "sfp0", sfp_int0, False, id="SFP0_RAW_PAYLOAD_1x100GbE-1xRX@1000e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 1000e6, 1000e6, "0", "192.168.120.1", 1234, "sfp1", sfp_int1, True, id="SFP1_FULL_PACKET_1x100GbE-1xRX@1000e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(False, 1000e6, 1000e6, "1", "192.168.120.1", 1234, "sfp1", sfp_int1, False, id="SFP1_RAW_PAYLOAD_1x100GbE-1xRX@1000e6")], + ] + + argvalues = test_length_utils.select_test_cases_by_length(test_length, test_cases) + metafunc.parametrize(ARGNAMES_DUAL_SFP, argvalues) + + fast_params = test_length_utils.test_length_params(iterations=5, duration=0.5) + stress_params = test_length_utils.test_length_params(iterations=2, duration=600) + parametrize_test_length(metafunc, test_length, fast_params, stress_params) + def generate_X310_10GbE_test_cases(metafunc, test_length, sfp_int0, sfp_int1): test_cases = [ # Test Lengths dual_SFP rate rx_rate rx_channels dest_addr dest_port adapter host_interface keep_hdr test case ID @@ -110,6 +150,8 @@ def pytest_generate_tests(metafunc): generate_x410_10GbE_test_cases(metafunc, test_length, sfp_int0, sfp_int1) if dut_type.lower() == 'x410' and dut_fpga.upper() in {'CG_400', 'UC_200'}: generate_x410_100GbE_test_cases(metafunc, test_length, dut_fpga, sfp_int0, sfp_int1) + if dut_type.lower() == 'x440' and dut_fpga.upper() in {'CG_400', 'CG_1600'}: + generate_x440_100GbE_test_cases(metafunc, test_length, dut_fpga, sfp_int0, sfp_int1) if dut_type.lower() == 'x310' and dut_fpga.upper() == 'XG': generate_X310_10GbE_test_cases(metafunc, test_length, sfp_int0, sfp_int1) @@ -122,9 +164,13 @@ def test_raw_udp_streaming(pytestconfig, dut_type, dual_SFP, rate, rx_rate, rx_c device_args = "" # construct device args string - if dut_type.lower() in ['n310', 'n320', 'e320', 'x310', 'x410']: + if dut_type.lower() in ['n310', 'n320', 'e320', 'x310', 'x410', 'x440']: device_args += f"master_clock_rate={rate}," + # mpm reboot on x440 is for spurrious RF performance, these tests do not care about RF performance + if dut_type.lower() == 'x440': + device_args += f"skip_mpm_reboot=1," + addr = pytestconfig.getoption('addr') second_addr = pytestconfig.getoption('second_addr') if addr: diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py index 5f06945f8..75d64ebd1 100644 --- a/host/tests/pytests/test_streaming.py +++ b/host/tests/pytests/test_streaming.py @@ -193,6 +193,36 @@ def generate_x410_test_cases(metafunc, test_length, dut_fpga): stress_params = test_length_utils.test_length_params(iterations=2, duration=600) parametrize_test_length(metafunc, test_length, fast_params, stress_params) +def generate_x440_test_cases(metafunc, test_length, dut_fpga): + # Test Cases chosen from published spec: https://kb.ettus.com/X440#100_Gigabit_Ethernet + # Note some cases reduced number of channels on Tx 450 for and rate reduced for CG_1600 Tx + if dut_fpga.upper() == 'CG_400': + test_cases = [ + # Test Lengths dual_SFP rate rx_rate rx_channels tx_rate tx_channels test case ID + # ------------------------------------------------------------------------------------------------------------------------------------------- + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 500e6, 500e6, "0,1,2,3,4,5", 0, "", id="2x100GbE-6xRX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 500e6, 0, "", 500e6, "0,1,2,3,4,5", id="2x100GbE-6xTX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 450e6, 0, "", 450e6, "0,1,2,3,4,5", id="2x100GbE-6xTX@450e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 500e6, 500e6, "0,1,2,3", 500e6, "0,1,2,3", id="2x100GbE-4xTRX@500e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 250e6, 250e6, "0,1,2,3,4,5,6,7", 250e6, "0,1,2,3,4,5,6,7", id="2x100GbE-8xTRX@250e6")], + ] + if dut_fpga.upper() == 'CG_1600': + test_cases = [ + # Test Lengths dual_SFP rate rx_rate rx_channels tx_rate tx_channels test case ID + # ------------------------------------------------------------------------------------------------------------------------------ + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 1000e6, 1000e6, "0,1", 0, "", id="2x100GbE-2xRX@1000e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 1000e6, 0, "", 1000e6, "0,1", id="2x100GbE-2xTX@1000e6")], + [{Test_Length_Stress, Test_Length_Smoke}, pytest.param(True, 1000e6, 1000e6, "0,1", 1000e6, "0,1", id="2x100GbE-2xTRX@1000e6")], + ] + + argvalues = test_length_utils.select_test_cases_by_length(test_length, test_cases) + metafunc.parametrize(ARGNAMES_DUAL_SFP, argvalues) + + fast_params = test_length_utils.test_length_params(iterations=10, duration=30) + stress_params = test_length_utils.test_length_params(iterations=2, duration=600) + parametrize_test_length(metafunc, test_length, fast_params, stress_params) + + def pytest_generate_tests(metafunc): dut_type = metafunc.config.getoption("dut_type") dut_fpga = metafunc.config.getoption("dut_fpga") @@ -227,6 +257,8 @@ def pytest_generate_tests(metafunc): generate_X310_TwinRx_test_cases(metafunc, test_length) elif dut_type.lower() == 'x410': generate_x410_test_cases(metafunc, test_length, dut_fpga) + elif dut_type.lower() == 'x440': + generate_x440_test_cases(metafunc, test_length, dut_fpga) def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx_channels, @@ -237,8 +269,12 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx device_args = "" # construct device args string - if dut_type.lower() in ['n310', 'n320', 'e320', 'b210']: + if dut_type.lower() in ['n310', 'n320', 'e320', 'b210', 'x440']: device_args += f"master_clock_rate={rate}," + + # mpm reboot on x440 is for spurrious RF performance, these tests do not care about RF performance + if dut_type.lower() == 'x440': + device_args += f"skip_mpm_reboot=1," if dut_type == "B210": device_args += f"name={pytestconfig.getoption('name')}," @@ -290,7 +326,7 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx # Run X410 streaming tests in multi_streamer mode and high thread priority # since those settings allow for best performance. - if dut_type.lower() == "x410": + if dut_type.lower() == "x410" or dut_type.lower() == "x440": benchmark_rate_params["multi_streamer"] = 1 benchmark_rate_params["priority"] = "high" dut_fpga = pytestconfig.getoption('dut_fpga') @@ -299,6 +335,11 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx # config are resolved for UC_200. benchmark_rate_params["tx_delay"] = 1.5 benchmark_rate_params["rx_delay"] = 0.5 + if dut_fpga.upper() == 'CG_400' or dut_fpga.upper() == 'CG_1600': + # TODO: Remove this delay workaround when IO errors on multi_streamer + # config are resolved for UC_200. + benchmark_rate_params["tx_delay"] = 2 + benchmark_rate_params["rx_delay"] = 2 # run benchmark rate print() diff --git a/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf b/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf new file mode 100644 index 000000000..82205d381 --- /dev/null +++ b/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf @@ -0,0 +1,22 @@ +;This is a generated template for uhd.conf +;To apply these changes replace /etc/uhd/uhd.conf with this file. +;Users will likely want to change some of these values to better +;suit their individual system. +;more info here: https://files.ettus.com/manual/page_dpdk.html#dpdk_nic_config +[use_dpdk=1] +dpdk_mtu=9000 +dpdk_corelist=1,2,3 +dpdk_num_mbufs=8192 +dpdk_mbuf_cache_size=64 +dpdk_driver=/usr/lib/x86_64-linux-gnu/dpdk/pmds-22.0/ + +[dpdk_mac=0c:42:a1:3a:16:88] +dpdk_lcore = 2 +dpdk_ipv4 = 192.168.110.1/24 +dpdk_num_desc=4096 + +[dpdk_mac=0c:42:a1:3a:16:89] +dpdk_lcore = 3 +dpdk_ipv4 = 192.168.120.1/24 +dpdk_num_desc=4096 + diff --git a/host/tests/streaming_performance/setup100gbe.sh b/host/tests/streaming_performance/setup100gbe.sh new file mode 100755 index 000000000..802bad789 --- /dev/null +++ b/host/tests/streaming_performance/setup100gbe.sh @@ -0,0 +1,299 @@ +#!/bin/bash +# +# setup script for streaming performance enhancements +# +# Instructions +# copy this file to the host machine +# the script should be run as root +# sudo ./setup100gbe.sh <$sfp0> <$sfp1> ... <$sfpn> [-v] [-s] +# sudo ./setup100gbe.sh enp1s0f0 enp1s0f1 +# sudo ./setup100gbe.sh --auto +# sudo ./setup100gbe.sh --deps +# +# limitations: +# - does not cover thread priority scheduling +# more info: https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks#Thread_Priority_Scheduling +# - does not write grub files for using dpdk +# more info: https://files.ettus.com/manual/page_dpdk.html#dpdk_system_configuration +# - assumes system has Ubuntu 18.04/DPDK 17.11, and may not work for other distributions + +ETH_100_GIGS=() +DPDK_DEVS=() +AUTO=NO +VERBOSE=NO +STATS=NO +INSTALL_DEPS=NO +USE_DPDK=NO +CURRENT_STATE=NO +MAC_ADDRS=() +GEN_CONF=NO +FORCE_OVERWRITE_CONF=NO +HELP=NO +RAMDISK=NO + +while [[ $# -gt 0 ]]; do + key="$1" + case $key in + -h|--help) + HELP=YES + shift + ;; + -v|--verbose) + VERBOSE=YES + shift + ;; + -s|--stats) + STATS=YES + shift + ;; + --auto) + AUTO=YES + shift + ;; + --deps) + INSTALL_DEPS=YES + shift + ;; + --dpdk) + USE_DPDK=YES + shift + ;; + --gen) + GEN_CONF=YES + shift + ;; + --force) + FORCE_OVERWRITE_CONF=YES + shift + ;; + --ramdisk) + RAMDISK=YES + shift + ;; + *) + ETH_100_GIGS+=($1) + shift + ;; + esac +done + +if [[ "$HELP" == "YES" ]]; then + echo "Usage:" + echo " ./setup100gbe.sh [options] <interface0> <interface1> ..." + echo "" + echo "where the interfaces are 10 GigE network interfaces." + echo "these can be specified by name, or by using the --auto flag." + echo "" + echo "Options:" + echo " -v, --verbose display extra log messages" + echo " -s, --stats display info about the resulting system configuration" + echo " --auto searches for available SFP interfaces instead of the user specifying them" + echo " --deps installs dependencies for uhd, rfnoc, dpdk, and utils" + echo " --dpdk sets up the system for using dpdk" + echo " --gen generates a uhd conf file template for the system interfaces" + echo " --force loads uhd conf file in the current directory as the system-wide uhd.conf" + echo " --ramdisk creates a ram disk for lossless capture with network packet capture applications like tcpdump" + exit 0 +fi + +function log() { + if [[ "$VERBOSE" == "YES" ]]; then + echo "$@" + fi +} + +if [[ "$INSTALL_DEPS" == "YES" ]]; then + apt install -y cpufrequtils ethtool net-tools + apt install -y dpdk dpdk-dev + echo "Deps installed. Rerun without --deps flag." + exit 0 +fi + +function detect_mode() { + if [[ -n "$(dpdk-devbind -s | grep 'drv=vfio-pci')" ]]; then + CURRENT_STATE=DPDK + else + CURRENT_STATE=DEFAULT + fi +} + +function reset_state() { + detect_mode + if [[ "$CURRENT_STATE" == "DPDK" ]]; then + log "" + log "RESETTING CURRENT DPDK STATE" + fi + while [[ "$CURRENT_STATE" == "DPDK" ]]; do + dev_info="$(dpdk-devbind -s | grep 'drv=vfio-pci')" + log "found dpdk dev:$dev_info" + dev_name=${dev_info%% \'*} + dev_drv=${dev_info#*unused=} + dev_drv=${dev_drv%%[$'\n']*} + log "binding $dev_name to $dev_drv" + sudo dpdk-devbind --bind=$dev_drv $dev_name + detect_mode + done + DIR="/mnt/ramdisk/" + if [ -d "$DIR" ]; then + echo "Unmounting ramdisk at ${DIR}..." + sudo umount ${DIR} + sudo rm -rf ${DIR} + fi +} + +function get_devs() { + if [[ ${#ETH_100_GIGS[@]} -ne 0 ]]; then + echo "Rerun with only either --auto flag or network interfaces specified in arguments." + exit 1 + fi + dev="$(dpdk-devbind -s | grep 'mlx')" + for dev_info in $dev; do + if [[ "$dev_info" =~ if=.* ]]; then + iface="${dev_info#if=}" + ETH_100_GIGS+=($iface) + log "found network iface: $iface" + fi + done +} + +function get_mac_addrs() { + for iface in "${ETH_100_GIGS[@]}"; do + mac_addr="$(ifconfig $iface | grep 'ether ')" + mac_addr=${mac_addr#*ether } + mac_addr=${mac_addr% txqueuelen*} + MAC_ADDRS+=($mac_addr) + log "found mac address: $mac_addr" + done +} + +detect_mode +reset_state +log "" +log "SEARCHING FOR DEVICE INFO" +if [[ "$AUTO" == "YES" ]]; then + get_devs +fi +if [[ ${#ETH_100_GIGS[@]} -eq 0 ]]; then + echo "[warning] no 100 GigE Interfaces specified or found." +fi +get_mac_addrs + +log "" +log "SETTING CPU GOVERNORS" +for ((i=0;i<$(nproc --all);i++)); do + log "setting core $i to performance" + cpufreq-set -c $i -r -g performance; +done + +log "" +log "SETTING NETWORK BUFFERS" +sysctl -w net.core.rmem_max=625000000 +sysctl -w net.core.wmem_max=625000000 +sysctl -w net.core.rmem_default=625000000 +sysctl -w net.core.wmem_default=625000000 + +function set_network_iface() { + log "" + log "SETTING UP NETWORK INTERFACE" + ifconfig $1 up + log "setting $1 mtu 9000" + ifconfig $1 mtu 9000 + log "setting $1 ring buffer: rx 8192 tx 8192" + ethtool -G $1 rx 8192 tx 8192 +} + +for iface in "${ETH_100_GIGS[@]}"; do + set_network_iface $iface +done + +if [[ "$RAMDISK" == "YES" ]]; then + log "" + log "SETTING UP RAMDISK" + DIR="/mnt/ramdisk/" + if ! [ -d "$DIR" ]; then + sudo mkdir ${DIR} + fi + if [[ $(findmnt -M "$DIR") ]]; then + echo "${DIR} already mounted" + else + sudo mount -t tmpfs -o rw,size=16G tmpfs ${DIR} + fi +fi + +function generate_uhd_conf() { + current_dir=`pwd` + file_path=$current_dir/uhd.conf + log "creating template file: $file_path" + echo ";This is a generated template for uhd.conf" > $file_path + echo ";To apply these changes replace /etc/uhd/uhd.conf with this file." >> $file_path + echo ";Users will likely want to change some of these values to better" >> $file_path + echo ";suit their individual system." >> $file_path + echo ";more info here: https://files.ettus.com/manual/page_dpdk.html#dpdk_nic_config" >> $file_path + echo "[use_dpdk=1]" >> $file_path + echo "dpdk-mtu=9000" >> $file_path + echo "dpdk-corelist=1,2,3" >> $file_path + echo "dpdk_num_mbufs=8192" >> $file_path + echo "dpdk_mbuf_cache_size=64" >> $file_path + echo "" >> $file_path + subnet=$((10)) + for mac_addr in ${MAC_ADDRS[@]}; do + echo "[dpdk_mac=$mac_addr]" >> $file_path + echo "dpdk_lcore = 2" >> $file_path + echo "dpdk_ipv4 = 192.168.$subnet.1/24" >> $file_path + subnet=$(($subnet+10)) + if [[ "$mac_addr" == "${MAC_ADDRS[0]}" ]]; then + echo "dpdk_num_desc=4096" >> $file_path + fi + echo "" >> $file_path + done +} + +if [[ "$GEN_CONF" == "YES" ]]; then + log "" + log "GENERATING UHD.CONF TEMPLATE FILE" + generate_uhd_conf +fi + +function overwrite_uhd_conf() { + current_dir=`pwd` + template_file_path=$current_dir/uhd.conf + target_file_path=/etc/uhd/ + log "copying $template_file_path to $target_file_path" + if [[ ! -e $target_file_path ]]; then + mkdir $target_file_path + fi + cp $template_file_path $target_file_path +} + +if [[ "$FORCE_OVERWRITE_CONF" == "YES" ]]; then + log "" + log "OVERWRITING SYSTEM UHD.CONF FILE" + overwrite_uhd_conf +fi + +function print_config() { + echo "" + echo "CURRENT SYSTEM CONFIG" + echo "----------------------------------------------------------------------" + sysctl net.core.rmem_default + sysctl net.core.wmem_default + sysctl net.core.rmem_max + sysctl net.core.wmem_max + for ((i=0;i<$(nproc);i++)); do + echo "analyzing cpu $i:" + cpufreq-info -c $i -p + done + if [[ "$USE_DPDK" == "NO" ]]; then + for iface in "${ETH_100_GIGS[@]}"; do + ifconfig $iface + ethtool -g $iface + done + else + echo "network devices using DPDK-compatible driver:" + dpdk-devbind -s | grep 'drv=vfio-pci' + fi +} + +if [[ "$STATS" == "YES" ]]; then + print_config +fi diff --git a/host/tests/streaming_performance/setup.sh b/host/tests/streaming_performance/setup10gbe.sh index 1d3301e9c..1d3301e9c 100755 --- a/host/tests/streaming_performance/setup.sh +++ b/host/tests/streaming_performance/setup10gbe.sh |