[PATCH net-next 2/2] net: ocelot: Simplify MRP deletion

2021-03-23 Thread Horatiu Vultur
Now that the driver will always be notified that the role is deleted before the ring is deleted, then we don't need to duplicate the logic of cleaning the resources also in the delete function. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot_mrp.c | 16 1

[PATCH net-next 1/2] bridge: mrp: Disable roles before deleting the MRP instance

2021-03-23 Thread Horatiu Vultur
make sure that the driver is notified that the role is changed to disabled before the MRP instance is deleted to have similar callbacks with the creating of the instance. In this way it would simplify the logic in the drivers. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 7 +++ 1

[PATCH net-next 0/2] bridge: mrp: Disable roles before deleting

2021-03-23 Thread Horatiu Vultur
The first patch in this series make sures that the driver is notified that the role is disabled before the MRP instance is deleted. The second patch uses this so it can simplify the driver. Horatiu Vultur (2): bridge: mrp: Disable roles before deleting the MRP instance net: ocelot: Simplify

[PATCH net-next] net: ocelot: Fix deletetion of MRP entries from MAC table

2021-03-18 Thread Horatiu Vultur
port. The fix consists of using the port on which the function was called. Fixes: 7c588c3e96e9733a ("net: ocelot: Extend MRP") Reported-by: Dan Carpenter Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot_mrp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH net-next v2 3/3] net: ocelot: Remove ocelot_xfh_get_cpuq

2021-03-16 Thread Horatiu Vultur
Now when extracting frames from CPU the cpuq is not used anymore so remove it. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 3 +-- include/linux/dsa/ocelot.h | 5 - net/dsa/tag_ocelot.c | 2 -- 3 files changed, 1 insertion(+), 9 deletions

[PATCH net-next v2 2/3] net: ocelot: Extend MRP

2021-03-16 Thread Horatiu Vultur
This patch extends MRP support for Ocelot. It allows to have multiple rings and when the node has the MRC role it forwards MRP Test frames in HW. For MRM there is no change. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 6 - drivers/net/ethernet/mscc/ocelot_mrp.c

[PATCH net-next v2 1/3] net: ocelot: Add PGID_BLACKHOLE

2021-03-16 Thread Horatiu Vultur
Add a new PGID that is used not to forward frames anywhere. It is used by MRP to make sure that MRP Test frames will not reach CPU port. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 3 +++ include/soc/mscc/ocelot.h | 4 +++- 2 files changed, 6 insertions(+), 1

[PATCH net-next v2 0/3] net: ocelot: Extend MRP

2021-03-16 Thread Horatiu Vultur
ame ocelot_mrp_find_port to ocelot_mrp_find_partner_port - rename PGID_MRP to PGID_BLACKHOLE - use GFP_KERNEL instead of GFP_ATOMIC - fix other whitespace issues Horatiu Vultur (3): net: ocelot: Add PGID_BLACKHOLE net: ocelot: Extend MRP net: ocelot: Remove ocelot_xfh_get_cpuq drivers/net/ether

Re: [PATCH net-next] net: ocelot: Extend MRP

2021-03-12 Thread Horatiu Vultur
The 03/11/2021 20:02, Vladimir Oltean wrote: > > On Thu, Mar 11, 2021 at 08:30:08PM +0100, Horatiu Vultur wrote: > > > > +static void ocelot_mrp_save_mac(struct ocelot *ocelot, > > > > + struct ocelot_port *port) > > > >

Re: [PATCH net-next] net: ocelot: Extend MRP

2021-03-11 Thread Horatiu Vultur
The 03/11/2021 02:25, Vladimir Oltean wrote: Hi Vladimir, > > On Wed, Mar 10, 2021 at 09:51:40PM +0100, Horatiu Vultur wrote: > > This patch extends MRP support for Ocelot. It allows to have multiple > > rings and when the node has the MRC role it forwards MRP Test frames

[PATCH net-next] net: ocelot: Extend MRP

2021-03-10 Thread Horatiu Vultur
This patch extends MRP support for Ocelot. It allows to have multiple rings and when the node has the MRC role it forwards MRP Test frames in HW. For MRM there is no change. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 6 - drivers/net/ethernet/mscc/ocelot_mrp.c

Re: [PATCH net-next] net: mscc: Fix MRP switchdev driver

