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

Update the fib test to support DualToR #2740

Merged
merged 2 commits into from
Feb 7, 2021
Merged

Update the fib test to support DualToR #2740

merged 2 commits into from
Feb 7, 2021

Conversation

wangxin
Copy link
Collaborator

@wangxin wangxin commented Jan 6, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Update the FIB test to support the DualToR topology.

How did you do it?

Changes:

  • Improve the testbed.py to include more DUT to PTF port mapping information
  • Run the basic FIB and FIB hash test on all DUTs.
  • In the fib_test.py and hash_test.py PTF scripts, replace hard coded source ports with information passed from argument.
  • In test scripts calling ptf_running, build a map ptf_test_port_map and dump it to ptfhost. Then pass the file location to PTF script as argument of ptf_runner. Keys of the map is enabled PTF port index (T0 topologies have disabled ports). Value is a diction with two keys: target_dut and target_mac. target_dut is index of the mux active side DUT in case of dualtor. For non-dualtor, the target_dut is always 0. target_mac is MAC address of the active side DUT. In case of dualtor, specifically it is the VLAN interface's MAC address if the PTF port is connected to VLAN port of DUT. Otherwise, it is just the router MAC.
  • Previously, balancing test is executed based on the probability that a random number between 0 and 1 is smaller than 0.0001. The new approach is to always run balancing test once for a random IP range.
  • A FIB info file is generated for each DUT and dumped to PTF container. Path of the FIB info files are passed to PTF scripts in a list.
  • Increase wait time between packets sending from 0.01 to 0.02 second to avoid BGP flapping.
  • Updated the test_bgp_speaker.py script to call the new fib_test.py PTF script accordingly.
  • Added fixtures to toggle active side of all mux to same side.
  • In test_bgp_speaker.py script, always toggle active side of all mux to the currently selected DUT (by the rand_one_hostname fixture).
  • In test_bgp_speaker.py script, removed calling of collect_techsupport. The reason is that the collect_techsupport fixture depends on the 'enum_dut_hostname` fixture. As a result, all test cases in this script will be parameterized by all the available DUTs.
  • Improve logging in PTF scripts.

How did you verify/test it?

Test run the script on t0, t1-lag, dualtor topology.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@wangxin wangxin requested a review from a team January 6, 2021 08:14
@lgtm-com
Copy link

lgtm-com bot commented Jan 6, 2021

This pull request introduces 4 alerts and fixes 2 when merging 55b1d6acd7bd121100f7220dba75ed27a267262a into 985eec2 - view on LGTM.com

new alerts:

  • 2 for Result of integer division may be truncated
  • 1 for Unused import
  • 1 for Variable defined multiple times

fixed alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Jan 7, 2021

This pull request introduces 2 alerts and fixes 2 when merging 7be5f75ddc31defdd5d5e0b945e36d5542b02203 into 077f148 - view on LGTM.com

new alerts:

  • 2 for Result of integer division may be truncated

fixed alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Feb 5, 2021

This pull request introduces 4 alerts and fixes 2 when merging 82701f5 into 182b6d3 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 2 for Result of integer division may be truncated

fixed alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Feb 5, 2021

This pull request fixes 2 alerts when merging dbe3d12 into 182b6d3 - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@@ -11,6 +11,9 @@

logger = logging.getLogger(__name__)

UPPER_TOR = 'upper_tor'
LOWER_TOR = 'lower_tor'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking this PR.

can we define these at a shared place? (next file also have them defined).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'll address this in separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants