Skip to content

Commit

Permalink
T2-snappi: Split udp stream to 6 ports for lossy, but only one for lo…
Browse files Browse the repository at this point in the history
…ssless. (#15698)

Description of PR
Summary:
The test: test_pfc_pause_single_lossy_prio is resulting in flaky results. On inspecting the failed state, we find that the cisco-8000 backplane load-balancing is the cause for flakiness. It needs six streams to have higher chance of traffic being equally distributed in the backplane, and the traffic can be sent without being dropped.

Approach
What is the motivation for this PR?
Flakiness of test_pfc_pause_single_lossy_prio test.

How did you do it?
Changed to 6 udp streams for lossy traffic.

co-authorized by: jianquanye@microsoft.com
  • Loading branch information
rraghav-cisco authored and mssonicbld committed Nov 27, 2024
1 parent f4f5c8e commit 0fb42fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/snappi_tests/multidut/pfc/files/multidut_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def run_pfc_test(api,
bg_prio_list,
prio_dscp_map,
test_traffic_pause,
test_flow_is_lossless=True,
snappi_extra_params=None):
"""
Run a multidut PFC test
Expand Down Expand Up @@ -195,10 +196,16 @@ def run_pfc_test(api,
snappi_extra_params.traffic_flow_config.pause_flow_config["flow_traffic_type"] = \
traffic_flow_mode.FIXED_DURATION

no_of_streams = 1
if egress_duthost.fatcs['asic_type'] == "cisco-8000":
if not test_flow_is_lossless:
no_of_streams = 6

# Generate test flow config
generate_test_flows(testbed_config=testbed_config,
test_flow_prio_list=test_prio_list,
prio_dscp_map=prio_dscp_map,
number_of_streams=no_of_streams,
snappi_extra_params=snappi_extra_params)

if snappi_extra_params.gen_background_traffic:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_pfc_pause_single_lossy_prio(snappi_api, # noqa: F811
bg_prio_list=bg_prio_list,
prio_dscp_map=prio_dscp_map,
test_traffic_pause=False,
test_flow_is_lossless=False,
snappi_extra_params=snappi_extra_params)


Expand Down Expand Up @@ -127,6 +128,7 @@ def test_pfc_pause_multi_lossy_prio(snappi_api, # noqa: F811
bg_prio_list=bg_prio_list,
prio_dscp_map=prio_dscp_map,
test_traffic_pause=False,
test_flow_is_lossless=False,
snappi_extra_params=snappi_extra_params)


Expand Down Expand Up @@ -187,6 +189,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811
bg_prio_list=bg_prio_list,
prio_dscp_map=prio_dscp_map,
test_traffic_pause=False,
test_flow_is_lossless=False,
snappi_extra_params=snappi_extra_params)


Expand Down Expand Up @@ -242,4 +245,5 @@ def test_pfc_pause_multi_lossy_prio_reboot(snappi_api, # noqa: F811
bg_prio_list=bg_prio_list,
prio_dscp_map=prio_dscp_map,
test_traffic_pause=False,
test_flow_is_lossless=False,
snappi_extra_params=snappi_extra_params)

0 comments on commit 0fb42fe

Please sign in to comment.