diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2021-06-09 14:35:53 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-18 07:28:17 -0500 |
commit | 601423339493165d72eb6ba5d5f64cd9e3cc1a85 (patch) | |
tree | a4ad277695f4bddc90e3160f0c6b974f49a28e4d /host/tests | |
parent | 86a1c47ee1a1d1d2aa9b7904ecf5486bb3bf3eac (diff) | |
download | uhd-601423339493165d72eb6ba5d5f64cd9e3cc1a85.tar.gz uhd-601423339493165d72eb6ba5d5f64cd9e3cc1a85.tar.bz2 uhd-601423339493165d72eb6ba5d5f64cd9e3cc1a85.zip |
test: add DPDK option for max streaming rate tests
Diffstat (limited to 'host/tests')
3 files changed, 230 insertions, 82 deletions
diff --git a/host/tests/streaming_performance/run_E3xx_max_rate_tests.py b/host/tests/streaming_performance/run_E3xx_max_rate_tests.py index ce1daa109..aa37e0b33 100755 --- a/host/tests/streaming_performance/run_E3xx_max_rate_tests.py +++ b/host/tests/streaming_performance/run_E3xx_max_rate_tests.py @@ -48,9 +48,19 @@ def parse_args(): type=str, default = "", help="address of the 10 GbE interface") + parser.add_argument( + "--use_dpdk", + action='store_true', + help="enable DPDK") + parser.add_argument( + "--mgmt_addr", + type=str, + default="", + help="address of management interface. only needed for DPDK test cases" + ) args = parser.parse_args() - return args.path, args.test_type, args.addr + return args.path, args.test_type, args.addr, args.use_dpdk, args.mgmt_addr def run_test(path, params, iterations, label): """ @@ -62,15 +72,25 @@ def run_test(path, params, iterations, label): stats = batch_run_benchmark_rate.calculate_stats(results) print(batch_run_benchmark_rate.get_summary_string(stats, iterations, params)) -def run_E320_tests_for_single_10G(path, addr, iterations, duration): + +def run_E320_tests_for_single_10G( + path, addr, iterations, duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for 10 GbE """ + def base_params(rate): - return { - "args" : "addr={},master_clock_rate={}".format(addr, rate), - "duration" : duration - } + if use_dpdk == True: + return { + "args": "addr={},master_clock_rate={},use_dpdk=1,mgmt_addr={}" + .format(addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},master_clock_rate={}".format(addr, rate), + "duration": duration + } # Run RX at 61.44 Msps with one channel rate = "61.44e6" @@ -118,16 +138,25 @@ def run_E320_tests_for_single_10G(path, addr, iterations, duration): trx_params["rx_channels"] = "0,1" run_test(path, trx_params, iterations, "2xTRX @{}".format(rate)) -def run_E320_tests_for_single_10G_long_duration(path, addr, iterations, duration): + +def run_E320_tests_for_single_10G_long_duration( + path, addr, iterations, duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for 10 GbE. Only include a small subset of tests to run for a longer period. """ def base_params(rate): - return { - "args" : "addr={},master_clock_rate={}".format(addr, rate), - "duration" : duration - } + if use_dpdk == True: + return { + "args": "addr={},master_clock_rate={},use_dpdk=1,mgmt_addr={}" + .format(addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},master_clock_rate={}".format(addr, rate), + "duration": duration + } # Run TRX at 61.44 Msps with two channels rate = "61.44e6" @@ -139,12 +168,14 @@ def run_E320_tests_for_single_10G_long_duration(path, addr, iterations, duration run_test(path, trx_params, iterations, "2xTRX @{}".format(rate)) def main(): - path, test_type, addr = parse_args() + path, test_type, addr, use_dpdk, mgmt_addr = parse_args() start_time = time.time() if test_type == Test_Type_E320_XG: - run_E320_tests_for_single_10G(path, addr, 10, 30) - run_E320_tests_for_single_10G_long_duration(path, addr, 2, 600) + run_E320_tests_for_single_10G( + path, addr, 10, 30, use_dpdk, mgmt_addr) + run_E320_tests_for_single_10G_long_duration( + path, addr, 2, 600, use_dpdk, mgmt_addr) end_time = time.time() elapsed = end_time - start_time diff --git a/host/tests/streaming_performance/run_N3xx_max_rate_tests.py b/host/tests/streaming_performance/run_N3xx_max_rate_tests.py index f4b593577..0f4deeeda 100755 --- a/host/tests/streaming_performance/run_N3xx_max_rate_tests.py +++ b/host/tests/streaming_performance/run_N3xx_max_rate_tests.py @@ -61,9 +61,19 @@ def parse_args(): type=str, default = "", help="address of second 10 GbE interface") + parser.add_argument( + "--mgmt_addr", + type=str, + default="", + help="address of management interface. only needed for DPDK test cases") + parser.add_argument( + "--use_dpdk", + action='store_true', + help="enable DPDK") args = parser.parse_args() - return args.path, args.test_type, args.addr, args.second_addr + return args.path, args.test_type, args.addr, args.second_addr,\ + args.mgmt_addr, args.use_dpdk def run_test(path, params, iterations, label): """ @@ -75,15 +85,24 @@ def run_test(path, params, iterations, label): stats = batch_run_benchmark_rate.calculate_stats(results) print(batch_run_benchmark_rate.get_summary_string(stats, iterations, params)) -def run_N310_tests_for_single_10G(path, addr, iterations, duration): + +def run_N310_tests_for_single_10G( + path, addr, iterations, duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for 10 GbE """ def base_params(rate): - return { - "args" : "addr={},master_clock_rate={}".format(addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": "addr={},master_clock_rate={},use_dpdk=1,mgmt_addr={}," + .format(addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args" : "addr={},master_clock_rate={}".format(addr, rate), + "duration" : duration + } # Run RX at 153.6 Msps with one channel rate = "153.6e6" @@ -163,16 +182,25 @@ def run_N310_tests_for_single_10G(path, addr, iterations, duration): params["rx_channels"] = "0,1,2,3" run_test(path, params, iterations, "4xTRX @{}".format(rate)) -def run_N310_tests_for_single_10G_long_duration(path, addr, iterations, duration): + +def run_N310_tests_for_single_10G_long_duration( + path, addr, iterations, duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for 10 GbE. Only include a small subset of tests to run for a longer period. """ def base_params(rate): - return { - "args" : "addr={},master_clock_rate={}".format(addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": "addr={},master_clock_rate={},use_dpdk=1,mgmt_addr={}," + .format(addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},master_clock_rate={}".format(addr, rate), + "duration": duration + } rate = "153.6e6" @@ -194,15 +222,27 @@ def run_N310_tests_for_single_10G_long_duration(path, addr, iterations, duration params["rx_channels"] = "0,1,2,3" run_test(path, params, iterations, "4xTRX @{}".format(rate)) -def run_N310_tests_for_dual_10G(path, addr, second_addr, iterations, duration): + +def run_N310_tests_for_dual_10G( + path, addr, second_addr, iterations, + duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for dual 10 GbE """ def base_params(rate): - return { - "args" : "addr={},second_addr={},master_clock_rate={}".format(addr, second_addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": ("addr={},second_addr={},master_clock_rate={}," + "use_dpdk=1,mgmt_addr={}") + .format(addr, second_addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},second_addr={},master_clock_rate={}" + .format(addr, second_addr, rate), + "duration": duration + } # Run RX at 153.6 Msps with two channels rate = "153.6e6" @@ -273,16 +313,28 @@ def run_N310_tests_for_dual_10G(path, addr, second_addr, iterations, duration): params["rx_channels"] = "0,1,2,3" run_test(path, params, iterations, "4xTRX @{}".format(rate)) -def run_N310_tests_for_dual_10G_long_duration(path, addr, second_addr, iterations, duration): + +def run_N310_tests_for_dual_10G_long_duration( + path, addr, second_addr, iterations, + duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for dual 10 GbE. Only include a small subset of tests to run for a longer period. """ def base_params(rate): - return { - "args" : "addr={},second_addr={},master_clock_rate={}".format(addr, second_addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": ("addr={},second_addr={},master_clock_rate={}," + "use_dpdk=1,mgmt_addr={}") + .format(addr, second_addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},second_addr={},master_clock_rate={}" + .format(addr, second_addr, rate), + "duration": duration + } # Run TRX at 122.88 Msps with four channels rate = "122.88e6" @@ -907,15 +959,24 @@ def run_N320_tests_for_Liberio_master_next(path, iterations, duration): params["tx_channels"] = "0,1" run_test(path, params, iterations, "2xTRX @{}".format(rate)) -def run_N320_tests_for_single_10G(path, addr, iterations, duration): + +def run_N320_tests_for_single_10G( + path, addr, iterations, duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for single 10 GbE """ def base_params(rate): - return { - "args" : "addr={},master_clock_rate={}".format(addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": "addr={},master_clock_rate={},use_dpdk=1,mgmt_addr={}" + .format(addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},master_clock_rate={}".format(addr, rate), + "duration": duration + } # Run RX at 250 Msps with one channel rate = "250e6" @@ -940,15 +1001,27 @@ def run_N320_tests_for_single_10G(path, addr, iterations, duration): params["rx_channels"] = "0" run_test(path, params, iterations, "1xTRX @{}".format(rate)) -def run_N320_tests_for_dual_10G(path, addr, second_addr, iterations, duration): + +def run_N320_tests_for_dual_10G( + path, addr, second_addr, iterations, + duration, use_dpdk=False, mgmt_addr=''): """ Runs tests that are in the neighborhood of max rate for dual 10 GbE """ def base_params(rate): - return { - "args" : "addr={},second_addr={},master_clock_rate={}".format(addr, second_addr, rate), - "duration" : duration - } + if use_dpdk is True: + return { + "args": ("addr={},second_addr={},master_clock_rate={}," + "use_dpdk=1,mgmt_addr={}") + .format(addr, second_addr, rate, mgmt_addr), + "duration": duration + } + else: + return { + "args": "addr={},second_addr={},master_clock_rate={}" + .format(addr, second_addr, rate), + "duration": duration + } # Run RX at 250 Msps with two channels rate = "250e6" @@ -973,16 +1046,21 @@ def run_N320_tests_for_dual_10G(path, addr, second_addr, iterations, duration): params["rx_channels"] = "0,1" run_test(path, params, iterations, "2xTRX @{}".format(rate)) + def main(): - path, test_type, addr, second_addr = parse_args() + path, test_type, addr, second_addr, mgmt_addr, use_dpdk = parse_args() start_time = time.time() if test_type == Test_Type_N310_XG: - run_N310_tests_for_single_10G(path, addr, 10, 30) - run_N310_tests_for_dual_10G(path, addr, second_addr, 10, 30) + run_N310_tests_for_single_10G( + path, addr, 10, 30, use_dpdk, mgmt_addr) + run_N310_tests_for_dual_10G( + path, addr, second_addr, 10, 30, use_dpdk, mgmt_addr) - run_N310_tests_for_single_10G_long_duration(path, addr, 2, 600) - run_N310_tests_for_dual_10G_long_duration(path, addr, second_addr, 2, 600) + run_N310_tests_for_single_10G_long_duration( + path, addr, 2, 600, use_dpdk, mgmt_addr) + run_N310_tests_for_dual_10G_long_duration( + path, addr, second_addr, 2, 600, use_dpdk, mgmt_addr) if test_type == Test_Type_N310_Liberio: #run_N310_tests_for_Liberio_315(path, 10, 30) @@ -993,8 +1071,10 @@ def main(): run_N320_tests_for_Liberio_master_next(path, 10, 30) if test_type == Test_Type_N320_XG: - run_N320_tests_for_single_10G(path, addr, 10, 30) - run_N320_tests_for_dual_10G(path, addr, second_addr, 10, 30) + run_N320_tests_for_single_10G( + path, addr, 10, 30, use_dpdk, mgmt_addr) + run_N320_tests_for_dual_10G( + path, addr, second_addr, 10, 30, use_dpdk, mgmt_addr) end_time = time.time() elapsed = end_time - start_time diff --git a/host/tests/streaming_performance/run_X3xx_max_rate_tests.py b/host/tests/streaming_performance/run_X3xx_max_rate_tests.py index 6feebf3c7..373447212 100755 --- a/host/tests/streaming_performance/run_X3xx_max_rate_tests.py +++ b/host/tests/streaming_performance/run_X3xx_max_rate_tests.py @@ -53,9 +53,13 @@ def parse_args(): type=str, default = "", help="address of second 10 GbE interface") + parser.add_argument( + "--use_dpdk", + action='store_true', + help="enable DPDK") args = parser.parse_args() - return args.path, args.test_type, args.addr, args.second_addr + return args.path, args.test_type, args.addr, args.second_addr, args.use_dpdk def run_test(path, params, iterations, label): """ @@ -67,12 +71,18 @@ def run_test(path, params, iterations, label): stats = batch_run_benchmark_rate.calculate_stats(results) print(batch_run_benchmark_rate.get_summary_string(stats, iterations, params)) -def run_tests_for_single_10G(path, addr, iterations, duration): - base_params = { - "args" : "addr={}".format(addr), - "duration" : duration - } +def run_tests_for_single_10G(path, addr, iterations, duration, use_dpdk=False): + if use_dpdk == True: + base_params = { + "args": "addr={},use_dpdk=1".format(addr), + "duration": duration + } + else: + base_params = { + "args": "addr={}".format(addr), + "duration": duration + } rx_params = base_params.copy() # Run 200 Msps RX with one channel @@ -113,11 +123,21 @@ def run_tests_for_single_10G(path, addr, iterations, duration): trx_params["rx_channels"] = "0,1" run_test(path, trx_params, iterations, "2xTRX @100Msps") -def run_tests_for_dual_10G(path, addr, second_addr, iterations, duration): - base_params = { - "args" : "addr={},second_addr={},skip_dram=1,enable_tx_dual_eth=1".format(addr, second_addr), - "duration" : duration - } + +def run_tests_for_dual_10G(path, addr, second_addr, iterations, duration, use_dpdk=False): + if use_dpdk == True: + base_params = { + "args": ("addr={},second_addr={},skip_dram=1," + "enable_tx_dual_eth=1,use_dpdk=1") + .format(addr, second_addr), + "duration": duration + } + else: + base_params = { + "args": "addr={},second_addr={},skip_dram=1,enable_tx_dual_eth=1" + .format(addr, second_addr), + "duration": duration + } rx_params = base_params.copy() @@ -142,11 +162,19 @@ def run_tests_for_dual_10G(path, addr, second_addr, iterations, duration): trx_params["rx_channels"] = "0,1" run_test(path, trx_params, iterations, "2xTRX @200Msps") -def run_tests_for_single_10G_Twin_RX(path, addr, iterations, duration): - base_params = { - "args" : "addr={}".format(addr), - "duration" : duration - } + +def run_tests_for_single_10G_Twin_RX( + path, addr, iterations, duration, use_dpdk=False): + if use_dpdk == True: + base_params = { + "args": "addr={},use_dpdk=1".format(addr), + "duration": duration + } + else: + base_params = { + "args": "addr={}".format(addr), + "duration": duration + } rx_params = base_params.copy() @@ -160,11 +188,20 @@ def run_tests_for_single_10G_Twin_RX(path, addr, iterations, duration): rx_params["rx_channels"] = "0,1,2,3" run_test(path, rx_params, iterations, "4xRX @50 Msps") -def run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, iterations, duration): - base_params = { - "args" : "addr={},second_addr={}".format(addr, second_addr), - "duration" : duration - } + +def run_tests_for_dual_10G_Twin_RX( + path, addr, second_addr, iterations, duration, use_dpdk=False): + if use_dpdk == True: + base_params = { + "args": "addr={},second_addr={},use_dpdk=1" + .format(addr, second_addr), + "duration": duration + } + else: + base_params = { + "args": "addr={},second_addr={}".format(addr, second_addr), + "duration": duration + } rx_params = base_params.copy() @@ -175,26 +212,26 @@ def run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, iterations, duration def main(): - path, test_type, addr, second_addr = parse_args() + path, test_type, addr, second_addr, use_dpdk = parse_args() start_time = time.time() if test_type == Test_Type_X3xx_XG: # Run 10 test iterations for 60 seconds each - run_tests_for_single_10G(path, addr, 10, 60) - run_tests_for_dual_10G(path, addr, second_addr, 10, 60) + run_tests_for_single_10G(path, addr, 10, 60, use_dpdk) + run_tests_for_dual_10G(path, addr, second_addr, 10, 60, use_dpdk) # Run 2 test iterations for 600 seconds each - run_tests_for_single_10G(path, addr, 2, 600) - run_tests_for_dual_10G(path, addr, second_addr, 2, 600) + run_tests_for_single_10G(path, addr, 2, 600, use_dpdk) + run_tests_for_dual_10G(path, addr, second_addr, 2, 600, use_dpdk) if test_type == Test_Type_TwinRX_XG: # Run 10 test iterations for 60 seconds each - run_tests_for_single_10G_Twin_RX(path, addr, 10, 60) - run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, 10, 60) + run_tests_for_single_10G_Twin_RX(path, addr, 10, 60, use_dpdk) + run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, 10, 60, use_dpdk) # Run 2 test iterations for 600 seconds each - run_tests_for_single_10G_Twin_RX(path, addr, 2, 600) - run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, 2, 600) + run_tests_for_single_10G_Twin_RX(path, addr, 2, 600, use_dpdk) + run_tests_for_dual_10G_Twin_RX(path, addr, second_addr, 2, 600, use_dpdk) end_time = time.time() elapsed = end_time - start_time |