diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-02-13 21:43:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-15 02:38:11 +0100 |
commit | 9e781401cbfcd83c4d766b4c6c5efce8348d4d13 (patch) | |
tree | f160bbe6e715476a92b6c611acfc06ba77f17aa3 /net/bridge/br_private.h | |
parent | net: bridge: remove __br_vlan_filter_toggle (diff) | |
download | linux-9e781401cbfcd83c4d766b4c6c5efce8348d4d13.tar.xz linux-9e781401cbfcd83c4d766b4c6c5efce8348d4d13.zip |
net: bridge: propagate extack through store_bridge_parm
The bridge sysfs interface stores parameters for the STP, VLAN,
multicast etc subsystems using a predefined function prototype.
Sometimes the underlying function being called supports a netlink
extended ack message, and we ignore it.
Let's expand the store_bridge_parm function prototype to include the
extack, and just print it to console, but at least propagate it where
applicable. Where not applicable, create a shim function in the
br_sysfs_br.c file that discards the extra function argument.
This patch allows us to propagate the extack argument to
br_vlan_set_default_pvid, br_vlan_set_proto and br_vlan_filter_toggle,
and from there, further up in br_changelink from br_netlink.c.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 0281de20212e..a8d483325476 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -1085,13 +1085,16 @@ int br_vlan_delete(struct net_bridge *br, u16 vid); void br_vlan_flush(struct net_bridge *br); struct net_bridge_vlan *br_vlan_find(struct net_bridge_vlan_group *vg, u16 vid); void br_recalculate_fwd_mask(struct net_bridge *br); -int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val); +int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val, + struct netlink_ext_ack *extack); int __br_vlan_set_proto(struct net_bridge *br, __be16 proto); -int br_vlan_set_proto(struct net_bridge *br, unsigned long val); +int br_vlan_set_proto(struct net_bridge *br, unsigned long val, + struct netlink_ext_ack *extack); int br_vlan_set_stats(struct net_bridge *br, unsigned long val); int br_vlan_set_stats_per_port(struct net_bridge *br, unsigned long val); int br_vlan_init(struct net_bridge *br); -int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val); +int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val, + struct netlink_ext_ack *extack); int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, struct netlink_ext_ack *extack); int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags, |