sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
200 stars 732 forks source link

[decap] incorrect parametrization with "vxlan=set_unset" #6164

Open vcheketx opened 2 years ago

vcheketx commented 2 years ago

Description

PR 5834 added parametrization based on vxlan tunnel creation to decap test. Now there are 6 possible combinations on how the test is parametrized:

    ttl_uni_vxlan = {'ttl': 'uniform', 'dscp': 'pipe', 'vxlan': 'set_unset'}
    dscp_uni_vxlan = {'ttl': 'pipe', 'dscp': 'uniform', 'vxlan': 'set_unset'}
    both_pipe_vxlan = {'ttl': 'pipe', 'dscp': 'pipe', 'vxlan': 'set_unset'}
    ttl_uni = {'ttl': 'uniform', 'dscp': 'pipe', 'vxlan': 'disable'}
    dscp_uni = {'ttl': 'pipe', 'dscp': 'uniform', 'vxlan': 'disable'}
    both_pipe = {'ttl': 'pipe', 'dscp': 'pipe', 'vxlan': 'disable'}

With "vxlan=disable" test applies decap config and then sends traffic. With "vxlan=set_unset" test creates and removes vxlan tunnel but does not apply decap config. Since it uses only default decap configuration, dscp_mode always is "uniform". Test will fail when run with "{'ttl': 'pipe', 'dscp': 'pipe', 'vxlan': 'set_unset'}", since the recieved packets dscp value will always behave as in uniform.

Steps to reproduce the issue:

  1. run decap/test_decap.py

Describe the results you received:

decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=disable] [PASSED]
decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset] [PASSED]
decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=disable] [PASSED]
decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=set_unset] [FAILED]

Describe the results you expected: If we only need to check default decap configuration, parametrization for vxlan=set_unset should not include other combinations.

Additional information you deem important:

Output of show version:

SONiC Software Version: SONiC.master.127871-dirty-20220728.095752
Distribution: Debian 11.4
Kernel: 5.10.0-12-2-amd64
Build commit: 746e05210
Build date: Thu Jul 28 14:13:30 UTC 2022
Built by: AzDevOps@sonic-build-workers-001UGB

Platform: x86_64-arista_7170_64c
HwSKU: Arista-7170-64C
ASIC: barefoot
ASIC Count: 1
vcheketx commented 2 years ago

@vaibhavhd could you please take a look at this?

vcheketx commented 2 years ago

@vaibhavhd Could you please look at this?

yxieca commented 2 years ago

@prsunny please assign someone to work on this issue.

prsunny commented 2 years ago

request @vaibhavhd to take a look as the parameter was introduced by #5384. Let me discuss with Vaibhav on this.

vcheketx commented 2 years ago

@prsunny @vaibhavhd could you please provide info whether there are any updates on this?

vaibhavhd commented 2 years ago

@vcheketx , I think what you need to do is update the skip condition based on what your platform supports.

We have skip conditions defined for this test that are specific to different platforms. Please update the condition here: https://github.com/sonic-net/sonic-mgmt/blob/8b036355884c956d39b4a17f3995ff4763502c31/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml#L160