From: Christopher Zimmermann Subject: Re: explain priority codepoints and their mapping in vlan.4 To: tech@openbsd.org Cc: David Gwynne , Jason McIntyre Date: Sat, 25 Jan 2025 22:35:40 +0100 Hi, I'd like to resurrect this diff I proposed, but then neglected in 2021. The changed paragraph would read like this: The 802.1Q and 802.1ad protocols include a Priority Code Point (PCP). By default, the 802.1p PCP in a transmitted packet is based on the priority of packets sent over the interface, which may be altered via pf.conf(5); see the prio option for more information. Alternatively, the ifconfig(4) txprio option can set a specific priority for transmitted packets. On vlan and svlan interfaces priorities 2 to 7 will be mapped directly to PCP 2 to 7, but priorities 0 and 1 are mapped backwards, to PCP 1 and 0, respectively. This is because 802.1p defines PCP 1 as the lowest priority and PCP 0 as the second lowest priority, which is meant to be used as the default. Suggestions by Theo and Jason McIntyre have been applied. Is this ok to be committed? Christopher Index: vlan.4 =================================================================== RCS file: /cvs/src/share/man/man4/vlan.4,v retrieving revision 1.53 diff -u -p -r1.53 vlan.4 --- vlan.4 12 Sep 2022 09:15:29 -0000 1.53 +++ vlan.4 25 Jan 2025 21:23:29 -0000 @@ -83,17 +83,26 @@ interfaces by their respective protocol identifiers, and decapsulated for reception on the associated virtual interfaces. .Pp -The 802.1Q and 802.1ad protocols include a priority field. -By default, the 802.1p priority in a transmitted packet is based on the +The 802.1Q and 802.1ad protocols include a Priority Code Point (PCP). +By default, the 802.1p PCP in a transmitted packet is based on the priority of packets sent over the interface, which may be altered via .Xr pf.conf 5 ; see the .Cm prio option for more information. -Alternatively, +Alternatively, the +.Xr ifconfig 4 .Cm txprio -can set a specific priority for transmitted packets. +option can set a specific priority for transmitted packets. +On +.Nm vlan +and +.Nm svlan +interfaces priorities 2 to 7 will be mapped directly to PCP 2 to 7, but +priorities 0 and 1 are mapped backwards, to PCP 1 and 0, respectively. +This is because 802.1p defines PCP 1 as the lowest priority and PCP 0 as the +second lowest priority, which is meant to be used as the default. .Pp .Nm vlan and