lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 28 Apr 2019 21:45:51 +0300
From:   Vladimir Oltean <>
Cc:, Vladimir Oltean <>
Subject: [PATCH net-next 10/13] net: dsa: Skip calling .port_vlan_filtering on no change

Even if VLAN filtering is global, DSA will call this callback once per
each port. Drivers should not have to compare the global state with the
requested change. So let DSA do it.

Signed-off-by: Vladimir Oltean <>
 net/dsa/port.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/dsa/port.c b/net/dsa/port.c
index 555fdbf0a3f4..da5922ba7d33 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -203,6 +203,9 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
 	if (!dsa_port_can_apply_vlan_filtering(dp, vlan_filtering))
 		return -EINVAL;
+	if (dsa_port_is_vlan_filtering(dp) == vlan_filtering)
+		return 0;
 	err = ds->ops->port_vlan_filtering(ds, dp->index,
 	if (err)

Powered by blists - more mailing lists