Add DSCP class-name keyword support#492
Open
yaakov-stein wants to merge 3 commits intofacebook:mainfrom
Open
Conversation
Claude review of PR #492 (f6aec14)Must fix
Suggestions
Nits
|
2433b38 to
e0408af
Compare
e0408af to
0dce646
Compare
qdeslandes
requested changes
Apr 1, 2026
8ecd117 to
262b531
Compare
Allow DSCP matchers (ip4.dscp, ip6.dscp) to accept symbolic class names (cs0-cs7, af11-af43, ef, be) in addition to numeric values. The class name table is based on iptables' dscp_helper.c and the IANA DSCP registry. Matching is case-insensitive.
Add unit tests for bf_dscp_class_to_str/bf_dscp_class_from_str conversion functions, keyword parsing in ip4_dscp and ip6_dscp matchers, and e2e tests exercising class name keywords with both valid and invalid inputs.
262b531 to
f6aec14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #383, add support for DSCP class name keywords in
ip4.dscpandip6.dscpmatchers. Instead of requiring users to memorize numeric DSCP codepoints, rules can now use standard class names:Supported keywords follow the IANA DSCP registry and match iptables conventions (see
dscp_helper.c):Keywords are case-insensitive. Numeric values (0–63, decimal or hex) continue to work as before.
Testing