mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>,
	vivien.didelot@gmail.com, andrew@lunn.ch, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 8/9] net: dsa: sja1105: Add support for Spanning Tree Protocol
Date: Fri, 3 May 2019 19:10:49 -0700	[thread overview]
Message-ID: <d9c279f8-d2b1-c99f-fa30-b4810bd7b293@gmail.com> (raw)
In-Reply-To: <20190504011826.30477-9-olteanv@gmail.com>



On 5/3/2019 6:18 PM, Vladimir Oltean wrote:
> While not explicitly documented as supported in UM10944, compliance with
> the STP states can be obtained by manipulating 3 settings at the
> (per-port) MAC config level: dynamic learning, inhibiting reception of
> regular traffic, and inhibiting transmission of regular traffic.
> 
> In all these modes, transmission and reception of special BPDU frames
> from the stack is still enabled (not inhibited by the MAC-level
> settings).
> 
> On ingress, BPDUs are classified by the MAC filter as link-local
> (01-80-C2-00-00-00) and forwarded to the CPU port.  This mechanism works
> under all conditions (even without the custom 802.1Q tagging) because
> the switch hardware inserts the source port and switch ID into bytes 4
> and 5 of the MAC-filtered frames. Then the DSA .rcv handler needs to put
> back zeroes into the MAC address after decoding the source port
> information.
> 
> On egress, BPDUs are transmitted using management routes from the xmit
> worker thread. Again this does not require switch tagging, as the switch
> port is programmed through SPI to hold a temporary (single-fire) route
> for a frame with the programmed destination MAC (01-80-C2-00-00-00).
> 
> STP is activated using the following commands and was tested by
> connecting two front-panel ports together and noticing that switching
> loops were prevented (one port remains in the blocking state):
> 
> $ ip link add name br0 type bridge stp_state 1 && ip link set br0 up
> $ for eth in $(ls /sys/devices/platform/soc/2100000.spi/spi_master/spi0/spi0.1/net/);
>   do ip link set ${eth} master br0 && ip link set ${eth} up; done
> 
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2019-05-04  2:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-04  1:18 [PATCH net-next 0/9] Traffic support for SJA1105 DSA driver Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 1/9] net: dsa: Call driver's setup callback after setting up its switchdev notifier Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 3/9] net: dsa: Allow drivers to filter packets they can decode source port from Vladimir Oltean
2019-05-04  2:00   ` Florian Fainelli
2019-05-04  1:18 ` [PATCH net-next 4/9] net: dsa: Keep private info in the skb->cb Vladimir Oltean
2019-05-04  2:04   ` Florian Fainelli
2019-05-04  2:23     ` Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 5/9] net: dsa: Add support for deferred xmit Vladimir Oltean
2019-05-04  2:07   ` Florian Fainelli
2019-05-04  2:10     ` Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 6/9] net: dsa: Add a private structure pointer to dsa_port Vladimir Oltean
2019-05-04  2:08   ` Florian Fainelli
2019-05-04  1:18 ` [PATCH net-next 7/9] net: dsa: sja1105: Add support for traffic through standalone ports Vladimir Oltean
2019-05-04  1:18 ` [PATCH net-next 8/9] net: dsa: sja1105: Add support for Spanning Tree Protocol Vladimir Oltean
2019-05-04  2:10   ` Florian Fainelli [this message]
2019-05-04  1:18 ` [PATCH net-next 9/9] Documentation: net: dsa: sja1105: Add info about supported traffic modes Vladimir Oltean
2019-05-04  2:17   ` Florian Fainelli
2019-05-04  2:36     ` Vladimir Oltean

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=d9c279f8-d2b1-c99f-fa30-b4810bd7b293@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /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

Powered by JetHome