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

[chassis][drop counters tests] Use NO_DROPS group for DNX platforms #5295

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

smaheshm
Copy link
Contributor

@smaheshm smaheshm commented Mar 8, 2022

Description of PR

On DNX platform use "NO_DROPS" group to verify packets are dropped, and not forwarded.
At this point DNX BRCM SAI has not implemented drop counters, which is not trivial to implement due to DNX forwarding pipeline architecture.
DNX may also not be able to support drop counters for all the scenarios listed in test cases.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Pass the drop counters test case on DNX platform

How did you do it?

Use "NO_DROPS" group to verify packets are not forwarded

How did you verify/test it?

samaddik@str-serv-acs-14:/var/sonic-mgmt/tests$ pytest -rsx drop_packets/test_drop_counters.py  --testbed=vms26-t2-7800-1 --topology="t2,any" --inventory=../ansible/str2,../ansible/veos  --testbed_file=../ansible/testbed.yaml --host-pattern=str2-7804-lc3-1  --module-path=../ansible/library  --skip_sanity
/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
============================================================================================================ test session starts ============================================================================================================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/sonic-mgmt/tests, inifile: pytest.ini
plugins: forked-1.3.0, metadata-1.11.0, xdist-1.28.0, html-1.22.1, repeat-0.9.1, ansible-2.2.2
collecting ... /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
collected 102 items

drop_packets/test_drop_counters.py ssssss.s..s..s..s...ss..sss....ssss....ssssss.s....sss....s...ss..ssssssssssssssssss.s.ssssss.s.sss.s.                                                                                             [100%]

============================================================================================================= warnings summary ==============================================================================================================
/usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538
  /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.dualtor
    self.import_plugin(import_spec)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================================================================================================== short test summary info ==========================================================================================================
SKIPPED [2] /var/sonic-mgmt/tests/drop_packets/test_drop_counters.py:266: Test case requires explicit fanout support
SKIPPED [2] /var/sonic-mgmt/tests/common/helpers/assertions.py:13: BRCM does not drop SIP class E packets
SKIPPED [3] drop_packets/drop_packets.py: SONiC can't enable loop-back filter feature
SKIPPED [3] drop_packets/drop_packets.py: Not supported on Broadcom platforms
SKIPPED [2] /var/sonic-mgmt/tests/drop_packets/drop_packets.py:400: Test case requires explicit fanout support
SKIPPED [32] /var/sonic-mgmt/tests/drop_packets/drop_packets.py:229: No vlan_members available
SKIPPED [2] /var/sonic-mgmt/tests/drop_packets/drop_packets.py:439: Test case requires explicit fanout support
SKIPPED [2] /var/sonic-mgmt/tests/common/helpers/assertions.py:13: BRCM does not drop DIP link local packets
SKIPPED [12] /var/sonic-mgmt/tests/drop_packets/drop_packets.py:853: Test case requires explicit fanout support
SKIPPED [2] /var/sonic-mgmt/tests/common/helpers/assertions.py:13: BRCM does not drop SIP link local packets
=========================================================================================== 40 passed, 62 skipped, 1 warnings in 1465.17 seconds ============================================================================================
Exception AttributeError: "'NoneType' object has no attribute 'close'" in <bound method EventDescriptor.__del__ of <ptf.ptfutils.EventDescriptor instance at 0x7f1472c04c30>> ignored
samaddik@str-serv-acs-14:/var/sonic-mgmt/tests$

Any platform specific information?

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

Documentation

@smaheshm smaheshm requested a review from a team as a code owner March 8, 2022 22:14
@smaheshm
Copy link
Contributor Author

smaheshm commented Mar 8, 2022

FYI: Added platform check for every case instead of doing it once in a common place since drop counter supported may be added in DNX platform for specific cases.

@smaheshm smaheshm requested review from arlakshm and judyjoseph March 8, 2022 22:17
@smaheshm
Copy link
Contributor Author

smaheshm commented Mar 8, 2022

Depends on sonic-net/sonic-buildimage#8542

@smaheshm smaheshm requested a review from wenyiz2021 March 9, 2022 00:24
@smaheshm smaheshm requested a review from abdosi March 16, 2022 22:38
@rlhui
Copy link

rlhui commented Apr 6, 2022

@tjchadaga - please take up this. Thanks.

@arlakshm arlakshm merged commit c91c1c3 into sonic-net:master Apr 26, 2022
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.

4 participants