Skip to content

Commit

Permalink
Changed flow percent to 50
Browse files Browse the repository at this point in the history
renamed the function and file name
  • Loading branch information
sreejithsreekumaran committed Dec 20, 2024
1 parent 126430e commit 10f0e34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions tests/snappi_tests/multidut/ecn/files/multidut_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def run_ecn_marking_test(api,
verify_ecn_counters_for_flow_percent(ecn_counters, test_flow_percent)


def run_xoff_variance_ecn_marking_test(
def run_ecn_marking_with_pfc_quanta_variance(
api,
testbed_config,
port_config_list,
Expand Down Expand Up @@ -678,7 +678,7 @@ def run_xoff_variance_ecn_marking_test(
snappi_extra_params.traffic_flow_config.data_flow_config = {
"flow_name": DATA_FLOW_NAME,
"flow_dur_sec": DATA_FLOW_DURATION_SEC,
"flow_rate_percent": 99.98,
"flow_rate_percent": 50,
"flow_rate_pps": None,
"flow_rate_bps": None,
"flow_pkt_size": DATA_FLOW_PKT_SIZE,
Expand All @@ -697,7 +697,7 @@ def run_xoff_variance_ecn_marking_test(

PAUSE_FLOW_NAME = "Pause flow"
PAUSE_FLOW_PKT_COUNT = 1
PAUSE_FLOW_DELAY_SEC = 2
PAUSE_FLOW_DELAY_SEC = 1

if snappi_extra_params.traffic_flow_config.pause_flow_config is None:
snappi_extra_params.traffic_flow_config.pause_flow_config = {
Expand All @@ -722,6 +722,8 @@ def run_xoff_variance_ecn_marking_test(
# The last value is exactly `end_quanta`
pause_quanta_list.append(end_quanta)

logging.info("PFC quanta list: {}".format(pause_quanta_list))

_ = get_npu_voq_queue_counters(duthost, dut_port, test_prio_list[0], True)
results = []
for quanta in pause_quanta_list:
Expand All @@ -743,9 +745,6 @@ def run_xoff_variance_ecn_marking_test(
all_flow_names = [flow.name for flow in flows]
data_flow_names = [flow.name for flow in flows if PAUSE_FLOW_NAME not in flow.name]

# Clear PFC counters before traffic run
duthost.command("sonic-clear pfccounters")

""" Run traffic """
_tgen_flow_stats, _switch_flow_stats, _in_flight_flow_metrics = run_traffic(
duthost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, \
lossless_prio_list, disable_pfcwd # noqa F401
from tests.snappi_tests.files.helper import multidut_port_info, setup_ports_and_dut # noqa: F401
from tests.snappi_tests.multidut.ecn.files.multidut_helper import run_xoff_variance_ecn_marking_test
from tests.snappi_tests.multidut.ecn.files.multidut_helper import run_ecn_marking_with_pfc_quanta_variance
from tests.common.snappi_tests.snappi_test_params import SnappiTestParams
logger = logging.getLogger(__name__)
pytestmark = [pytest.mark.topology('multidut-tgen', 'tgen')]
Expand All @@ -21,7 +21,7 @@ def number_of_tx_rx_ports():
yield (1, 1)


def test_xoff_variables_ecn_marking(
def test_ecn_marking_with_pfc_quanta_variance(
snappi_api, # noqa: F811
conn_graph_facts, # noqa: F811
fanout_graph_facts_multidut, # noqa: F811
Expand Down Expand Up @@ -57,7 +57,7 @@ def test_xoff_variables_ecn_marking(
snappi_extra_params.multi_dut_params.multi_dut_ports = snappi_ports

try:
run_xoff_variance_ecn_marking_test(
run_ecn_marking_with_pfc_quanta_variance(
api=snappi_api,
testbed_config=testbed_config,
port_config_list=port_config_list,
Expand Down

0 comments on commit 10f0e34

Please sign in to comment.