diff options
author | Steven Koo <steven.koo@ni.com> | 2022-05-25 11:39:52 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:05 -0500 |
commit | 651113ee21a1a1d7432550e6e57b0e1f4bc09744 (patch) | |
tree | 842353763468735d370d604f3190f3d4cf7eb79a | |
parent | b3ac81878bd86b19df61eada22143de8b9d286fd (diff) | |
download | uhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.tar.gz uhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.tar.bz2 uhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.zip |
ci: Add recv and send frame tuning for streaming
This adds the ability to tune the recv and send frames as a parameter.
This is useful since some rates will fail with jitter in the system
with the default settings.
Signed-off-by: Steven Koo <steven.koo@ni.com>
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests-beauty.yml | 16 | ||||
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 3 | ||||
-rw-r--r-- | host/tests/pytests/conftest.py | 11 | ||||
-rw-r--r-- | host/tests/pytests/test_streaming.py | 16 |
4 files changed, 44 insertions, 2 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml index 82d7d27c7..1a5de8381 100644 --- a/.ci/templates/job-uhd-streaming-tests-beauty.yml +++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml @@ -30,6 +30,8 @@ jobs: # dutMgmtAddr: '10.0.57.13' # dutFPGA: 'XG' # dutNameId: '' + # dutNumRecvFrames: '' + # dutNumSendFrames: '' beauty-X310-0: dutName: 'beauty-X310-0' dutType: 'X310' @@ -38,6 +40,8 @@ jobs: dutMgmtAddr: '' dutFPGA: 'XG' dutNameId: '' + dutNumRecvFrames: '' + dutNumSendFrames: '' # beauty-X410-0 X4_200: # dutName: 'beauty-X410-0' # dutType: 'x4xx' @@ -46,6 +50,8 @@ jobs: # dutMgmtAddr: '10.0.57.29' # dutFPGA:'X4_200' # dutNameId: '' + # dutNumRecvFrames: '' + # dutNumSendFrames: '' beauty-X410-0 CG_400: dutName: 'beauty-X410-0' dutType: 'x4xx' @@ -56,6 +62,8 @@ jobs: dutNameId: '' dutEmbeddedImagesArtifact: 'x4xx-images' uartSerial: '2516351E2C9A' + dutNumRecvFrames: '' + dutNumSendFrames: '' # beauty-E320-0: # dutName: 'beauty-E320-0' # dutType: 'E320' @@ -64,6 +72,8 @@ jobs: # dutMgmtAddr: '10.0.57.38' # dutFPGA: 'XG' # dutNameId: '' + # dutNumRecvFrames: '' + # dutNumSendFrames: '' # beauty-N310-0: # dutName: 'beauty-N310-0' # dutType: 'N310' @@ -72,6 +82,8 @@ jobs: # dutMgmtAddr: '10.0.57.31' # dutFPGA: 'XG' # dutNameId: '' + # dutNumRecvFrames: '' + # dutNumSendFrames: '' # beauty-X310_TwinRx-0: # dutName: 'beauty-X310_TwinRx-0' # dutType: 'X310_TwinRx' @@ -80,6 +92,8 @@ jobs: # dutMgmtAddr: '' # dutFPGA: 'XG' # dutNameId: '' + # dutNumRecvFrames: '' + # dutNumSendFrames: '' beauty-B210-0: dutName: 'beauty-B210-0' dutType: 'B210' @@ -88,4 +102,6 @@ jobs: dutMgmtAddr: '' dutFPGA: '' dutNameId: 'MyB210' + dutNumRecvFrames: '256' + dutNumSendFrames: '256' diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml index 326e7f681..24d47d59d 100644 --- a/.ci/templates/job-uhd-streaming-tests.yml +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -158,7 +158,8 @@ jobs: cd ${{ parameters.uhdSrcDir }}/host/tests/pytests python3 -B -m pytest -s test_streaming.py -m "not dpdk" --dut_type $(dutType) --test_length ${{ parameters.testLength }} \ --uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName).xml \ - --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) --name $(dutNameId) + --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) --name $(dutNameId) \ + --num_recv_frames $(dutNumRecvFrames) --num_send_frames $(dutNumSendFrames) env: UHD_CONFIG_FILE: $(config_file) PYTHONPATH: ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance diff --git a/host/tests/pytests/conftest.py b/host/tests/pytests/conftest.py index 087fd2f8a..c118aa7c5 100644 --- a/host/tests/pytests/conftest.py +++ b/host/tests/pytests/conftest.py @@ -56,7 +56,16 @@ def pytest_addoption(parser): required=True, type=str, help="") - + parser.addoption( + "--num_recv_frames", + type=str, + nargs='?', + help="configures num_recv_frames parameter") + parser.addoption( + "--num_send_frames", + type=str, + nargs='?', + help="configures num_send_frames parameter") def pytest_configure(config): # register additional markers diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py index 98554640b..beb5f7468 100644 --- a/host/tests/pytests/test_streaming.py +++ b/host/tests/pytests/test_streaming.py @@ -242,6 +242,22 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx if use_dpdk: device_args += f"use_dpdk=1,mgmt_addr={pytestconfig.getoption('mgmt_addr')}," + try: + num_recv_frames = pytestconfig.getoption('num_recv_frames') + if num_recv_frames: + device_args += f"num_recv_frames={num_recv_frames}," + except Exception: + pass + + try: + num_send_frames = pytestconfig.getoption('num_send_frames') + if num_send_frames: + device_args += f"num_send_frames={num_send_frames}," + except Exception: + pass + + print("Constructed device_args: " + device_args) + # construct benchmark_rate params dictionary benchmark_rate_params = { "args": device_args, |