frr icon indicating copy to clipboard operation
frr copied to clipboard

zebra: changes to include ecn bits in tos value

Open raja-rajasekar opened this issue 2 months ago • 3 comments

while creating ip rule in kernel

Issue - pbr rules created with ecn match conditions
are not synced to kernel, since tos value at the time of
ip rule creation has only dscp bits.

WITHOUT FIX (Bug)

FRR Configuration Shows:
r1# show pbr map ASAKUSA
  pbr-map ASAKUSA valid: yes
    Seq: 25 rule: 324
        Installed: yes Reason: Valid
        DST IP Match: dead:beef::/64
        DSCP Match: 10      ← DSCP configured
        ECN Match: 1        ← ECN configured
        nexthop c0ff:ee::1
          Installed: yes Tableid: 10008

Kernel Rule Shows:
r1# ip -6 rule show | grep 324
324: from all to dead:beef::/64 tos 0x28 iif r1-eth4 lookup 10008
     ^^^ DSCP only (10 << 2 = 0x28), ECN bit MISSING! 

WITH FIX

r1# show pbr map ASAKUSA
  pbr-map ASAKUSA valid: yes
    Seq: 25 rule: 324
        Installed: yes Reason: Valid
        DST IP Match: dead:beef::/64
        DSCP Match: 10      ← DSCP configured
        ECN Match: 1        ← ECN configured
        nexthop c0ff:ee::1
          Installed: yes Tableid: 10008

r1# ip -6 rule show | grep 324
324: from all to dead:beef::/64 tos 0x29 iif r1-eth4 lookup 10008
     ^^^ DSCP + ECN combined (0x28 | 0x01 = 0x29) ✓

raja-rajasekar avatar Dec 03 '25 09:12 raja-rajasekar

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Dec 03 '25 09:12 github-actions[bot]

Rajasekar - Looks like a pbr test needs to be looked at as to why it is now failing

donaldsharp avatar Dec 03 '25 14:12 donaldsharp

  • github-ci / Ubuntu 24.04 arm64 Test (pull_request)

Weird, it passed in my local ubuntu always.. not sure if kernel version is different in my ubuntu and in the RUN_CI machine. A quick cursor analysis,

Kernel is rejecting the ECN rules in CI! This must be a kernel version issue - older kernels may not support ECN bits in the TOS field for IP rules.

two options: Skip ECN tests on older kernels - check kernel version in test Remove ECN tests from CI - only test locally

let me know

raja-rajasekar avatar Dec 03 '25 22:12 raja-rajasekar