All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/8] bridge: mrp: Extend br_mrp_switchdev_*
@ 2021-02-16 21:41 ` Horatiu Vultur
  0 siblings, 0 replies; 46+ messages in thread
From: Horatiu Vultur @ 2021-02-16 21:41 UTC (permalink / raw)
  To: davem, kuba
  Cc: jiri, ivecera, nikolay, roopa, vladimir.oltean, claudiu.manoil,
	alexandre.belloni, UNGLinuxDriver, andrew, vivien.didelot,
	f.fainelli, rasmus.villemoes, linux-kernel, netdev, bridge,
	Horatiu Vultur

This patch series extends MRP switchdev to allow the SW to have a better
understanding if the HW can implement the MRP functionality or it needs
to help the HW to run it. There are 3 cases:
- when HW can't implement at all the functionality.
- when HW can implement a part of the functionality but needs the SW
  implement the rest. For example if it can't detect when it stops
  receiving MRP Test frames but it can copy the MRP frames to CPU to
  allow the SW to determine this.  Another example is generating the MRP
  Test frames. If HW can't do that then the SW is used as backup.
- when HW can implement completely the functionality.

So, initially the SW tries to offload the entire functionality in HW, if
that fails it tries offload parts of the functionality in HW and use the
SW as helper and if also this fails then MRP can't run on this HW.

Based on these new calls, implement the switchdev for Ocelot driver. This
is an example where the HW can't run completely the functionality but it
can help the SW to run it, by trapping all MRP frames to CPU.

Also this patch series adds MRP support to DSA and implements the Felix
driver which just reuse the Ocelot functions. This part was just compiled
tested because I don't have any HW on which to do the actual tests.

v4:
 - remove ifdef MRP from include/net/switchdev.h
 - move MRP implementation for Ocelot in a different file such that
   Felix driver can use it.
 - extend DSA with MRP support
 - implement MRP support for Felix.
v3:
 - implement the switchdev calls needed by Ocelot driver.
v2:
 - fix typos in comments and in commit messages
 - remove some of the comments
 - move repeated code in helper function
 - fix issue when deleting a node when sw_backup was true

Horatiu Vultur (8):
  switchdev: mrp: Remove CONFIG_BRIDGE_MRP
  switchdev: mrp: Extend ring_role_mrp and in_role_mrp
  bridge: mrp: Add 'enum br_mrp_hw_support'
  bridge: mrp: Extend br_mrp_switchdev to detect better the errors
  bridge: mrp: Update br_mrp to use new return values of
    br_mrp_switchdev
  net: mscc: ocelot: Add support for MRP
  net: dsa: add MRP support
  net: dsa: felix: Add support for MRP

 drivers/net/dsa/ocelot/felix.c         |  38 ++++++
 drivers/net/ethernet/mscc/Makefile     |   1 +
 drivers/net/ethernet/mscc/ocelot.c     |  10 +-
 drivers/net/ethernet/mscc/ocelot_mrp.c | 175 +++++++++++++++++++++++++
 drivers/net/ethernet/mscc/ocelot_net.c |  60 +++++++++
 include/linux/dsa/ocelot.h             |   5 +
 include/net/dsa.h                      |  12 ++
 include/net/switchdev.h                |  12 +-
 include/soc/mscc/ocelot.h              |  45 +++++++
 net/bridge/br_mrp.c                    |  43 +++---
 net/bridge/br_mrp_switchdev.c          | 171 ++++++++++++++----------
 net/bridge/br_private_mrp.h            |  38 ++++--
 net/dsa/dsa_priv.h                     |  26 ++++
 net/dsa/port.c                         |  48 +++++++
 net/dsa/slave.c                        |  22 ++++
 net/dsa/switch.c                       | 105 +++++++++++++++
 net/dsa/tag_ocelot.c                   |   8 ++
 17 files changed, 715 insertions(+), 104 deletions(-)
 create mode 100644 drivers/net/ethernet/mscc/ocelot_mrp.c

-- 
2.27.0


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2021-02-17 16:28 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 21:41 [PATCH net-next v4 0/8] bridge: mrp: Extend br_mrp_switchdev_* Horatiu Vultur
2021-02-16 21:41 ` [Bridge] " Horatiu Vultur
2021-02-16 21:41 ` [PATCH net-next v4 1/8] switchdev: mrp: Remove CONFIG_BRIDGE_MRP Horatiu Vultur
2021-02-16 21:41   ` [Bridge] " Horatiu Vultur
2021-02-17 10:26   ` Vladimir Oltean
2021-02-17 10:26     ` [Bridge] " Vladimir Oltean
2021-02-16 21:41 ` [PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and in_role_mrp Horatiu Vultur
2021-02-16 21:41   ` [Bridge] " Horatiu Vultur
2021-02-17 10:34   ` Vladimir Oltean
2021-02-17 10:34     ` [Bridge] " Vladimir Oltean
2021-02-17 15:58     ` Horatiu Vultur
2021-02-17 15:58       ` [Bridge] " Horatiu Vultur
2021-02-17 16:09       ` Vladimir Oltean
2021-02-17 16:09         ` [Bridge] " Vladimir Oltean
2021-02-16 21:42 ` [PATCH net-next v4 3/8] bridge: mrp: Add 'enum br_mrp_hw_support' Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-16 21:42 ` [PATCH net-next v4 4/8] bridge: mrp: Extend br_mrp_switchdev to detect better the errors Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-17 10:56   ` Vladimir Oltean
2021-02-17 10:56     ` [Bridge] " Vladimir Oltean
2021-02-17 16:02     ` Horatiu Vultur
2021-02-17 16:02       ` [Bridge] " Horatiu Vultur
2021-02-16 21:42 ` [PATCH net-next v4 5/8] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-17 10:59   ` Vladimir Oltean
2021-02-17 10:59     ` [Bridge] " Vladimir Oltean
2021-02-17 16:18     ` Horatiu Vultur
2021-02-17 16:18       ` [Bridge] " Horatiu Vultur
2021-02-16 21:42 ` [PATCH net-next v4 6/8] net: mscc: ocelot: Add support for MRP Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-17 11:14   ` Vladimir Oltean
2021-02-17 11:14     ` [Bridge] " Vladimir Oltean
2021-02-17 16:25     ` Horatiu Vultur
2021-02-17 16:25       ` [Bridge] " Horatiu Vultur
2021-02-17 11:51   ` Vladimir Oltean
2021-02-17 11:51     ` [Bridge] " Vladimir Oltean
2021-02-16 21:42 ` [PATCH net-next v4 7/8] net: dsa: add MRP support Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-17 11:23   ` Vladimir Oltean
2021-02-17 11:23     ` [Bridge] " Vladimir Oltean
2021-02-16 21:42 ` [PATCH net-next v4 8/8] net: dsa: felix: Add support for MRP Horatiu Vultur
2021-02-16 21:42   ` [Bridge] " Horatiu Vultur
2021-02-17 10:24   ` Vladimir Oltean
2021-02-17 10:24     ` [Bridge] " Vladimir Oltean
2021-02-16 23:00 ` [PATCH net-next v4 0/8] bridge: mrp: Extend br_mrp_switchdev_* patchwork-bot+netdevbpf
2021-02-16 23:00   ` [Bridge] " patchwork-bot+netdevbpf

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.