mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-09-02 15:02:51 +08:00
stp: correct what the blocking state does
A blocked port does pass a received BPDU up to the CPU. The evidence is in logicog's capture of a looped pair: the port the loop check had already blocked kept reporting a BPDU age of zero seconds across dumps taken more than a forward delay apart, and that counter is only cleared in stp_in(). That is also what makes the loop latch work, since the port that stays forwarding has to go on hearing the blocked one. The tag flag comment said the source address is not learned on the egress port. doc/CpuPort.md defines it as not learning the source address from the frame at all, which is the narrower claim to make. The dangling heading above it described a field that is documented there too.
This commit is contained in:
+1
-2
@@ -72,9 +72,8 @@ struct vlan_tag {
|
||||
#define RTL_FRAME_TAG_ID 0x8899
|
||||
#define RTL_FRAME_TAG_VERSION 0x04
|
||||
/* Bits of the tag's `flags` word, see doc/CpuPort.md. */
|
||||
#define RTL_TAG_LEARN_DIS 0x0020 /* do not learn the CPU's SA on the egress port */
|
||||
#define RTL_TAG_LEARN_DIS 0x0020 /* do not learn the source address from this frame */
|
||||
#define RTL_TAG_KEEP 0x0080 /* keep the frame's 802.1Q tag format as injected */
|
||||
/* The `pmask` word, see doc/CpuPort.md. */
|
||||
|
||||
// For TX, an 8 byte (plus 4 byte padding when when VLAN is enabled)
|
||||
// header describing the frame to be moved to the Asic is used
|
||||
|
||||
Reference in New Issue
Block a user