On Mon, Dec 20, 2021 at 04:41:07PM -0700, Theo de Raadt wrote:
You say it twice. But my eyes still glazed over it, not seeing what was going on the first two times.

Maybe something more like

     prio 0 and 1 are mapped out of order to PCP 1 and 0, but prio 2 to
     7 are mapped directly to PCP 2 to 7.

No that still doesn't quite capture it in a visible way. How about

     prio 2 to 7 are mapped directly to PCP 2 to 7, but prio 0 and 1
     are mapped backwards, to PCP 1 and 0, because <.......>

Something which will draw the eye+brain to 'something is different here'.
The table alone doesn't do that.

I agree. How about 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.
     This is because 802.1p defines PCP 1 as lowest priority and PCP 0 as
     second lowest priority, which is meant to be used as default (“best
     effort”).


Index: vlan.4
===================================================================
RCS file: /cvs/src/share/man/man4/vlan.4,v
retrieving revision 1.51
diff -u -p -r1.51 vlan.4
--- vlan.4      4 Oct 2020 12:44:49 -0000       1.51
+++ vlan.4      30 Dec 2021 20:00:38 -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. This is because
+802.1p defines PCP 1 as lowest priority and PCP 0 as second lowest
+priority, which is meant to be used as default
+.Pq Dq best effort .
 .Pp
 .Nm vlan
 and

Reply via email to