2021-02-18 Thread Horatiu Vultur
The 02/18/2021 13:17, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > Hi Vladimir, > Hi Horatiu, > > On Thu, Feb 18, 2021 at 12:47:26PM +0100, Horatiu Vultur wrote: > > This patch fixes the oce

[PATCH net-next] net: mscc: Fix MRP switchdev driver

2021-02-18 Thread Horatiu Vultur
dimir Oltean Signed-off-by: Horatiu Vultur --- This was tested using switchdev and only compile tested the DSA driver. --- drivers/net/dsa/ocelot/felix.c | 20 --- drivers/net/ethernet/mscc/ocelot_mrp.c | 49 -- drivers/net/ethernet/mscc/ocelot_net.c | 8

Re: [PATCH net-next v4 6/8] net: mscc: ocelot: Add support for MRP

2021-02-17 Thread Horatiu Vultur
The 02/17/2021 11:14, Vladimir Oltean wrote: > > On Tue, Feb 16, 2021 at 10:42:03PM +0100, Horatiu Vultur wrote: > > Add basic support for MRP. The HW will just trap all MRP frames on the > > ring ports to CPU and allow the SW to process them. In this way it is > > p

Re: [PATCH net-next v4 5/8] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-02-17 Thread Horatiu Vultur
The 02/17/2021 10:59, Vladimir Oltean wrote: > > On Tue, Feb 16, 2021 at 10:42:02PM +0100, Horatiu Vultur wrote: > > diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c > > index 01c67ed727a9..12487f6fe9b4 100644 > > --- a/net/bridge/br_mrp.c > > +++ b/net/bridge

Re: [PATCH net-next v4 4/8] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-02-17 Thread Horatiu Vultur
The 02/17/2021 10:56, Vladimir Oltean wrote: > > On Tue, Feb 16, 2021 at 10:42:01PM +0100, Horatiu Vultur wrote: > > This patch extends the br_mrp_switchdev functions to be able to have a > > better understanding what cause the issue and if the SW needs to be us

Re: [PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-02-17 Thread Horatiu Vultur
The 02/17/2021 10:34, Vladimir Oltean wrote: Hi Vladimir, > > On Tue, Feb 16, 2021 at 10:41:59PM +0100, Horatiu Vultur wrote: > > Add the member sw_backup to the structures switchdev_obj_ring_role_mrp > > and switchdev_obj_in_role_mrp. In this way the SW can call the driver i

Re: [PATCH 5.10 098/104] switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT

2021-02-16 Thread Horatiu Vultur
The 02/16/2021 22:35, Pavel Machek wrote: Hi, > Hi! > > > From: Horatiu Vultur > > > > commit 059d2a1004981dce19f0127dabc1b4ec927d202a upstream. > > > > Now that MRP started to use also SWITCHDEV_ATTR_ID_PORT_STP_STATE to > > notify HW, then S

[PATCH net-next v4 7/8] net: dsa: add MRP support

2021-02-16 Thread Horatiu Vultur
to .port_mrp_add/del and .port_mrp_add/del_ring_role in the DSA driver for the switch. Signed-off-by: Horatiu Vultur --- include/net/dsa.h | 12 ++ net/dsa/dsa_priv.h | 26 +++ net/dsa/port.c | 48 + net/dsa/slave.c| 22 ++ net/dsa/switch.c | 105

[PATCH net-next v4 4/8] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-02-16 Thread Horatiu Vultur
the driver returns 0 then the SW will continue to configure the node accordingly. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 171 +- net/bridge/br_private_mrp.h | 24 +++-- 2 files changed, 118 insertions(+), 77 deletions(-) diff --git a/net

[PATCH net-next v4 8/8] net: dsa: felix: Add support for MRP

2021-02-16 Thread Horatiu Vultur
Implement functions 'port_mrp_add', 'port_mrp_del', 'port_mrp_add_ring_role' and 'port_mrp_del_ring_role' to call the mrp functions from ocelot. Also all MRP frames that arrive to CPU on queue number OCELOT_MRP_CPUQ will be forward by the SW. Signed-off-by: Horatiu Vultur --- drivers/net/dsa

[PATCH net-next v4 6/8] net: mscc: ocelot: Add support for MRP

2021-02-16 Thread Horatiu Vultur
. - the HW should be able to do forwarding of MRP Test frames so the SW will not need to do this. So it would be able to have the role MRC without SW support. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/Makefile | 1 + drivers/net/ethernet/mscc/ocelot.c | 10

[PATCH net-next v4 5/8] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-02-16 Thread Horatiu Vultur
Check the return values of the br_mrp_switchdev function. In case of: - BR_MRP_NONE, return the error to userspace, - BR_MRP_SW, continue with SW implementation, - BR_MRP_HW, continue without SW implementation, Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 43

[PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-02-16 Thread Horatiu Vultur
and return 0 when sw_backup is true. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 465362d9d063..b7fc7d0f54e2 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h

[PATCH net-next v4 3/8] bridge: mrp: Add 'enum br_mrp_hw_support'

2021-02-16 Thread Horatiu Vultur
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev functions to allow the SW to detect the cases where HW can't implement the functionality or when SW is used as a backup. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h | 14 ++ 1 file changed, 14

[PATCH net-next v4 1/8] switchdev: mrp: Remove CONFIG_BRIDGE_MRP

2021-02-16 Thread Horatiu Vultur
Remove #IS_ENABLED(CONFIG_BRIDGE_MRP) from switchdev.h. This will simplify the code implements MRP callbacks and will be similar with the vlan filtering. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/net

[PATCH net-next v4 0/8] bridge: mrp: Extend br_mrp_switchdev_*

2021-02-16 Thread Horatiu Vultur
: - 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

Re: [PATCH net-next v3 5/5] net: mscc: ocelot: Add support for MRP

2021-02-10 Thread Horatiu Vultur
vsc7514 driver too for features that get added through DSA :) That is totally fair. I will do it in the next version :) > > On Tue, Feb 09, 2021 at 09:21:12PM +0100, Horatiu Vultur wrote: > > Add basic support for MRP. The HW will just trap all MRP frames on the > > ring ports t

