Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2/Snappi: Move global definitions of test and background flow rates to be local to the function they are used. #15964

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
PAUSE_FLOW_NAME = 'Pause Storm'
WARM_UP_TRAFFIC_NAME = "Warm Up Traffic"
TEST_FLOW_NAME = 'Test Flow'
TEST_FLOW_AGGR_RATE_PERCENT = 45
BG_FLOW_NAME = 'Background Flow'
BG_FLOW_AGGR_RATE_PERCENT = 45
WARM_UP_TRAFFIC_DUR = 1
DATA_PKT_SIZE = 1024
SNAPPI_POLL_DELAY_SEC = 2
Expand Down Expand Up @@ -112,10 +110,10 @@ def run_pfcwd_multi_node_test(api,

speed_str = testbed_config.layer1[0].speed
speed_gbps = int(speed_str.split('_')[1])
TEST_FLOW_AGGR_RATE_PERCENT = 45
BG_FLOW_AGGR_RATE_PERCENT = 45
# Backplane is 200G in Cisco platforms.
if speed_gbps > 200 and cisco_platform:
global TEST_FLOW_AGGR_RATE_PERCENT
global BG_FLOW_AGGR_RATE_PERCENT
TEST_FLOW_AGGR_RATE_PERCENT = TEST_FLOW_AGGR_RATE_PERCENT * 200 / speed_gbps
BG_FLOW_AGGR_RATE_PERCENT = BG_FLOW_AGGR_RATE_PERCENT * 200 / speed_gbps

Expand Down
Loading