From: Peter Hessler Subject: Re: update ieee80211_classify() for more responsive SSH To: tech@openbsd.org Date: Wed, 3 Dec 2025 17:43:30 +0100 On 2025 Dec 03 (Wed) at 16:54:33 +0100 (+0100), Stefan Sperling wrote: :Update ieee80211_classify to RFC8325, applying the recommended mapping :table from section 4.3. : :Most importantly for us, this changes the mapping of DSCP_EF from AC_BE :(best effort, lowest priority) to AC_VO (voice, highest priority). : :ssh uses DSCP_EF ssh to mark interactive sessions. With this patch, ssh :session over wifi remain responsive while bulk transfers are running. : :I started using this a few days ago and I don't want to go back, ever. :To really see the effect I recommend trying ssh from two systems :side-by-side, one with the patch applied and one without, while running :tcpbench or similar benchmarking tools which produce bulk traffic. : :Another change is that the values CS7 and CS6, previously known as :INTERNETCONTROL and NETCONTROL, are now mapped to lowest priority because :the RFC recommends doing so as part of its security considerations. :If I understand the RFC correctly, packets of these classes should never :legitimately originate from wifi networks. : :The RFC mentions DSCP_VA, 0x2c, which we do not define yet. :For now, I have added this value in a comment only. : :ok? : OK : :M sys/net80211/ieee80211_output.c | 15+ 9- : :1 file changed, 15 insertions(+), 9 deletions(-) : :commit - db26abeeded6dafd2ce6b3e3273cd8927e3a6470 :commit + 17ce08ff227e2db6cc049ee1b51d803bbee4f76b :blob - 1ffd981a6fe179bc9f0689caaaad2af30277b453 :blob + fc86358d2d2ddb083ad70526b94e1ec806a4ff4a :--- sys/net80211/ieee80211_output.c :+++ sys/net80211/ieee80211_output.c :@@ -452,21 +452,27 @@ ieee80211_classify(struct ieee80211com *ic, struct mbu : return 0; : : /* :- * Map Differentiated Services Codepoint field (see RFC2474). :+ * Map Differentiated Services Codepoint field (see RFC8325). : * Preserves backward compatibility with IP Precedence field. : */ : switch (ds_field & 0xfc) { :- case IPTOS_PREC_PRIORITY: :+ case IPTOS_DSCP_EF: :+ /* TODO: case IPTOS_DSCP_VA: */ :+ return EDCA_AC_VO; :+ case IPTOS_DSCP_CS5: :+ case IPTOS_DSCP_AF41: :+ case IPTOS_DSCP_AF42: :+ case IPTOS_DSCP_AF43: :+ case IPTOS_DSCP_CS4: :+ case IPTOS_DSCP_AF31: :+ case IPTOS_DSCP_AF32: :+ case IPTOS_DSCP_AF33: :+ case IPTOS_DSCP_CS3: : return EDCA_AC_VI; :- case IPTOS_PREC_IMMEDIATE: :+ case IPTOS_DSCP_CS1: : return EDCA_AC_BK; :- case IPTOS_PREC_FLASH: :- case IPTOS_PREC_FLASHOVERRIDE: :- case IPTOS_PREC_CRITIC_ECP: :- case IPTOS_PREC_INTERNETCONTROL: :- case IPTOS_PREC_NETCONTROL: :- return EDCA_AC_VO; : default: :+ /* unused, or explicitly mapped to UP 0 */ : return EDCA_AC_BE; : } : } : -- A man wrapped up in himself makes a very small package.