Re: [PATCH net-next v3 0/5] bridge: mrp: Extend br_mrp_switchdev_*

2021-02-10 Thread Horatiu Vultur
The 02/10/2021 10:08, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Horatiu, > > On Tue, Feb 09, 2021 at 09:21:07PM +0100, Horatiu Vultur wrote: > > This patch series extends MRP switchdev

[PATCH net-next v3 2/5] bridge: mrp: Add 'enum br_mrp_hw_support'

2021-02-09 Thread Horatiu Vultur
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev functions to allow the SW to detect the cases where HW can't implement the functionality or when SW is used as a backup. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h | 14 ++ 1 file changed, 14

[PATCH net-next v3 5/5] net: mscc: ocelot: Add support for MRP

2021-02-09 Thread Horatiu Vultur
. - the HW should be able to do forwarding of MRP Test frames so the SW will not need to do this. So it would be able to have the role MRC without SW support. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot_net.c | 154 + drivers/net/ethernet/mscc

[PATCH net-next v3 0/5] bridge: mrp: Extend br_mrp_switchdev_*

2021-02-09 Thread Horatiu Vultur
- move repeated code in helper function - fix issue when deleting a node when sw_backup was true Horatiu Vultur (5): 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

[PATCH net-next v3 4/5] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-02-09 Thread Horatiu Vultur
Check the return values of the br_mrp_switchdev function. In case of: - BR_MRP_NONE, return the error to userspace, - BR_MRP_SW, continue with SW implementation, - BR_MRP_HW, continue without SW implementation, Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 43

[PATCH net-next v3 1/5] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-02-09 Thread Horatiu Vultur
and return 0 when sw_backup is true. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 6dcfc4c51a6e..067f259279e1 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h

[PATCH net-next v3 3/5] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-02-09 Thread Horatiu Vultur
the driver returns 0 then the SW will continue to configure the node accordingly. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 171 +- net/bridge/br_private_mrp.h | 24 +++-- 2 files changed, 118 insertions(+), 77 deletions(-) diff --git a/net

[PATCH net 2/2] switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT

2021-02-06 Thread Horatiu Vultur
Now that MRP started to use also SWITCHDEV_ATTR_ID_PORT_STP_STATE to notify HW, then SWITCHDEV_ATTR_ID_MRP_PORT_STAT is not used anywhere else, therefore we can remove it. Fixes: c284b545900830 ("switchdev: mrp: Extend switchdev API to offload MRP") Signed-off-by: Horatiu Vultur --- i

[PATCH net 1/2] bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state

