mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 11:08:06 +04:00
realtek: eth: rtl838x: ignore STP state on CPU transmit
The switch applies the egress spanning-tree port state to frames the CPU sends to a port, so a port that is not forwarding drops them: kernel STP cannot announce a designated port during the forward delay, user-space RSTP cannot send proposals from a discarding port, and LLDP stays silent on blocked ports. Set BP_FLTR2 in the TX CPU tag. It bypasses the egress spanning-tree port state and egress VLAN filtering, as IGNORE_STP does when transmitting on RTL93xx. Skipping the VLAN filter does not widen where frames go: the CPU names each frame's single destination port (AS_DPM). Signed-off-by: Paul Tobias <openwrt-commits@tobias.pt> Link: https://github.com/openwrt/openwrt/pull/25442 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
1 parent
061397968d
commit
248601f492
2 files changed
+6
-1
No files matched your search
@@ -32,7 +32,8 @@
|
||||
static void rteth_838x_create_tx_header(struct rteth_frag *frag, unsigned int port, int prio)
|
||||
{
|
||||
/* cpu_tag[0] is reserved on the RTL83XX SoCs */
|
||||
frag->cpu_tag[1] = 0x0400; /* BIT 10: RTL8380_CPU_TAG */
|
||||
frag->cpu_tag[1] = FIELD_PREP(RTETH_838X_TAG1_PROTO_MASK, RTETH_838X_TAG1_PROTO) |
|
||||
RTETH_838X_TAG1_BP_FLTR2;
|
||||
frag->cpu_tag[2] = 0x0200; /* Set only AS_DPM, to enable DPM settings below */
|
||||
frag->cpu_tag[3] = 0x0000;
|
||||
frag->cpu_tag[4] = BIT(port) >> 16;
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#define RTETH_838X_QM_PKT2CPU_INTPRI_CNT 3
|
||||
#define RTETH_838X_RMA_CTRL_0 (0x4300)
|
||||
#define RTETH_838X_RMA_CTRL_1 (0x4304)
|
||||
#define RTETH_838X_TAG1_PROTO_MASK GENMASK(15, 8)
|
||||
#define RTETH_838X_TAG1_PROTO 0x04
|
||||
/* TX CPU tag: bypass the egress spanning-tree port state and egress VLAN filtering */
|
||||
#define RTETH_838X_TAG1_BP_FLTR2 BIT(4)
|
||||
|
||||
#define RTETH_839X_CPU_PORT 52
|
||||
#define RTETH_839X_DMA_IF_CTRL (0x786c)
|
||||
|
||||
Reference in new issue
Block a user