From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Ido Schimmel <idosch@mellanox.com>,
Jiri Pirko <jiri@mellanox.com>,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
cphealy@gmail.com, bridge@lists.linux-foundation.org,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Subject: [PATCH net 0/3] net: bridge: fast ageing on topology change
Date: Sat, 10 Dec 2016 13:44:26 -0500 [thread overview]
Message-ID: <20161210184429.31600-1-vivien.didelot@savoirfairelinux.com> (raw)
802.1D [1] specifies that the bridges in a network must use a short
value to age out dynamic entries in the Filtering Database for a period,
once a topology change has been communicated by the root bridge.
This patchset fixes this for the in-kernel STP implementation.
Once the topology change flag is set in a net_bridge instance, the
ageing time value is shorten to twice the forward delay used by the
topology.
When the topology change flag is cleared, the ageing time configured for
the bridge is restored.
To accomplish that, a new bridge_ageing_time member is added to the
net_bridge structure, to store the user configured bridge ageing time.
Two helpers are added to offload the ageing time and set the topology
change flag in the net_bridge instance. Then the required logic is added
in the topology change helper if in-kernel STP is used.
This has been tested on the following topology:
+--------------+
| root bridge |
| 1 2 3 4 |
+--+--+--+--+--+
| | | | +--------+
| | | +------| laptop |
| | | +--------+
+--+--+--+-----+
| 1 2 3 |
| slave bridge |
+--------------+
When unplugging/replugging the laptop, the slave bridge (under test)
gets the topology change flag sent by the root bridge, and fast ageing
is triggered on the bridges. Once the topology change timer of the root
bridge expires, the topology change flag is cleared and the configured
ageing time is restored on the bridges.
A similar test has been done between two bridges under test.
When changing the forward delay of the root bridge with:
# echo 3000 > /sys/class/net/br0/bridge/forward_delay
the ageing time correctly changes on both bridges from 300s to 60s while
the TOPOLOGY_CHANGE flag is present.
[1] "8.3.5 Notifying topology changes",
http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
No change since RFC: https://lkml.org/lkml/2016/10/19/828
Vivien Didelot (3):
net: bridge: add helper to offload ageing time
net: bridge: add helper to set topology change
net: bridge: shorten ageing time on topology change
net/bridge/br_device.c | 2 +-
net/bridge/br_private.h | 4 ++-
net/bridge/br_private_stp.h | 1 +
net/bridge/br_stp.c | 65 ++++++++++++++++++++++++++++++++++++++-------
net/bridge/br_stp_if.c | 14 +++-------
net/bridge/br_stp_timer.c | 2 +-
6 files changed, 65 insertions(+), 23 deletions(-)
--
2.10.2
next reply other threads:[~2016-12-10 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 18:44 Vivien Didelot [this message]
2016-12-10 18:44 ` [PATCH net 1/3] net: bridge: add helper to offload ageing time Vivien Didelot
2016-12-10 18:44 ` [PATCH net 2/3] net: bridge: add helper to set topology change Vivien Didelot
2016-12-10 18:44 ` [PATCH net 3/3] net: bridge: shorten ageing time on " Vivien Didelot
2016-12-11 2:55 ` [PATCH net 0/3] net: bridge: fast ageing " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161210184429.31600-1-vivien.didelot@savoirfairelinux.com \
--to=vivien.didelot@savoirfairelinux.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®