2021-02-06 Thread Horatiu Vultur
itchdev") Fixes: 2f1a11ae11d222 ("bridge: mrp: Add MRP interface.") Reported-by: Rasmus Villemoes Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 9 ++--- net/bridge/br_mrp_switchdev.c | 7 +++ net/bridge/br_private_mrp.h | 3 +-- 3 files changed, 10 insertions(

[PATCH net 0/2] bridge: mrp: Fix br_mrp_port_switchdev_set_state

2021-02-06 Thread Horatiu Vultur
. [1] https://www.spinics.net/lists/netdev/msg714816.html Horatiu Vultur (2): bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT include/net/switchdev.h | 2 -- net/bridge/br_mrp.c | 9 ++--- net/bridge

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

2021-02-02 Thread Horatiu Vultur
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

[PATCH net-next v2 4/4] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-01-27 Thread Horatiu Vultur
Check the return values of the br_mrp_switchdev function. In case of: - BR_MRP_NONE, return the error to userspace, - BR_MRP_SW, continue with SW implementation, - BR_MRP_HW, continue without SW implementation, Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 43

[PATCH net-next v2 3/4] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-01-27 Thread Horatiu Vultur
the driver returns 0 then the SW will continue to configure the node accordingly. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 171 +- net/bridge/br_private_mrp.h | 24 +++-- 2 files changed, 118 insertions(+), 77 deletions(-) diff --git a/net

[PATCH net-next v2 1/4] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-01-27 Thread Horatiu Vultur
and return 0 when sw_backup is true. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 88fcac140966..3f236eaa4f3e 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h

[PATCH net-next v2 2/4] bridge: mrp: Add 'enum br_mrp_hw_support'

2021-01-27 Thread Horatiu Vultur
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev functions to allow the SW to detect the cases where HW can't implement the functionality or when SW is used as a backup. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h | 14 ++ 1 file changed, 14

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

2021-01-27 Thread Horatiu Vultur
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

Re: [PATCH net-next 3/4] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-01-26 Thread Horatiu Vultur
The 01/25/2021 19:06, Willem de Bruijn wrote: > On Sat, Jan 23, 2021 at 11:23 AM Horatiu Vultur > wrote: Hi Willem, > > > > This patch extends the br_mrp_switchdev functions to be able to have a > > better understanding what cause the issue and if the SW needs to

[PATCH net-next 1/4] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-01-23 Thread Horatiu Vultur
and return 0 when sw_backup is true. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 88fcac140966..3f236eaa4f3e 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h

[PATCH net-next 2/4] bridge: mrp: Add 'enum br_mrp_hw_support'

2021-01-23 Thread Horatiu Vultur
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev functions to allow the SW to detect better the cases where the HW can't implement this or when the SW is used as a backup. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h | 14 ++ 1 file changed, 14

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

2021-01-23 Thread Horatiu Vultur
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. Horatiu Vultur (4): switchdev: mrp: Extend

[PATCH net-next 4/4] bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev

2021-01-23 Thread Horatiu Vultur
Check the return values of the br_mrp_switchdev function. In case of: - BR_MRP_NONE, return the error to userspace, - BR_MRP_SW, continue with SW implemtation - BR_MRP_HW, continue without SW implemtation. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 43

[PATCH net-next 3/4] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-01-23 Thread Horatiu Vultur
accordingly. In this way is more clear when the SW needs to stop configuring the node, or when the SW is used as a backup or the HW can implement the functionality. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 189 +- net/bridge/br_private_mrp.h

Re: [PATCH net v2 1/2] net: mrp: fix definitions of MRP test packets

2021-01-21 Thread Horatiu Vultur
The 01/21/2021 21:40, Rasmus Villemoes wrote: It seems that is missing a Fixes tag, other than that it looks fine. Reviewed-by: Horatiu Vultur > > Wireshark says that the MRP test packets cannot be decoded - and the > reason for that is that there's a two-byte hole filled wit

Re: [PATCH net] net: mrp: use stp state as substitute for unimplemented mrp state

2021-01-19 Thread Horatiu Vultur
The 01/19/2021 16:52, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Tue, Jan 19, 2021 at 09:32:40AM +0100, Horatiu Vultur wrote: > > The 01/18/2021 21:27, Vladimir Oltean wrote: > > > EXTERNA

Re: [PATCH net] net: mrp: use stp state as substitute for unimplemented mrp state

2021-01-19 Thread Horatiu Vultur
The 01/18/2021 21:27, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Jan 18, 2021 at 09:20:36PM +0100, Horatiu Vultur wrote: > > The 01/18/2021 19:46, Vladimir Oltean wrote: > > > >

