All of lore.kernel.org
 help / color / mirror / Atom feed
From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: <netdev@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>,
	DENG Qingfang <dqfext@gmail.com>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	George McCollister <george.mccollister@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>
Subject: Re: [RFC PATCH net-next 09/12] Documentation: networking: dsa: add paragraph for the MRP offload
Date: Mon, 22 Feb 2021 20:46:26 +0100	[thread overview]
Message-ID: <20210222194626.srj7wwafyzfc355t@soft-dev3.localdomain> (raw)
In-Reply-To: <20210221213355.1241450-10-olteanv@gmail.com>

The 02/21/2021 23:33, Vladimir Oltean wrote:
> 
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Add a short summary of the methods that a driver writer must implement
> for getting an MRP instance to work on top of a DSA switch.
> 
> Cc: Horatiu Vultur <horatiu.vultur@microchip.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Hi Vladimir,

> 
> Horatiu:
> - Why does ocelot support a single MRP ring if all it does is trap the
>   MRP PDUs to the CPU? What is stopping it from supporting more than
>   one ring?

So the HW can support to run multiple rings. But to have an initial
basic implementation I have decided to support only one ring. So
basically is just a limitation in the driver.

> - Why is listening for SWITCHDEV_OBJ_ID_MRP necessary at all, since it
>   does nothing related to hardware configuration?

It is listening because it needs to know which ports are part of the
ring. In case you have multiple rings and do forwarding in HW you need
to know which ports are part of which ring. Also in case a MRP frame
will come on a port which is not part of the ring then that frame should
be flooded.

> - Why is ocelot_mrp_del_vcap called from both ocelot_mrp_del and from
>   ocelot_mrp_del_ring_role?

To clean after itself. Lets say a user creates a node and sets it up.
Then when she decides to delete the node, what should happen? Should it
first disable the node and then do the cleaning or just do the cleaning?
This userspace application[1] does the second option but I didn't want
to implement the driver to be specific to this application so I have put
the call in both places.

> - Why does ocelot not look at the MRM/MRC ring role at all, and it traps
>   all MRP PDUs to the CPU, even those which it could forward as an MRC?
>   I understood from your commit d8ea7ff3995e ("net: mscc: ocelot: Add
>   support for MRP") description that the hardware should be able of
>   forwarding the Test PDUs as a client, however it is obviously not
>   doing that.

It doesn't look at the role because it doesn't care. Because in both
cases is looking at the sw_backup because it doesn't support any role
completely. Maybe comment was misleading but I have put it under
'current limitations' meaning that the HW can do that but the driver
doesn't take advantage of that yet. The same applies to multiple rings
support.

The idea is to remove these limitations in the next patches and
to be able to remove these limitations then the driver will look also
at the role.

[1] https://github.com/microchip-ung/mrp

> ---
>  Documentation/networking/dsa/dsa.rst | 30 ++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/Documentation/networking/dsa/dsa.rst b/Documentation/networking/dsa/dsa.rst
> index 0a5b06cf4d45..bf82f2aed29a 100644
> --- a/Documentation/networking/dsa/dsa.rst
> +++ b/Documentation/networking/dsa/dsa.rst
> @@ -730,6 +730,36 @@ can optionally populate ``ds->num_lag_ids`` from the ``dsa_switch_ops::setup``
>  method. The LAG ID associated with a bonding/team interface can then be
>  retrieved by a DSA switch driver using the ``dsa_lag_id`` function.
> 
> +IEC 62439-2 (MRP)
> +-----------------
> +
> +The Media Redundancy Protocol is a topology management protocol optimized for
> +fast fault recovery time for ring networks, which has some components
> +implemented as a function of the bridge driver. MRP uses management PDUs
> +(Test, Topology, LinkDown/Up, Option) sent at a multicast destination MAC
> +address range of 01:15:4e:00:00:0x and with an EtherType of 0x88e3.
> +Depending on the node's role in the ring (MRM: Media Redundancy Manager,
> +MRC: Media Redundancy Client, MRA: Media Redundancy Automanager), certain MRP
> +PDUs might need to be terminated locally and others might need to be forwarded.
> +An MRM might also benefit from offloading to hardware the creation and
> +transmission of certain MRP PDUs (Test).
> +
> +Normally an MRP instance can be created on top of any network interface,
> +however in the case of a device with an offloaded data path such as DSA, it is
> +necessary for the hardware, even if it is not MRP-aware, to be able to extract
> +the MRP PDUs from the fabric before the driver can proceed with the software
> +implementation. DSA today has no driver which is MRP-aware, therefore it only
> +listens for the bare minimum switchdev objects required for the software assist
> +to work properly. The operations are detailed below.
> +
> +- ``port_mrp_add`` and ``port_mrp_del``: notifies driver when an MRP instance
> +  with a certain ring ID, priority, primary port and secondary port is
> +  created/deleted.
> +- ``port_mrp_add_ring_role`` and ``port_mrp_del_ring_role``: function invoked
> +  when an MRP instance changes ring roles between MRM or MRC. This affects
> +  which MRP PDUs should be trapped to software and which should be autonomously
> +  forwarded.
> +
>  TODO
>  ====
> 
> --
> 2.25.1
> 

