Page MenuHomeFreeBSD

ip_ecn: don't touch the DSCP bits and flow_id
Needs ReviewPublic

Authored by p.mousavizadeh_protonmail.com on Nov 13 2025, 5:54 PM.
Tags
None
Referenced Files
F141775156: D53742.diff
Sat, Jan 10, 5:28 AM
Unknown Object (File)
Tue, Dec 23, 8:15 AM
Unknown Object (File)
Sun, Dec 21, 9:16 AM
Unknown Object (File)
Wed, Dec 17, 9:14 PM
Unknown Object (File)
Tue, Dec 16, 4:22 PM
Unknown Object (File)
Mon, Dec 15, 11:31 AM
Unknown Object (File)
Sat, Dec 13, 12:58 PM
Unknown Object (File)
Thu, Dec 11, 3:06 PM

Details

Reviewers
rscheff
kp
tuexen
Group Reviewers
network
transport
Summary

don't touch the DSCP bits
in ip_ecn_ingress, ip6_ecn_ingress and ip6_ecn_egress
except for NO_CARE for backward compatibility.
raised in D53516

Test Plan

ipsec, gif and stf should be tested.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68615
Build 65498: arc lint + arc unit

Event Timeline

sys/netinet/ip_ecn.c
133–135

@rscheff
I think the NOCARE is redundant. I copied the inner bits to the outer for ECN_NOCARE mode to preserve ipv4 previous behaviour, but I couldn't preserve backward compatibility for ipv6 without extra complexity due to ECN bit masking in ipv6 wrapper.
I handled IPv4 this way because I thought those who use this mode probably don't know how to handle DSCP and ECN fields. However, I removed the copying part from ECN_FORBIDDEN and IMHO consumers must handle their DSCP bits differently.

IMHO it's better to remove ECN_NOCARE mode, because net developers must decide if they want to support ECN for their module or not.

p.mousavizadeh_protonmail.com retitled this revision from ip_ecn: don't touch the DSCP bits to ip_ecn: don't touch the DSCP bits and flow_id.Nov 27 2025, 3:23 PM