Re: [PATCH net] net: mrp: use stp state as substitute for unimplemented mrp state

2021-01-18 Thread Horatiu Vultur
The 01/18/2021 19:46, Vladimir Oltean wrote: > > On Mon, Jan 18, 2021 at 07:56:18PM +0100, Horatiu Vultur wrote: > > The reason was to stay away from STP, because you can't run these two > > protocols at the same time. Even though in SW, we reuse port's state. >

Re: [PATCH net] net: mrp: use stp state as substitute for unimplemented mrp state

2021-01-18 Thread Horatiu Vultur
The 01/18/2021 19:13, Rasmus Villemoes wrote: > Hi Rasmus, > When using MRP with hardware that does understand the concept of > blocked or forwarding ports, but not the full MRP offload, we > currently fail to tell the hardware what state it should put the port > in when the ring is closed -

Re: [RFC PATCH v2] net: bridge: igmp: Extend IGMP query to be per vlan

2021-01-13 Thread Horatiu Vultur
The 01/13/2021 14:15, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 12/01/2021 15:59, Horatiu Vultur wrote: > > Based on the comments of the previous version, we started to work on a > >

[RFC PATCH v2] net: bridge: igmp: Extend IGMP query to be per vlan

2021-01-12 Thread Horatiu Vultur
? Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_link.h | 1 + net/bridge/br_device.c | 2 +- net/bridge/br_input.c| 2 +- net/bridge/br_multicast.c| 505 ++- net/bridge/br_netlink.c | 9 +- net/bridge/br_private.h | 90

Re: [PATCH net 1/2] net: mrp: fix definitions of MRP test packets

2021-01-03 Thread Horatiu Vultur
The 12/28/2020 14:24, Jakub Kicinski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Wed, 23 Dec 2020 15:45:32 +0100 Rasmus Villemoes wrote: > > Wireshark says that the MRP test packets cannot be decoded - and the > > reason for that

Re: [PATCH net 1/2] net: mrp: fix definitions of MRP test packets

2020-12-23 Thread Horatiu Vultur
Hi Andrew, The 12/23/2020 19:41, Andrew Lunn wrote: > > > > @@ -96,7 +96,7 @@ struct br_mrp_ring_test_hdr { > > > __be16 state; > > > __be16 transitions; > > > __be32 timestamp; > > > -}; > > > +} __attribute__((__packed__)); > > > > Yes, I agree that this should be

Re: [PATCH net 0/2] MRP without hardware offload?

2020-12-23 Thread Horatiu Vultur
The 12/23/2020 15:45, Rasmus Villemoes wrote: > > Hi Horatiu and net folks Hi Rasmus, > > I'm having quite some trouble getting MRP working in a simple setup > involving three mv88e6250 switches in a ring, with one node set as > manager and the other two as clients. > > I'm reasonably

Re: [PATCH net 1/2] net: mrp: fix definitions of MRP test packets

2020-12-23 Thread Horatiu Vultur
The 12/23/2020 15:45, Rasmus Villemoes wrote: Hi Rasmus, > > Wireshark says that the MRP test packets cannot be decoded - and the > reason for that is that there's a two-byte hole filled with garbage > between the "transitions" and "timestamp" members. > > So Wireshark decodes the two garbage

Re: [RFC net-next] net: bridge: igmp: Extend IGMP query with vlan support

2020-12-11 Thread Horatiu Vultur
The 12/11/2020 11:46, Nikolay Aleksandrov wrote: > > On 11/12/2020 11:26, Horatiu Vultur wrote: > > This patch tries to add vlan support to IGMP queries. > > It extends the function 'br_ip4_multicast_alloc_query' to add > > also a vlan tag if vlan is enabled. Theref

[RFC net-next] net: bridge: igmp: Extend IGMP query with vlan support

2020-12-11 Thread Horatiu Vultur
. But I am curious if this is the way to go forward or is there a different way of implementing this? Signed-off-by: Horatiu Vultur --- net/bridge/br_multicast.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/net/bridge/br_multicast.c b/net

[PATCH net-next v2] bridge: mrp: Implement LC mode for MRP

