Thread (54 messages) 54 messages, 6 authors, 2022-07-08

Re: [PATCH V3 net-next 3/4] net: dsa: mv88e6xxx: mac-auth/MAB implementation

From: Hans S <hidden>
Date: 2022-07-06 14:23:43
Also in: bridge, linux-kselftest, lkml

quoted
quoted
@@ -919,6 +920,9 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
      if (err)
              dev_err(chip->dev,
                      "p%d: failed to force MAC link down\n", port);
+     else
+             if (mv88e6xxx_port_is_locked(chip, port, true))
+                     mv88e6xxx_atu_locked_entry_flush(ds, port);
This is superfluous, is it not? The bridge will transition a port whose
link goes down to BR_STATE_DISABLED, which will make dsa_port_set_state()
fast-age the dynamic FDB entries on the port, which you've already
handled below.
I removed this code, but then on link down the locked entries were not
cleared out. Something not as thought?
I don't see a fast ageing happening on link down. There is the two cases:
1. Soft link down

With iproute2 command the link is brought down and
mv88e6xxx_mac_link_down() is called with rtnl lock taken.

2. Hard link down

I remove the cable from the port and mv88e6xxx_mac_link_down() is
called without rtnl lock.

As the hard link down case calls without rtnl lock, either I trigger
the case you have mentioned or I have to use rtnl_is_locked()
somewhere along the line?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help