Closed jbemmel closed 2 weeks ago
You're saying that the wire value of STP port priority is 4 bits, but then claim that you will get 4 bits of you divide 240 by 4. There's something wrong with this math.
As we try to stay away from vendor-specific hacks, the STP port priority should be 0..15 (4 bits) and the device templates should do whatever needs to be done (multiply by 16, not 4).
BTW, Arista EOS got the math right:
s1(config-if-Et1)#spanning-tree port-priority ?
<0-240> Port priority in increments of 16
The STP module currently multiplies the configured value by 4 for some platforms, to get the same 4-bit value on the wire. However, this doesn't allow for the full range of values to get utilized, and causes the value on the wire to be different from what the user put.
Instead, platforms that currently do "* 4" should use the value provided by the user, and the Linux platforms should divide that by 4 (rather than e.g. Cumulus multiplying by 4)