Skip to content

Verify BFD traffic egress queue and default ToS#10048

Merged
prabhataravind merged 4 commits intosonic-net:masterfrom
kperumalbfn:kperumal/bfd_q7
Sep 18, 2023
Merged

Verify BFD traffic egress queue and default ToS#10048
prabhataravind merged 4 commits intosonic-net:masterfrom
kperumalbfn:kperumal/bfd_q7

Conversation

@kperumalbfn
Copy link
Collaborator

@kperumalbfn kperumalbfn commented Sep 15, 2023

Description of PR

Verify BFD traffic egressing out of Queue 7.
Verify BFD traffic from DUT with default ToS 192.

Summary:
Fixes # (issue)
When the BFD state is up, check queue counters to validate BFD packets using queue 7.
Modified bfd_responder to check the received packet's ToS value.

Type of change

improvement

Approach

What is the motivation for this PR?

To verify egress queue of BFD traffic and default ToS of BFD packets.

How did you do it?

Use DUT's 'show queue counter ' and check for non-zero packets in queue 7.
Check captured BFD packet's ToS value.

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/bfd/test_bfd.py:19:1: E302 expected 2 blank lines, found 1
tests/bfd/test_bfd.py:310:1: E302 expected 2 blank lines, found 1
tests/bfd/test_bfd.py:338:1: E302 expected 2 blank lines, found 1
tests/bfd/test_bfd.py:343:7: E111 indentation is not a multiple of 4
tests/bfd/test_bfd.py:344:7: E111 indentation is not a multiple of 4
tests/bfd/test_bfd.py:345:7: E111 indentation is not a multiple of 4
tests/bfd/test_bfd.py:352:1: E302 expected 2 blank lines, found 1
tests/bfd/test_bfd.py:442:80: E128 continuation line under-indented for visual indent
tests/bfd/test_bfd.py:443:80: E128 continuation line under-indented for visual indent

flake8...............................................(no files to check)Skipped
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

prabhataravind
prabhataravind previously approved these changes Sep 15, 2023
Copy link
Contributor

@prabhataravind prabhataravind left a comment

Choose a reason for hiding this comment

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

lgtm

siqbal1986
siqbal1986 previously approved these changes Sep 15, 2023
Copy link
Contributor

@siqbal1986 siqbal1986 left a comment

Choose a reason for hiding this comment

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

looks good

@kperumalbfn kperumalbfn changed the title Verify BFD traffic egress queue Verify BFD traffic egress queue and default ToS Sep 15, 2023
@prabhataravind prabhataravind merged commit 8da1d50 into sonic-net:master Sep 18, 2023
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
* BFD queue 7 test

* Fixed sanity checks

* Addressed comments

* Update bfd_responder to check BFD packet's ToS value
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…10083) (sonic-net#13672)

#### Why I did it
Cherry pick from sonic-net#10083
It is to fix the issue sonic-net#10048
When building .raw image, for instance, target/sonic-broadcom.raw, it will generate a .bin image, target/sonic-broadcom.bin, as the intermediate file. The intermediate file is a build target which may contains different dependencies with the raw one.

#### How I did it
Rename the intermediate file.
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