Commit b7ade35e authored by Kurt Kanzenbach's avatar Kurt Kanzenbach Committed by Jakub Kicinski

net: dsa: hellcreek: Add STP forwarding rule

Treat STP as management traffic. STP traffic is designated for the CPU port
only. In addition, STP traffic has to pass blocked ports.

Fixes: e4b27ebc ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches")
Signed-off-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4db4c3ea
...@@ -1075,6 +1075,17 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek) ...@@ -1075,6 +1075,17 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek)
.reprio_tc = 6, /* TC: 6 as per IEEE 802.1AS */ .reprio_tc = 6, /* TC: 6 as per IEEE 802.1AS */
.reprio_en = 1, .reprio_en = 1,
}; };
static struct hellcreek_fdb_entry stp = {
/* MAC: 01-80-C2-00-00-00 */
.mac = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 },
.portmask = 0x03, /* Management ports */
.age = 0,
.is_obt = 0,
.pass_blocked = 1,
.is_static = 1,
.reprio_tc = 6,
.reprio_en = 1,
};
int ret; int ret;
mutex_lock(&hellcreek->reg_lock); mutex_lock(&hellcreek->reg_lock);
...@@ -1082,6 +1093,9 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek) ...@@ -1082,6 +1093,9 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek)
if (ret) if (ret)
goto out; goto out;
ret = __hellcreek_fdb_add(hellcreek, &p2p); ret = __hellcreek_fdb_add(hellcreek, &p2p);
if (ret)
goto out;
ret = __hellcreek_fdb_add(hellcreek, &stp);
out: out:
mutex_unlock(&hellcreek->reg_lock); mutex_unlock(&hellcreek->reg_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment