Index | Thread | Search

From:
Peter Hessler <phessler@theapt.org>
Subject:
now with DSCP_VA (was Re: update ieee80211_classify() for more responsive SSH)
To:
tech@openbsd.org
Date:
Wed, 3 Dec 2025 20:21:01 +0100

Download raw body.

Thread
On 2025 Dec 03 (Wed) at 16:54:33 +0100 (+0100), Stefan Sperling wrote:
:The RFC mentions DSCP_VA, 0x2c, which we do not define yet.
:For now, I have added this value in a comment only.

Here's an implementation of DSCP_VA, very lightly tested.  I verified the
value with the IANA assignment. For sort-order I did alpha sort in the
DSCP groups.

I left the wifi part alone to not conflict with your patch.

For testing, remember to "make includes" after patching.

OK?


Index: sys/netinet/ip.h
===================================================================
RCS file: /cvs/openbsd/src/sys/netinet/ip.h,v
diff -u -p -u -p -r1.20 ip.h
--- sys/netinet/ip.h	14 Dec 2021 23:47:36 -0000	1.20
+++ sys/netinet/ip.h	3 Dec 2025 16:43:53 -0000
@@ -103,6 +103,7 @@ struct ip {
 #define	IPTOS_DSCP_LE		0x04
 #define	IPTOS_DSCP_CS1		0x20
 #define	IPTOS_DSCP_AF11		0x28
+#define	IPTOS_DSCP_VA		0x2c
 #define	IPTOS_DSCP_AF12		0x30
 #define	IPTOS_DSCP_AF13		0x38
 #define	IPTOS_DSCP_CS2		0x40


Index: sbin/pfctl/parse.y
===================================================================
RCS file: /cvs/openbsd/src/sbin/pfctl/parse.y,v
diff -u -p -u -p -r1.720 parse.y
--- sbin/pfctl/parse.y	11 Nov 2025 04:06:20 -0000	1.720
+++ sbin/pfctl/parse.y	3 Dec 2025 19:05:09 -0000
@@ -6347,6 +6347,7 @@ map_tos(char *s, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },
Index: sbin/ping/ping.c
===================================================================
RCS file: /cvs/openbsd/src/sbin/ping/ping.c,v
diff -u -p -u -p -r1.249 ping.c
--- sbin/ping/ping.c	23 Apr 2024 13:34:50 -0000	1.249
+++ sbin/ping/ping.c	3 Dec 2025 19:14:55 -0000
@@ -1822,6 +1822,7 @@ map_tos(char *key, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },
Index: usr.bin/nc/netcat.c
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/nc/netcat.c,v
diff -u -p -u -p -r1.235 netcat.c
--- usr.bin/nc/netcat.c	11 Oct 2025 15:46:06 -0000	1.235
+++ usr.bin/nc/netcat.c	3 Dec 2025 19:13:27 -0000
@@ -1650,6 +1650,7 @@ process_tos_opt(char *s, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },
Index: usr.bin/ssh/misc.c
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/ssh/misc.c,v
diff -u -p -u -p -r1.209 misc.c
--- usr.bin/ssh/misc.c	6 Nov 2025 01:31:11 -0000	1.209
+++ usr.bin/ssh/misc.c	3 Dec 2025 19:03:38 -0000
@@ -1853,6 +1853,7 @@ static const struct {
 	{ "cs7", IPTOS_DSCP_CS7 },
 	{ "ef", IPTOS_DSCP_EF },
 	{ "le", IPTOS_DSCP_LE },
+	{ "va",	IPTOS_DSCP_VA },
 	{ "lowdelay", INT_MIN },	/* deprecated */
 	{ "throughput", INT_MIN },	/* deprecated */
 	{ "reliability", INT_MIN },	/* deprecated */
Index: usr.bin/tcpbench/tcpbench.c
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/tcpbench/tcpbench.c,v
diff -u -p -u -p -r1.74 tcpbench.c
--- usr.bin/tcpbench/tcpbench.c	26 Nov 2025 07:27:13 -0000	1.74
+++ usr.bin/tcpbench/tcpbench.c	3 Dec 2025 19:13:17 -0000
@@ -1023,6 +1023,7 @@ map_tos(char *s, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },
Index: usr.sbin/bgpd/parse.y
===================================================================
RCS file: /cvs/openbsd/src/usr.sbin/bgpd/parse.y,v
diff -u -p -u -p -r1.485 parse.y
--- usr.sbin/bgpd/parse.y	4 Nov 2025 10:47:25 -0000	1.485
+++ usr.sbin/bgpd/parse.y	3 Dec 2025 19:05:27 -0000
@@ -5593,6 +5593,7 @@ map_tos(char *s, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },
Index: usr.sbin/traceroute/worker.c
===================================================================
RCS file: /cvs/openbsd/src/usr.sbin/traceroute/worker.c,v
diff -u -p -u -p -r1.8 worker.c
--- usr.sbin/traceroute/worker.c	3 Sep 2021 09:13:00 -0000	1.8
+++ usr.sbin/traceroute/worker.c	3 Dec 2025 19:13:08 -0000
@@ -993,6 +993,7 @@ map_tos(char *s, int *val)
 		{ "cs6",		IPTOS_DSCP_CS6 },
 		{ "cs7",		IPTOS_DSCP_CS7 },
 		{ "ef",			IPTOS_DSCP_EF },
+		{ "va",			IPTOS_DSCP_VA },
 		{ "inetcontrol",	IPTOS_PREC_INTERNETCONTROL },
 		{ "lowdelay",		IPTOS_LOWDELAY },
 		{ "netcontrol",		IPTOS_PREC_NETCONTROL },



-- 
Law of Probable Dispersal:
	Whatever it is that hits the fan will not be evenly distributed.