Skip to content

[Cisco] Fix FBOSS mirror DSCP encoding - #1537

Open
peterpiao27 wants to merge 1 commit into
facebook:mainfrom
peterpiao27:ppiao/sflow
Open

[Cisco] Fix FBOSS mirror DSCP encoding#1537
peterpiao27 wants to merge 1 commit into
facebook:mainfrom
peterpiao27:ppiao/sflow

Conversation

@peterpiao27

@peterpiao27 peterpiao27 commented Aug 20, 2026

Copy link
Copy Markdown

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run
clang-format.............................................................Passed
shellcheck...........................................(no files to check)Skipped
shfmt................................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check json...........................................(no files to check)Skipped
check for merge conflicts................................................Passed
ruff check...........................................(no files to check)Skipped
ruff format..........................................(no files to check)Skipped
Prevent sai_impl in fboss manifest.......................................Passed

Summary

FBOSS passed the configured 6-bit mirror DSCP directly to the SAI 8-bit TOS attribute. This caused DSCP 42 to produce an on-wire DSCP of 10.

Convert DSCP to TOS using DSCP << 2 for sFlow and ERSPAN mirror sessions, and update the associated mirror verification tests.

Test Plan

  • Built fboss-forwarding-stack successfully.
  • Deployed the updated HW agent on fboss dut.
  • Verified through the SAI replay log that configured DSCP 42 programs TOS 168 (0xA8).
  • Verified the dut sFlow mirror is active and resolved.
  • Verified in Ixia packets capture that exported sFlow packets have Traffic Class 0xA8, corresponding to DSCP 42 and ECN 0.

Description:
- The HW agent passed the 6-bit DSCP directly to the SAI 8-bit TOS field, causing incorrect packet DSCP.

Solution:
- Convert DSCP to TOS using DSCP << 2 for sFlow and ERSPAN mirrors.
- Update mirror verification tests.

Test Status:
- Passed fboss-forwarding-stack build.
- SAI replay verified TOS 168 for configured DSCP 42.
- sFlow mirror is active.
- sFlow packet DSCP is correct.
@meta-cla meta-cla Bot added the CLA Signed label Aug 20, 2026
@peterpiao27 peterpiao27 changed the title Summary: <Fix FBOSS mirror DSCP encoding> [Cisco] Fix FBOSS mirror DSCP encoding Aug 20, 2026
@github-actions github-actions Bot added the cisco label Aug 20, 2026
@peterpiao27
peterpiao27 marked this pull request as ready for review August 20, 2026 07:26
@peterpiao27
peterpiao27 requested a review from a team as a code owner August 20, 2026 07:26
@peterpiao27 peterpiao27 reopened this Aug 20, 2026
@peterpiao27 peterpiao27 reopened this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant