Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333146

[PATCH RFC 2/3] net: bridge: set forwarding state on port removal

From Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Newsgroups linux.kernel
Subject [PATCH RFC 2/3] net: bridge: set forwarding state on port removal
Date 2016-02-12 22:40 +0100
Message-ID <r1tBx-44h-17@gated-at.bofh.it> (permalink)
References <r1tBw-44h-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When a port leaves a bridge, the bridge layer puts its STP state to
Disabled. If the port is part of an hardware switch, the mode needs to
be set to Forwarding in order to restore communication with the CPU.

Call br_set_state() in del_nbp(), which only affects switchdev users.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 net/bridge/br_if.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index c367b3e..93e7b24 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -251,6 +251,11 @@ static void del_nbp(struct net_bridge_port *p)
 
 	nbp_vlan_flush(p);
 	br_fdb_delete_by_port(br, p, 0, 1);
+
+	/* If the port is part of an hardware switch, set its STP state to
+	 * forwarding to restore communication with the CPU port.
+	 */
+	br_set_state(p, BR_STATE_FORWARDING);
 	switchdev_deferred_process();
 
 	nbp_update_port_count(br);
-- 
2.7.1

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC 2/3] net: bridge: set forwarding state on port removal Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-02-12 22:40 +0100
  Re: [PATCH RFC 2/3] net: bridge: set forwarding state on port removal Ido Schimmel <idosch@mellanox.com> - 2016-02-13 22:00 +0100
    Re: [PATCH RFC 2/3] net: bridge: set forwarding state on port removal Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-02-13 22:50 +0100

csiph-web