mbox series

[net-next,v2,0/4] bridge: mrp: Extend br_mrp_switchdev_*

Message ID 20210127205241.2864728-1-horatiu.vultur@microchip.com (mailing list archive)
Headers show
Series bridge: mrp: Extend br_mrp_switchdev_* | expand

Message

Horatiu Vultur Jan. 27, 2021, 8:52 p.m. UTC
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.

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 (4):
  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

 include/net/switchdev.h       |   2 +
 net/bridge/br_mrp.c           |  43 +++++----
 net/bridge/br_mrp_switchdev.c | 171 +++++++++++++++++++++-------------
 net/bridge/br_private_mrp.h   |  38 ++++++--
 4 files changed, 161 insertions(+), 93 deletions(-)

Comments

Jakub Kicinski Jan. 30, 2021, 3:01 a.m. UTC | #1
On Wed, 27 Jan 2021 21:52:37 +0100 Horatiu Vultur wrote:
> 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.
> 
> 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

Folks who were involved in previous MRP conversations - does this look
good to you? Anyone planning to test?
Rasmus Villemoes Feb. 2, 2021, 7:40 a.m. UTC | #2
On 30/01/2021 04.01, Jakub Kicinski wrote:
> On Wed, 27 Jan 2021 21:52:37 +0100 Horatiu Vultur wrote:
>> 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:

>> 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
> 
> Folks who were involved in previous MRP conversations - does this look
> good to you? Anyone planning to test?
> 

I am planning to test these, but it's unlikely I'll get around to it
this week unfortunately.

Rasmus
Jakub Kicinski Feb. 2, 2021, 7:50 p.m. UTC | #3
On Tue, 2 Feb 2021 08:40:02 +0100 Rasmus Villemoes wrote:
> On 30/01/2021 04.01, Jakub Kicinski wrote:
> > On Wed, 27 Jan 2021 21:52:37 +0100 Horatiu Vultur wrote:  
> >> 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:  
> 
> >> 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  
> > 
> > Folks who were involved in previous MRP conversations - does this look
> > good to you? Anyone planning to test?
> 
> I am planning to test these, but it's unlikely I'll get around to it
> this week unfortunately.

Horatiu are you okay with deferring the series until Rasmus validates?
Given none of this HW is upstream now (AFAIU) this is an awkward set 
to handle. Having a confirmation from Rasmus would make us a little bit
more comfortable.
Horatiu Vultur Feb. 2, 2021, 8:06 p.m. UTC | #4
The 02/02/2021 11:50, Jakub Kicinski wrote:
> 
> On Tue, 2 Feb 2021 08:40:02 +0100 Rasmus Villemoes wrote:
> > On 30/01/2021 04.01, Jakub Kicinski wrote:
> > > On Wed, 27 Jan 2021 21:52:37 +0100 Horatiu Vultur wrote:
> > >> 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:
> >
> > >> 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
> > >
> > > Folks who were involved in previous MRP conversations - does this look
> > > good to you? Anyone planning to test?
> >
> > I am planning to test these, but it's unlikely I'll get around to it
> > this week unfortunately.
> 
> Horatiu are you okay with deferring the series until Rasmus validates?
> Given none of this HW is upstream now (AFAIU) this is an awkward set
> to handle. Having a confirmation from Rasmus would make us a little bit
> more comfortable.

It is perfectly fine for me to wait for Rasmus to validate this series.
Also I have started to have a look how to implement the switchdev calls
for Ocelot driver. I might have something by the end of the week, but
lets see.
Jakub Kicinski Feb. 2, 2021, 8:49 p.m. UTC | #5
On Tue, 2 Feb 2021 21:06:49 +0100 Horatiu Vultur wrote:
> The 02/02/2021 11:50, Jakub Kicinski wrote:
> > On Tue, 2 Feb 2021 08:40:02 +0100 Rasmus Villemoes wrote:  
> > > I am planning to test these, but it's unlikely I'll get around to it
> > > this week unfortunately.  
> > 
> > Horatiu are you okay with deferring the series until Rasmus validates?
> > Given none of this HW is upstream now (AFAIU) this is an awkward set
> > to handle. Having a confirmation from Rasmus would make us a little bit
> > more comfortable.  
> 
> It is perfectly fine for me to wait for Rasmus to validate this series.
> Also I have started to have a look how to implement the switchdev calls
> for Ocelot driver. I might have something by the end of the week, but
> lets see.

Great, thanks! Please repost once we got the confirmation.