Skip to content

[Test: drop counters] Added 1-st milestone of drop counters test cases#1224

Merged
lguohan merged 2 commits intosonic-net:masterfrom
yvolynets-mlnx:test_discards_pr
Nov 23, 2019
Merged

[Test: drop counters] Added 1-st milestone of drop counters test cases#1224
lguohan merged 2 commits intosonic-net:masterfrom
yvolynets-mlnx:test_discards_pr

Conversation

@yvolynets-mlnx
Copy link
Copy Markdown
Contributor

@yvolynets-mlnx yvolynets-mlnx commented Nov 21, 2019

Signed-off-by: Yuriy Volynets yuriyv@mellanox.com

Description of PR

Summary:
Developed first milestone of test cases to verify drop counters triggers on receiving specific packets by DUT.
Test cases covered in the first milestone:

  • SMAC and DMAC are equal
  • DST IP is loopback address
  • SRC IP is loopback address
  • DST IP address is not specified

Type of change

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

Approach

How did you do it?

Developed two modules:

tests/drop_counters/combined_drop_counters.yml
tests/drop_counters/test_drop_counters.py

tests/drop_counters/combined_drop_counters.yml - defines regular expression to match platform name which has combined/linked drop counters calculation for L2 and L3 packet discards.
tests/drop_counters/test_drop_counters.py - test suite with defined pytest fixtures and test cases

How did you verify/test it?

Tested on the local setup.

Any platform specific information?

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

t0, t1, t1-lag

Documentation

sonic-net/SONiC#514

Signed-off-by: Yuriy Volynets <yuriyv@mellanox.com>
@pytest.fixture(autouse=True, scope="module")
def enable_counters(duthost):
""" Fixture which enables RIF and L2 counters """
cmd_list = ["intfstat -D", "counterpoll port enable", "counterpoll rif enable", "sonic-clear counters",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RIF counters can be unavailable on some platforms, what will happen in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like there is no possibility to check whether RIF counters are available via CLI.
This improvement can be planned/added for the second milestone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

admin@r-boxer-sw01:~$ counterpoll show
Type        Interval (in ms)    Status
----------  ------------------  --------
QUEUE_STAT  default (10000)     enable
PORT_STAT   default (1000)      enable

Signed-off-by: Yuriy Volynets <yuriyv@mellanox.com>
@yvolynets-mlnx yvolynets-mlnx marked this pull request as ready for review November 22, 2019 16:34
@lguohan lguohan merged commit 51e075d into sonic-net:master Nov 23, 2019
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
c0df6355deb8bc3685395f727983a5e9f3b06f61 (HEAD -> 201911, origin/201911) Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (sonic-net#1224) (sonic-net#1237)
d683bb48604220942b9f6bdea90c0ea4ff4f72ef [CLI][show][platform] Added ASIC count in the output. (sonic-net#1185) (sonic-net#1227)
4585be10aa8e761ce1091ac4a20e562c2550970c [show] Fix 'show int neigh expected' (sonic-net#1189)
29e4469d5e6c5058fe20c1ce71790f69b7193e7e [201911][fwutil]: Use logger from sonic-py-common (sonic-net#1190)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…tically (sonic-net#16291)

#### Why I did it
src/sonic-sairedis
```
* 2ebbd48 - (HEAD -> 202211, origin/202211) [syncd] Add pre match logic for acl entry (sonic-net#1240) (11 hours ago) [Kamil Cudnik]
* 1db8726 - Use SAI_STATUS_ITEM_NOT_FOUND when key not found (sonic-net#1224) (11 hours ago) [Lawrence Lee]
* 9e4071b - [CI]: Fix collect log error in azp template. (sonic-net#1282) (4 days ago) [Nazarii Hnydyn]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

3 participants