ipv4: fib_rules: Add DSCP selector support
authorIdo Schimmel <idosch@nvidia.com>
Wed, 11 Sep 2024 09:37:44 +0000 (12:37 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Sep 2024 04:15:44 +0000 (21:15 -0700)
commitb9455fef8b1fc662369d982fe97dc66e6c332699
tree0b584c8d32f888ea20f0d915f6551587078e6716
parentc951a29f6ba52b86223eb00bbcff43142d59a901
ipv4: fib_rules: Add DSCP selector support

Implement support for the new DSCP selector that allows IPv4 FIB rules
to match on the entire DSCP field, unlike the existing TOS selector that
only matches on the three lower DSCP bits.

Differentiate between both selectors by adding a new bit in the IPv4 FIB
rule structure (in an existing one byte hole) that is only set when the
'FRA_DSCP' attribute is specified by user space. Reject rules that use
both selectors.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-3-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/fib_rules.c