2020-11-24 Thread Horatiu Vultur
rules on how to forward this frame. Acked-by: Nikolay Aleksandrov Signed-off-by: Horatiu Vultur --- v1 -> v2: - remove struct 'br_mrp_in_link_status_hdr' as is unused --- include/uapi/linux/mrp_bridge.h | 1 + net/bridge/br_mrp.c | 18 +++--- 2 files changed,

Re: [PATCH net-next] bridge: mrp: Implement LC mode for MRP

2020-11-23 Thread Horatiu Vultur
The 11/23/2020 14:05, Jakub Kicinski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, 23 Nov 2020 16:25:53 +0200 Nikolay Aleksandrov wrote: > > >>> @@ -156,4 +157,10 @@ struct br_mrp_in_link_hdr { > > >>> __be16 interval; > >

Re: [PATCH net-next] bridge: mrp: Implement LC mode for MRP

2020-11-23 Thread Horatiu Vultur
The 11/23/2020 14:13, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 23/11/2020 13:14, Horatiu Vultur wrote: > > Extend MRP to support LC mode(link check) for the interconnect port. >

[PATCH net-next] bridge: mrp: Implement LC mode for MRP

2020-11-23 Thread Horatiu Vultur
and extends existing rules on how to forward this frame. Signed-off-by: Horatiu Vultur --- include/uapi/linux/mrp_bridge.h | 7 +++ net/bridge/br_mrp.c | 18 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/mrp_bridge.h b

[PATCH net-next] bridge: mrp: Use hlist_head instead of list_head for mrp

2020-11-06 Thread Horatiu Vultur
Replace list_head with hlist_head for MRP list under the bridge. There is no need for a circular list when a linear list will work. This will also decrease the size of 'struct net_bridge'. Signed-off-by: Horatiu Vultur --- net/bridge/br_device.c | 2 +- net/bridge/br_mrp.c | 26

Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

2020-09-26 Thread Horatiu Vultur
The 09/26/2020 15:37, Vladimir Oltean wrote: > > Hi Horatiu, Hi Vladimir, > > On Sat, Sep 26, 2020 at 01:20:02PM +0200, Horatiu Vultur wrote: > > To be honest, I don't remember precisely. I will need to setup a board > > and see exactly. But from what I remember: &

Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

2020-09-26 Thread Horatiu Vultur
The 09/25/2020 02:39, Vladimir Oltean wrote: > Hi Vladimir, > Hi Horatiu, > > On Thu, Apr 23, 2020 at 10:29:48AM +0200, Horatiu Vultur wrote: > > > > +static const struct vcap_props vcap_is2 = { > > > > + .name = "IS2", > > >

Re: [PATCH RFC 0/7] net: bridge: cfm: Add support for Connectivity Fault Management(CFM)

2020-09-06 Thread Horatiu Vultur
etlink. The kernel will try to offload > > the requests to the HW via switchdev API (not implemented yet). > > > > Any notification emitted by CFM from the kernel can be monitored in user > > space by starting 'cfm_server' program. > > > > Currently this 'cfm' and 'cf

Re: [PATCH net-next v4 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN

2020-07-14 Thread Horatiu Vultur
The 07/14/2020 18:33, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 14/07/2020 18:07, Horatiu Vultur wrote: > > The 07/14/2020 16:29, Nikolay Aleksandrov wrote: > >> EXTERNAL EMAIL:

Re: [PATCH net-next v4 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN

2020-07-14 Thread Horatiu Vultur
The 07/14/2020 16:29, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 14/07/2020 10:34, Horatiu Vultur wrote: > > This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which &g

[PATCH net-next v4 04/12] bridge: mrp: Extend br_mrp for MRP interconnect

2020-07-14 Thread Horatiu Vultur
part of the MRP_InTest frames. - the interconnect role, which can be MIM or MIC. - the interconnect state, which can be open or closed. - the interconnect delayed_work for sending MRP_InTest frames and check for lost of continuity. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h

[PATCH net-next v4 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN

2020-07-14 Thread Horatiu Vultur
This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which allows to notify the userspace when the node lost the contiuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_link.h | 1 + net/bridge/br_netlink.c| 3 +++ tools/include/uapi

[PATCH net-next v4 10/12] bridge: uapi: mrp: Extend MRP_INFO attributes for interconnect status

2020-07-14 Thread Horatiu Vultur
Extend the existing MRP_INFO to return status of MRP interconnect. In case there is no MRP interconnect on the node then the role will be disabled so the other attributes can be ignored. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_bridge.h | 5 + 1 file changed, 5 insertions

[PATCH net-next v4 09/12] bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect

2020-07-14 Thread Horatiu Vultur
This patch extends the existing MRP netlink interface with the following attributes: IFLA_BRIDGE_MRP_IN_ROLE, IFLA_BRIDGE_MRP_IN_STATE and IFLA_BRIDGE_MRP_START_IN_TEST. These attributes are similar with their ring attributes but they apply to the interconnect port. Signed-off-by: Horatiu Vultur

[PATCH net-next v4 11/12] bridge: mrp: Extend br_mrp_fill_info

2020-07-14 Thread Horatiu Vultur
This patch extends the function br_mrp_fill_info to return also the status for the interconnect ring. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_netlink.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/bridge/br_mrp_netlink.c b/net/bridge/br_mrp_netlink.c

[PATCH net-next v4 08/12] bridge: mrp: Implement the MRP Interconnect API

2020-07-14 Thread Horatiu Vultur
is happening in the kernel and is done by MRP instances. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 570 ++-- net/bridge/br_private_mrp.h | 4 + 2 files changed, 543 insertions(+), 31 deletions(-) diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c

[PATCH net-next v4 06/12] bridge: mrp: Add br_mrp_in_port_open function

2020-07-14 Thread Horatiu Vultur
This function notifies the userspace when the node lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_netlink.c | 22 ++ net/bridge/br_private_mrp.h | 1 + 2 files changed, 23 insertions(+) diff --git a/net/bridge/br_mrp_netlink.c

[PATCH net-next v4 02/12] bridge: uapi: mrp: Extend MRP attributes for MRP interconnect

2020-07-14 Thread Horatiu Vultur
frames can be missed before declaring the interconnect ring open and the period which represents for how long to send MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_bridge.h | 53 + include/uapi/linux/mrp_bridge.h | 38

[PATCH net-next v4 07/12] bridge: switchdev: mrp: Extend MRP API for switchdev for MRP Interconnect

2020-07-14 Thread Horatiu Vultur
Implement the MRP API for interconnect switchdev. Similar with the other br_mrp_switchdev function, these function will just eventually call the switchdev functions: switchdev_port_obj_add/del. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 62

[PATCH net-next v4 03/12] bridge: mrp: Extend bridge interface

2020-07-14 Thread Horatiu Vultur
This patch adds a new flag(BR_MRP_LOST_IN_CONT) to the net bridge ports. This bit will be set when the port lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/linux/if_bridge.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/if_bridge.h b

[PATCH net-next v4 05/12] bridge: mrp: Rename br_mrp_port_open to br_mrp_ring_port_open

2020-07-14 Thread Horatiu Vultur
This patch renames the function br_mrp_port_open to br_mrp_ring_port_open. In this way is more clear that a ring port lost the continuity because there will be also a br_mrp_in_port_open. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 6 +++--- net/bridge/br_mrp_netlink.c | 2

[PATCH net-next v4 00/12] bridge: mrp: Add support for interconnect ring

2020-07-14 Thread Horatiu Vultur
structures not to contain holes - stop sending MRP_InTest frames when the MRP instance is deleted Horatiu Vultur (12): switchdev: mrp: Extend switchdev API for MRP Interconnect bridge: uapi: mrp: Extend MRP attributes for MRP interconnect bridge: mrp: Extend bridge interface bridge: mrp

[PATCH net-next v4 01/12] switchdev: mrp: Extend switchdev API for MRP Interconnect

2020-07-14 Thread Horatiu Vultur
ring changes it states to open or closed. SWITCHDEV_OBJ_ID_IN_TEST_MRP: This is used to start/stop sending MRP_InTest frames on all MRP ports. This is called only on nodes that have the interconnect role MIM. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 38

Re: [PATCH net-next v3 08/12] bridge: mrp: Implement the MRP Interconnect API

2020-07-13 Thread Horatiu Vultur
The 07/13/2020 21:54, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 12/07/2020 17:05, Horatiu Vultur wrote: > > Thie patch adds support for MRP Interconnect. Similar with the MRP ring, > >

[PATCH net-next v3 11/12] bridge: mrp: Extend br_mrp_fill_info

2020-07-12 Thread Horatiu Vultur
This patch extends the function br_mrp_fill_info to return also the status for the interconnect ring. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_netlink.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/bridge/br_mrp_netlink.c b/net/bridge/br_mrp_netlink.c

[PATCH net-next v3 02/12] bridge: uapi: mrp: Extend MRP attributes for MRP interconnect

2020-07-12 Thread Horatiu Vultur
frames can be missed before declaring the interconnect ring open and the period which represents for how long to send MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_bridge.h | 53 + include/uapi/linux/mrp_bridge.h | 38

[PATCH net-next v3 08/12] bridge: mrp: Implement the MRP Interconnect API

2020-07-12 Thread Horatiu Vultur
is happening in the kernel and is done by MRP instances. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 570 ++-- net/bridge/br_private_mrp.h | 4 + 2 files changed, 543 insertions(+), 31 deletions(-) diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c

[PATCH net-next v3 10/12] bridge: uapi: mrp: Extend MRP_INFO attributes for interconnect status

2020-07-12 Thread Horatiu Vultur
Extend the existing MRP_INFO to return status of MRP interconnect. In case there is no MRP interconnect on the node then the role will be disabled so the other attributes can be ignored. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_bridge.h | 5 + 1 file changed, 5 insertions

[PATCH net-next v3 05/12] bridge: mrp: Rename br_mrp_port_open to br_mrp_ring_port_open

2020-07-12 Thread Horatiu Vultur
This patch renames the function br_mrp_port_open to br_mrp_ring_port_open. In this way is more clear that a ring port lost the continuity because there will be also a br_mrp_in_port_open. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 6 +++--- net/bridge/br_mrp_netlink.c | 2

[PATCH net-next v3 06/12] bridge: mrp: Add br_mrp_in_port_open function

2020-07-12 Thread Horatiu Vultur
This function notifies the userspace when the node lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_netlink.c | 22 ++ net/bridge/br_private_mrp.h | 1 + 2 files changed, 23 insertions(+) diff --git a/net/bridge/br_mrp_netlink.c

[PATCH net-next v3 01/12] switchdev: mrp: Extend switchdev API for MRP Interconnect

2020-07-12 Thread Horatiu Vultur
ring changes it states to open or closed. SWITCHDEV_OBJ_ID_IN_TEST_MRP: This is used to start/stop sending MRP_InTest frames on all MRP ports. This is called only on nodes that have the interconnect role MIM. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 38

[PATCH net-next v3 07/12] bridge: switchdev: mrp: Extend MRP API for switchdev for MRP Interconnect

2020-07-12 Thread Horatiu Vultur
Implement the MRP API for interconnect switchdev. Similar with the other br_mrp_switchdev function, these function will just eventually call the switchdev functions: switchdev_port_obj_add/del. Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp_switchdev.c | 62

[PATCH net-next v3 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN

2020-07-12 Thread Horatiu Vultur
This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which allows to notify the userspace when the node lost the contiuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/uapi/linux/if_link.h | 1 + net/bridge/br_netlink.c| 3 +++ tools/include/uapi

[PATCH net-next v3 09/12] bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect

2020-07-12 Thread Horatiu Vultur
This patch extends the existing MRP netlink interface with the following attributes: IFLA_BRIDGE_MRP_IN_ROLE, IFLA_BRIDGE_MRP_IN_STATE and IFLA_BRIDGE_MRP_START_IN_TEST. These attributes are similar with their ring attributes but they apply to the interconnect port. Signed-off-by: Horatiu Vultur

[PATCH net-next v3 00/12] bridge: mrp: Add support for interconnect ring

2020-07-12 Thread Horatiu Vultur
if the role is disabled and don't allow to set a different interconnect port if there is already one. v2: - rearrange structures not to contain holes - stop sending MRP_InTest frames when the MRP instance is deleted Horatiu Vultur (12): switchdev: mrp: Extend switchdev API for MRP

[PATCH net-next v3 03/12] bridge: mrp: Extend bridge interface

2020-07-12 Thread Horatiu Vultur
This patch adds a new flag(BR_MRP_LOST_IN_CONT) to the net bridge ports. This bit will be set when the port lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur --- include/linux/if_bridge.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/if_bridge.h b

[PATCH net-next v3 04/12] bridge: mrp: Extend br_mrp for MRP interconnect

2020-07-12 Thread Horatiu Vultur
part of the MRP_InTest frames. - the interconnect role, which can be MIM or MIC. - the interconnect state, which can be open or closed. - the interconnect delayed_work for sending MRP_InTest frames and check for lost of continuity. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h

  1   2   3   >