Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: George McCollister <george.mccollister@gmail.com>
Cc: 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>, Nishanth Menon <nm@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Sekhar Nori <nsekhar@ti.com>, Lokesh Vutla <lokeshvutla@ti.com>,
	netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next 2/3] net: hsr: add DSA offloading support
Date: Sun, 24 Jan 2021 19:29:38 +0200	[thread overview]
Message-ID: <20210124172938.ikhpe44bqjqmttul@skbuf> (raw)
In-Reply-To: <20210122155948.5573-3-george.mccollister@gmail.com>

On Fri, Jan 22, 2021 at 09:59:47AM -0600, George McCollister wrote:
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index f2fb433f3828..fc7e3ff11c5c 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1924,6 +1924,19 @@ static int dsa_slave_changeupper(struct net_device *dev,
>  			dsa_port_lag_leave(dp, info->upper_dev);
>  			err = NOTIFY_OK;
>  		}
> +	} else if (netif_is_hsr_master(info->upper_dev)) {
> +		if (info->linking) {
> +			err = dsa_port_hsr_join(dp, info->upper_dev);
> +			if (err == -EOPNOTSUPP) {
> +				NL_SET_ERR_MSG_MOD(info->info.extack,
> +						   "Offloading not supported");
> +				err = 0;
> +			}
> +			err = notifier_from_errno(err);
> +		} else {
> +			dsa_port_hsr_leave(dp, info->upper_dev);
> +			err = NOTIFY_OK;
> +		}
>  	}

How is the RedBox use case handled with the Linux hsr driver (i.e. a
HSR-unaware SAN endpoint attached to a HSR ring)? I would expect
something like this:

                   +---------+
                   |         |
                   |   SAN   |
                   |         |
                   +---------+
                        |
                        |
                        |
 +-----------------+---------+------------------+
 |                 |         |                  |
 |  Your           |   swp0  |                  |
 |  board          |         |                  |
 |                 +---------+                  |
 |                    |   ^                     |
 |                    |   |                     |
 |                    |   | br0                 |
 |                    |   |                     |
 |                    v   |                     |
 |       +-----------------------------+        |
 |       |                             |        |
 |       |             hsr0            |        |
 |       |                             |        |
 |       +---------+---------+---------+        |
 |       |         |         |         |        |
 |       |   swp1  |  DAN-H  |  swp2   |        |
 |       |         |         |         |        |
 +-------+---------+---------+---------+--------+
            |   ^               |   ^
    to/from |   |               |   | to/from
     ring   |   |               |   |  ring
            v   |               v   |

Therefore, aren't you interested in offloading this setup as well?
I.e. the case where the hsr0 interface joins a bridge that also
contains other DSA switch ports. This would be similar to the LAG
offload recently added by Tobias.

  parent reply	other threads:[~2021-01-24 17:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 15:59 [RFC PATCH net-next 0/3] add HSR offloading support for DSA switches George McCollister
2021-01-22 15:59 ` [RFC PATCH net-next 1/3] net: hsr: generate supervision frame without HSR tag George McCollister
2021-01-22 15:59 ` [RFC PATCH net-next 2/3] net: hsr: add DSA offloading support George McCollister
2021-01-22 17:56   ` Florian Fainelli
2021-01-22 18:00     ` Florian Fainelli
2021-01-22 18:48       ` Nishanth Menon
2021-01-24  8:43         ` Vladimir Oltean
2021-01-25 13:56           ` George McCollister
2021-01-22 18:50     ` George McCollister
2021-01-24 17:29   ` Vladimir Oltean [this message]
2021-01-25 14:33     ` George McCollister
2021-01-22 15:59 ` [RFC PATCH net-next 3/3] net: dsa: xrs700x: add HSR " George McCollister

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=20210124172938.ikhpe44bqjqmttul@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=f.fainelli@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=kishon@ti.com \
    --cc=kuba@kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.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