Skip to content

send dscp with ecn through a traffic_class feature - #17

Merged
aotodev merged 1 commit into
masterfrom
5-attaching-ecn-on-send-erases-the-sockets-dscp
Sep 30, 2026
Merged

aotodev merged 1 commit into
masterfrom
5-attaching-ecn-on-send-erases-the-sockets-dscp

Conversation

@aotodev

@aotodev aotodev commented Sep 30, 2026

Copy link
Copy Markdown
Owner

The kernel takes a per-datagram IP_TOS / IPV6_TCLASS as the whole
traffic-class byte. ecn::build wrote only the ECN bits, so every
ECN-marked datagram went out with DSCP zero, overriding any DSCP the
socket had been given.

Add traffic_class, which carries a marking of DSCP and ECN in both
directions, and a dscp enum naming the standard classes. ecn stays for
receive but is no longer sendable, so ECN cannot be marked without
stating the DSCP. Both features share one tos_message for the width
handling, building and enabling.

Breaking: set no longer compiles. Use
set<traffic_class>({.ecn = x}), with a dscp field when one is wanted.

@aotodev aotodev self-assigned this Sep 30, 2026
@aotodev
aotodev merged commit 53576c1 into master Sep 30, 2026
7 checks passed
@aotodev
aotodev deleted the 5-attaching-ecn-on-send-erases-the-sockets-dscp branch September 30, 2026 12:36
@aotodev aotodev linked an issue Sep 30, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attaching ECN on send erases the socket's DSCP

1 participant