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

made test_decap to check both DSCP/TTL modes for SONiC 202012 and later #3887

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

antonptashnik
Copy link
Contributor

@antonptashnik antonptashnik commented Jul 26, 2021

Description of PR

Summary: made test_decap to check both DSCP/TTL modes for SONiC 202012 and later
Fix #3355

  • uniform mode for ttl and dscp became available for IPinIP tunnel configuration starting from 202012 so made the test to run with ttl/dscp uniform mode for OS ver 202012 and later.

Type of change

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

Back port request

  • 201911

Approach

What is the motivation for this PR?

Adapt the test to covered feature improvements

How did you do it?

Parametrized the test to run with uniform ttl/dscp mode if supported for a given OS ver

How did you verify/test it?

py.test --inventory=../ansible/lab,../ansible/veos --testbed_file=../ansible/testbed.csv --module-path=../ansible/library -v -rA --topology=any decap/test_decap.py

Any platform specific information?

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

Documentation

@antonptashnik antonptashnik requested a review from a team as a code owner July 26, 2021 11:40
@lguohan
Copy link
Contributor

lguohan commented Aug 13, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan
Copy link
Contributor

lguohan commented Aug 13, 2021

i like the idea here. however, my concern is that maybe some platform does not support uniform/uniform or pipe/pipe combination.

if you look at the original code, for 202012+, it is testing uniform/pipe combination. i suggest to keep this combination. maybe for your platform, you can test uniform/uniform and pipe/pipe combination.

@antonptashnik
Copy link
Contributor Author

@lguohan I've made changes, please review. I decided to introduce ttl/dscp CLI flags to have an ability to communicate uniform mode support to the test, so test parameters set is built based on that. Flag defaults are set to the combination you requested - dscp=uniform, ttl=pipe

@yxieca
Copy link
Collaborator

yxieca commented Aug 26, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit 77117db into sonic-net:master Sep 2, 2021
@antonptashnik antonptashnik deleted the test_decap_cover_both_dscp branch September 3, 2021 14:55

# The hostvars dict has definitions defined in ansible/group_vars/sonic/variables
hostvars = duthosts[0].host.options["variable_manager"]._hostvars[duthosts[0].hostname]
sonic_hwsku = duthosts[0].sonichost.facts["hwsku"]
mellanox_hwskus = hostvars.get("mellanox_hwskus", [])

if sonic_hwsku in mellanox_hwskus:
dscp_mode = "uniform"
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks mellanox skus. MLNX supports "uniform" on all image versions

vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…er (sonic-net#3887)

Description of PR
Summary: made test_decap to check both DSCP/TTL modes for SONiC 202012 and later
Fix sonic-net#3355

uniform mode for ttl and dscp became available for IPinIP tunnel configuration starting from 202012 so made the test to run with ttl/dscp uniform mode for OS ver 202012 and later.

Approach
What is the motivation for this PR?
Adapt the test to covered feature improvements

How did you do it?
Parametrized the test to run with uniform ttl/dscp mode if supported for a given OS ver

How did you verify/test it?
py.test --inventory=../ansible/lab,../ansible/veos --testbed_file=../ansible/testbed.csv --module-path=../ansible/library -v -rA --topology=any decap/test_decap.py
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.

[IPinIP decap] Test to verify DSCP pipe mode
4 participants