IPQ807x Wifi Roaming with VLANs

Not the MR33, that's for sure.

Disabling learning and turning the switch into a hub did indeed fix the issue. I added additional debugging output as I would like to figure out why entries from the switches FDB can't be removed, so when an entry is added or removed that is now logged in dmesg.

The results are interesting:

[ 1240.964141] qca8k-ipq4019 c000000.switch wan: vlans aren't supported yet for dev_uc|mc_add()
[ 1249.717324] qca8k-ipq4019 c000000.switch wan: vlans aren't supported yet for dev_uc|mc_add()
[ 1353.034703] qca8k-ipq4019 c000000.switch wan: vlans aren't supported yet for dev_uc|mc_add()
[ 1469.754563] qca8k-ipq4019 c000000.switch wan: vlans aren't supported yet for dev_uc|mc_add()

after doing something like this:

# bridge fdb add 11:22:33:44:55:66 dev wan self vlan 1
RTNETLINK answers: Invalid argument

Doing

# bridge fdb add 11:22:33:44:55:66 dev wan self

doesn't log anything, but I believe it should be added to the switch's FDB as I specified the self option? At this point I have seen my debug outputs during boot, but never afterwards, not even when roaming and the assisted learning should be doing it's thing....

The error you are seeing is from the kernel FDB add netlink handler itself.

BTW, I checked and the port 0 learn enable bit is cleared so it doesn't do stuff on its own.

@Ansuel any thoughts?

Also, we should move any IPQ40xx discussion to the already existing thread:

FYI here is the patch to enable macs seen on non-physical interfaces to be removed from the fdb.
This is on top of Robimako's patch
Appears to work ok with my limited testing .

`--- a/nss_dp_switchdev.c	2023-08-09 16:21:57.523385184 +1200
+++ b/nss_dp_switchdev.c	2023-08-09 16:25:50.215009916 +1200
@@ -380,23 +380,37 @@
 	return notifier_from_errno(rv);
 }
 
+static void process_kids(struct net_device *dev, void *ptr) 
+{
+	struct net_device *lower;
+	struct list_head *iter;
+
+	netdev_for_each_lower_dev(dev, lower, iter) {
+		if ( lower != NULL ) {
+			netdev_dbg(lower, "  lower physical %d \n",nss_dp_is_phy_dev(lower));
+			if ( nss_dp_is_phy_dev(lower) ) {
+				 nss_dp_switchdev_fdb_del_event(lower, ptr);
+			} else {
+				process_kids(lower,ptr);	
+			}
+		}
+	}
+}
+
 static int nss_dp_fdb_switchdev_event(struct notifier_block *nb,
 				      unsigned long event, void *ptr)
 {
 	struct net_device *dev = switchdev_notifier_info_to_dev(ptr);
 
-	/*
-	 * Handle switchdev event only for physical devices
-	 */
-	if (!nss_dp_is_phy_dev(dev)) {
-		return NOTIFY_DONE;
-	}
-
-	switch (event) {
-	case SWITCHDEV_FDB_DEL_TO_DEVICE:
-		return nss_dp_switchdev_fdb_del_event(dev, ptr);
+	if ( event == SWITCHDEV_FDB_DEL_TO_DEVICE ) {
+		if (!nss_dp_is_phy_dev(dev)) {
+		        netdev_dbg(dev, "FDB event %ld Not Physical \n", event);
+			process_kids(dev,ptr);
+			return NOTIFY_DONE; 	
+		} else {
+			return nss_dp_switchdev_fdb_del_event(dev, ptr);
+		}
 	}
-
 	return NOTIFY_DONE;
 }
`
2 Likes