Skip to content

Commit

Permalink
net: bridge: add warning comments to avoid extending sysfs
Browse files Browse the repository at this point in the history
We're moving to netlink-only options, so add comments in the bridge's
sysfs files to warn against adding any new sysfs entries.

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Nikolay Aleksandrov authored and Jakub Kicinski committed Jan 30, 2021
1 parent 7d0888d commit 1e16f38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 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
4 changes: 4 additions & 0 deletions net/bridge/br_sysfs_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down

0 comments on commit 1e16f38

Please sign in to comment.