Skip to content

Commit

Permalink
Merge branch 'net-bridge-drop-hosts-limit-sysfs-and-add-a-comment'
Browse files Browse the repository at this point in the history
Nikolay Aleksandrov says:

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

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.

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

Link: https://lore.kernel.org/r/20210129115142.188455-2-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Jan 30, 2021
2 parents 56435d9 + 1e16f38 commit 4e146de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
4 changes: 4 additions & 0 deletions net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

/*
Expand Down
30 changes: 4 additions & 26 deletions net/bridge/br_sysfs_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
#include <linux/sched/signal.h>

#include "br_private.h"
#include "br_private_mcast_eht.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;
Expand Down Expand Up @@ -246,29 +249,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
Expand Down Expand Up @@ -298,8 +278,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,
Expand Down

0 comments on commit 4e146de

Please sign in to comment.