Skip to contentSkip to conversation

net: bridge: drop hosts limit sysfs and add a comment

PATCH Applied Nikolay Aleksandrov 3 participants 5 messages Jan 29, 2021 – Jan 30, 2021

Subsystems (3)
lore
Share & tools
lore

Nikolay Aleksandrov

author maintainer
#0 lore raw

cover net: bridge: drop hosts limit sysfs and add a comment

From: Nikolay Aleksandrov <[email protected]>

Hi,
As recently discussed[1] we should stop extending the bridge sysfs support for new options and move to using netlink only, so patch 01 drops the recently added hosts limit sysfs support which is still in net-next only and patch 02 adds comments in br_sysfs_br/if.c to warn against adding new sysfs options.

Thanks,
Nik

Nikolay Aleksandrov (2):
net: bridge: mcast: drop hosts limit sysfs support
net: bridge: add warning comments to avoid extending sysfs

 net/bridge/br_sysfs_br.c |  4 ++++
 net/bridge/br_sysfs_if.c | 30 ++++--------------------------
 2 files changed, 8 insertions(+), 26 deletions(-)
Signature · 1 line
2.29.2
author maintainer
#1 lore raw

PATCH 1/2 net: bridge: mcast: drop hosts limit sysfs support

From: Nikolay Aleksandrov <[email protected]>

We decided to stop adding new sysfs bridge options and continue with netlink only, so remove hosts limit sysfs support.

---
 net/bridge/br_sysfs_if.c | 26 --------------------------
 1 file changed, 26 deletions(-)
net/bridge/br_sysfs_if.c +0 -26
index b66305fae26b..7a59cdddd3ce 100644
@@ -16,7 +16,6 @@
 #include <linux/sched/signal.h>
 
 #include "br_private.h"
-#include "br_private_mcast_eht.h"
 
 struct brport_attribute {
 	struct attribute	attr;
@@ -246,29 +245,6 @@ static int store_multicast_router(struct net_bridge_port *p,
 static BRPORT_ATTR(multicast_router, 0644, show_multicast_router,
 		   store_multicast_router);
 
-static ssize_t show_multicast_eht_hosts_limit(struct net_bridge_port *p,
-					      char *buf)
-{
-	return sprintf(buf, "%u\n", p->multicast_eht_hosts_limit);
-}
-
-static int store_multicast_eht_hosts_limit(struct net_bridge_port *p,
-					   unsigned long v)
-{
-	return br_multicast_eht_set_hosts_limit(p, v);
-}
-static BRPORT_ATTR(multicast_eht_hosts_limit, 0644,
-		   show_multicast_eht_hosts_limit,
-		   store_multicast_eht_hosts_limit);
-
-static ssize_t show_multicast_eht_hosts_cnt(struct net_bridge_port *p,
-					    char *buf)
-{
-	return sprintf(buf, "%u\n", p->multicast_eht_hosts_cnt);
-}
-static BRPORT_ATTR(multicast_eht_hosts_cnt, 0444, show_multicast_eht_hosts_cnt,
-		   NULL);
-
 BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE);
 BRPORT_ATTR_FLAG(multicast_to_unicast, BR_MULTICAST_TO_UNICAST);
 #endif
@@ -298,8 +274,6 @@ static const struct brport_attribute *brport_attrs[] = {
 	&brport_attr_multicast_router,
 	&brport_attr_multicast_fast_leave,
 	&brport_attr_multicast_to_unicast,
-	&brport_attr_multicast_eht_hosts_limit,
-	&brport_attr_multicast_eht_hosts_cnt,
 #endif
 	&brport_attr_proxyarp,
 	&brport_attr_proxyarp_wifi,
Signature · 1 line
2.29.2
author maintainer
#2 lore raw

PATCH 2/2 net: bridge: add warning comments to avoid extending sysfs

In reply to Nikolay Aleksandrov

From: Nikolay Aleksandrov <[email protected]>

We're moving to netlink-only options, so add comments in the bridge's sysfs files to warn against adding any new sysfs entries.

---
 net/bridge/br_sysfs_br.c | 4 ++++
 net/bridge/br_sysfs_if.c | 4 ++++
 2 files changed, 8 insertions(+)
net/bridge/br_sysfs_br.c +4 -0
index 7db06e3f642a..71f0f671c4ef 100644
@@ -19,6 +19,10 @@
 
 #include "br_private.h"
 
+/* IMPORTANT: new bridge options must be added with netlink support only
+ *            please do not add new sysfs entries
+ */
+
 #define to_bridge(cd)	((struct net_bridge *)netdev_priv(to_net_dev(cd)))
 
 /*
net/bridge/br_sysfs_if.c +4 -0
index 7a59cdddd3ce..96ff63cde1be 100644
@@ -17,6 +17,10 @@
 
 #include "br_private.h"
 
+/* IMPORTANT: new bridge port options must be added with netlink support only
+ *            please do not add new sysfs entries
+ */
+
 struct brport_attribute {
 	struct attribute	attr;
 	ssize_t (*show)(struct net_bridge_port *, char *);
Signature · 1 line
2.29.2
#3 lore raw
In reply to Nikolay Aleksandrov
Quoted 12 lines · Nikolay Aleksandrov

From: Nikolay Aleksandrov <[email protected]>

Hi,
As recently discussed[1] we should stop extending the bridge sysfs support for new options and move to using netlink only, so patch 01 drops the recently added hosts limit sysfs support which is still in net-next only and patch 02 adds comments in br_sysfs_br/if.c to warn against adding new sysfs options.

Thanks,
Nik

Quoted 8 lines

Nikolay Aleksandrov (2):
net: bridge: mcast: drop hosts limit sysfs support
net: bridge: add warning comments to avoid extending sysfs

 net/bridge/br_sysfs_br.c |  4 ++++
 net/bridge/br_sysfs_if.c | 30 ++++--------------------------
 2 files changed, 8 insertions(+), 26 deletions(-)

Oops :) the [1] addendum should be:

[1] https://lore.kernel.org/netdev/20210128105201.7c6bed82@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/T/#mda7265b2e57b52bdab863f286efa85291cf83822

Since this is in the cover letter I don't think v2 is needed. Please let me know if you'd like me to resend.

Cheers,
Nik

maintainer Applied
#4 lore raw
Quoted 22 lines · On Fri, 29 Jan 2021 13:55:24 +0200 Nikolay Aleksandrov wrote:
Quoted 12 lines · Nikolay Aleksandrov

From: Nikolay Aleksandrov <[email protected]>

Hi,
As recently discussed[1] we should stop extending the bridge sysfs support for new options and move to using netlink only, so patch 01 drops the recently added hosts limit sysfs support which is still in net-next only and patch 02 adds comments in br_sysfs_br/if.c to warn against adding new sysfs options.

Thanks,
Nik

Quoted 8 lines

Nikolay Aleksandrov (2):
net: bridge: mcast: drop hosts limit sysfs support
net: bridge: add warning comments to avoid extending sysfs

 net/bridge/br_sysfs_br.c |  4 ++++
 net/bridge/br_sysfs_if.c | 30 ++++--------------------------
 2 files changed, 8 insertions(+), 26 deletions(-)
Quoted 6 lines

Oops :) the [1] addendum should be:

[1] https://lore.kernel.org/netdev/20210128105201.7c6bed82@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/T/#mda7265b2e57b52bdab863f286efa85291cf83822

Since this is in the cover letter I don't think v2 is needed. Please let me know if you'd like me to resend.

Seems that vger ate the cover letter completely, but not the patches, so I was putting the merge commit message together by hand, anyway :)

Applied, thanks!