-- 
/Horatiu

  parent reply	other threads:[~2021-02-22 19:47 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21 21:33 [RFC PATCH net-next 00/12] Documentation updates for switchdev and DSA Vladimir Oltean
2021-02-21 21:33 ` [RFC PATCH net-next 01/12] Documentation: networking: update the graphical representation Vladimir Oltean
2021-02-22  5:06   ` Florian Fainelli
2021-02-25 19:29   ` Tobias Waldekranz
2021-02-21 21:33 ` [RFC PATCH net-next 02/12] Documentation: networking: dsa: rewrite chapter about tagging protocol Vladimir Oltean
2021-02-22  5:12   ` Florian Fainelli
2021-02-24 23:54   ` Andrew Lunn
2021-02-25 20:29   ` Tobias Waldekranz
2021-02-26 18:12     ` Vladimir Oltean
2021-02-26 23:19       ` Tobias Waldekranz
2021-02-21 21:33 ` [RFC PATCH net-next 03/12] Documentation: networking: dsa: remove static port count from limitations Vladimir Oltean
2021-02-22  5:13   ` Florian Fainelli
2021-02-21 21:33 ` [RFC PATCH net-next 04/12] Documentation: networking: dsa: remove references to switchdev prepare/commit Vladimir Oltean
2021-02-22  5:13   ` Florian Fainelli
2021-02-24 23:57   ` Andrew Lunn
2021-02-21 21:33 ` [RFC PATCH net-next 05/12] Documentation: networking: dsa: remove TODO about porting more vendor drivers Vladimir Oltean
2021-02-22  5:14   ` Florian Fainelli
2021-02-24 23:59   ` Andrew Lunn
2021-02-21 21:33 ` [RFC PATCH net-next 06/12] Documentation: networking: dsa: document the port_bridge_flags method Vladimir Oltean
2021-02-22  5:15   ` Florian Fainelli
2021-02-25  1:14   ` Andrew Lunn
2021-02-21 21:33 ` [RFC PATCH net-next 07/12] Documentation: networking: dsa: mention integration with devlink Vladimir Oltean
2021-02-22  5:16   ` Florian Fainelli
2021-02-25  1:20   ` Andrew Lunn
2021-02-21 21:33 ` [RFC PATCH net-next 08/12] Documentation: networking: dsa: add paragraph for the LAG offload Vladimir Oltean
2021-02-22  5:18   ` Florian Fainelli
2021-02-25  1:27   ` Andrew Lunn
2021-02-25 20:42   ` Tobias Waldekranz
2021-02-26 18:09     ` Vladimir Oltean
2021-02-21 21:33 ` [RFC PATCH net-next 09/12] Documentation: networking: dsa: add paragraph for the MRP offload Vladimir Oltean
2021-02-22  5:19   ` Florian Fainelli
2021-02-22 19:46   ` Horatiu Vultur [this message]
2021-02-22 20:25     ` Vladimir Oltean
2021-02-23 13:30       ` Horatiu Vultur
2021-02-23 13:50         ` Vladimir Oltean
2021-02-23 14:18           ` Horatiu Vultur
2021-02-25  1:32   ` Andrew Lunn
2021-02-21 21:33 ` [RFC PATCH net-next 10/12] Documentation: networking: dsa: add paragraph for the HSR/PRP offload Vladimir Oltean
2021-02-22  5:21   ` Florian Fainelli
2021-02-22 14:48   ` George McCollister
2021-02-25  1:42   ` Andrew Lunn
2021-02-25 13:33     ` George McCollister
2021-02-21 21:33 ` [RFC PATCH net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior Vladimir Oltean
2021-02-25  1:57   ` Andrew Lunn
2021-02-28 16:11   ` Ido Schimmel
2021-02-21 21:33 ` [RFC PATCH net-next 12/12] Documentation: networking: switchdev: fix command for static FDB entries Vladimir Oltean
2021-02-22  5:24   ` Florian Fainelli

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=20210222194626.srj7wwafyzfc355t@soft-dev3.localdomain \
    --to=horatiu.vultur@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.