public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: George McCollister <george.mccollister@gmail.com>
Cc: Tobias Waldekranz <tobias@waldekranz.com>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 0/4] add HSR offloading support for DSA switches
Date: Tue, 9 Feb 2021 19:14:06 +0200	[thread overview]
Message-ID: <20210209171406.ce35de7dxnjsfmpk@skbuf> (raw)
In-Reply-To: <CAFSKS=NQN-OaQwYT8Crev33mUON3+6zYCss_nHoCD2gOzeYWTw@mail.gmail.com>

On Tue, Feb 09, 2021 at 11:04:08AM -0600, George McCollister wrote:
> > >> In the DSA layer (dsa_slave_changeupper), could we merge the two HSR
> > >> join/leave calls somehow? My guess is all drivers are going to end up
> > >> having to do the same dance of deferring configuration until both ports
> > >> are known.
> > >
> > > Describe what you mean a bit more. Do you mean join and leave should
> > > each only be called once with both hsr ports being passed in?
> >
> > Exactly. Maybe we could use `netdev_for_each_lower_dev` to figure out if
> > the other port has already been switched over to the new upper or
> > something. I find it hard to believe that there is any hardware out
> > there that can do something useful with a single HSR/PRP port anyway.
>
> If one port failed maybe it would still be useful to join one port if
> the switch supported it? Maybe this couldn't ever happen anyway due
> the way hsr is designed.
>
> How were you thinking this would work? Would it just not use
> dsa_port_notify() and call a switch op directly after the second
> port's dsa_slave_changeupper() call? Or would we instead keep port
> notifiers and calls to dsa_switch_hsr_join for each port and just make
> dsa_switch_hsr_join() not call the switch op to create the HSR until
> the second port called it? I'm not all that familiar with how these
> dsa notifiers work and would prefer to stick with using a similar
> mechanism to the bridge and lag support. It would be nice to get some
> feedback from the DSA maintainers on how they would prefer it to work
> if they indeed had a preference at all.

Even though I understand where this is coming from, I have grown to
dislike overengineered solutions. DSA is there to standardize how an
Ethernet-connected switch interacts with the network stack, not to be
the middle man that tries to offer a lending hand everywhere.
If there is a 50/50 chance that this extra logic in the DSA mid layer
will not be needed for the second switch that offloads HSR/PRP, then I'd
go with "don't do it". Just emit a hsr_join for both ports and let the
driver deal with it.

  reply	other threads:[~2021-02-09 17:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 21:59 [PATCH net-next v2 0/4] add HSR offloading support for DSA switches George McCollister
2021-02-04 21:59 ` [PATCH net-next v2 1/4] net: hsr: generate supervision frame without HSR/PRP tag George McCollister
2021-02-07  1:26   ` Vladimir Oltean
2021-02-08 17:31     ` George McCollister
2021-02-04 21:59 ` [PATCH net-next v2 2/4] net: hsr: add offloading support George McCollister
2021-02-04 21:59 ` [PATCH net-next v2 3/4] net: dsa: add support for offloading HSR George McCollister
2021-02-06 23:29   ` Vladimir Oltean
2021-02-08 17:21     ` George McCollister
2021-02-09 17:20       ` Vladimir Oltean
2021-02-09 18:37         ` George McCollister
2021-02-09 18:51           ` Vladimir Oltean
2021-02-09 19:09             ` George McCollister
2021-02-04 21:59 ` [PATCH net-next v2 4/4] net: dsa: xrs700x: add HSR offloading support George McCollister
2021-02-06 23:53   ` Vladimir Oltean
2021-02-08 14:46     ` George McCollister
2021-02-08 20:16 ` [PATCH net-next v2 0/4] add HSR offloading support for DSA switches Tobias Waldekranz
2021-02-08 21:09   ` George McCollister
2021-02-09 14:38     ` Tobias Waldekranz
2021-02-09 17:04       ` George McCollister
2021-02-09 17:14         ` Vladimir Oltean [this message]
2021-02-10 21:10         ` Tobias Waldekranz
2021-02-10 21:55           ` Vladimir Oltean
2021-02-12 23:52             ` Tobias Waldekranz
2021-02-13  0:43               ` 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=20210209171406.ce35de7dxnjsfmpk@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=f.fainelli@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tobias@waldekranz.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