diff --git a/doc/stp.md b/doc/stp.md index 0ccca7c..49bedd3 100644 --- a/doc/stp.md +++ b/doc/stp.md @@ -59,9 +59,10 @@ to the CPU. `stp_setup()` prints a warning for every STP-enabled port in that state. Port states live in `RTL837X_MSTP_STATES (0x5310)`, two bits per port: -`00` disabled, `01` blocking, `10` learning, `11` forwarding. In the blocking -state a port forwards nothing except frames sent by the CPU, and nothing it -receives reaches the CPU. +`00` disabled, `01` blocking, `10` learning, `11` forwarding. A port in +blocking forwards nothing between ports, but it still sends what the CPU +hands it and still passes a received BPDU up to the CPU, which is what lets +loop detection go on working on a port it has already blocked. ## Timers diff --git a/rtl837x_common.h b/rtl837x_common.h index 50bffb1..4dcadce 100644 --- a/rtl837x_common.h +++ b/rtl837x_common.h @@ -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