[PATCH] Fix partial warnings of checkpatch.pl for ipx_route.c

2018-03-05 Thread Horatiu Vultur
Fix partial warnings of checkpatch.pl for ipx_route.c Signed-off-by: Horatiu Vultur --- drivers/staging/ipx/ipx_route.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ipx/ipx_route.c b/drivers/staging/ipx/ipx_route.c index 3cf93aa9..bd26fbb 100644

[PATCH] Fix partial warnings of checkpatch.pl for drivers/staging/greybus/i2c.c

2018-03-06 Thread Horatiu Vultur
Fix partial warnings of checkpatch.pl for drivers/staging/greybus/i2c.c Signed-off-by: Horatiu Vultur --- drivers/staging/greybus/i2c.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c index 58a37de

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

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

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

2021-02-16 Thread Horatiu Vultur
false 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/switch

[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 change

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

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

[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 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 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-

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

2021-02-16 Thread Horatiu Vultur
_ROLE which calls 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/

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

2021-02-16 Thread Horatiu Vultur
the frames to CPU. In case 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

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

[Resend] arch: mips: Fix initrd_start and initrd_end when read from DT

2019-04-16 Thread Horatiu Vultur
and not having enable extended virtual address and in that case convert them back to physical addresses that point in kseg0 as expected. Signed-off-by: Horatiu Vultur --- arch/mips/kernel/setup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips

Re: [Resend] arch: mips: Fix initrd_start and initrd_end when read from DT

2019-04-24 Thread Horatiu Vultur
Hi Paul, Thank you for your detail explanation. There are few observations below. The 04/19/2019 20:55, Paul Burton wrote: > External E-Mail > > > Hi Horatiu, > > On Tue, Apr 16, 2019 at 12:18:20PM +0200, Horatiu Vultur wrote: > > When the bootloader passes arguments

[PATCH net-next] MIPS: generic: Add switchdev, pinctrl and fit to ocelot_defconfig

2019-04-03 Thread Horatiu Vultur
Some of the configuration were not selected by default anymore, therefore enable them again. Also remove some configs which are used for MSCC Ocelot. Signed-off-by: Horatiu Vultur --- arch/mips/configs/generic/board-ocelot.config | 19 +++ 1 file changed, 19 insertions(+) diff

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 t

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 po

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 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 used > > as

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 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 > > poss

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

2021-02-18 Thread Horatiu Vultur
ed-by: Vladimir 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_n

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

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 v3 3/5] bridge: mrp: Extend br_mrp_switchdev to detect better the errors

2021-02-09 Thread Horatiu Vultur
the frames to CPU. In case 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

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

2021-02-09 Thread Horatiu Vultur
false 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/switch

[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 0/5] bridge: mrp: Extend br_mrp_switchdev_*

2021-02-09 Thread Horatiu Vultur
move some of the comments - 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 det

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

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

[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 change

[PATCH net-next v2 1/3] bridge: mrp: Update MRP frame type

2020-05-30 Thread Horatiu Vultur
Replace u16/u32 with be16/be32 in the MRP frame types. This fixes sparse warnings like: warning: cast to restricted __be16 Signed-off-by: Horatiu Vultur --- include/uapi/linux/mrp_bridge.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/uapi

[PATCH net-next v2 0/3] bridge: mrp: Add support for MRA role

2020-05-30 Thread Horatiu Vultur
fixes sparse warnings - fix parsing of prio attribute Horatiu Vultur (3): bridge: mrp: Update MRP frame type bridge: mrp: Set the priority of MRP instance bridge: mrp: Add support for role MRA include/net/switchdev.h | 2 + include/uapi/linux/if_bridge.h | 4 + include/uapi

[PATCH net-next v2 3/3] bridge: mrp: Add support for role MRA

2020-05-30 Thread Horatiu Vultur
would get the MRM role and start to send MRP_Test frames. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 1 + include/uapi/linux/if_bridge.h | 2 + include/uapi/linux/mrp_bridge.h | 38 ++ net/bridge/br_mrp.c | 125 +++- net

[PATCH net-next v2 2/3] bridge: mrp: Set the priority of MRP instance

2020-05-30 Thread Horatiu Vultur
Each MRP instance has a priority, a lower value means a higher priority. The priority of MRP instance is stored in MRP_Test frame in this way all the MRP nodes in the ring can see other nodes priority. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h| 1 + include/uapi/linux

[PATCH 2/3] switchdev: mrp: Remove the variable mrp_ring_state

2020-05-20 Thread Horatiu Vultur
Remove the variable mrp_ring_state from switchdev_attr because is not used anywhere. The ring state is set using SWITCHDEV_OBJ_ID_RING_STATE_MRP. Fixes: c284b5459008 ("switchdev: mrp: Extend switchdev API to offload MRP") Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 1

[PATCH 1/3] bridge: mrp: Add br_mrp_unique_ifindex function

2020-05-20 Thread Horatiu Vultur
It is not allow to have the same net bridge port part of multiple MRP rings. Therefore add a check if the port is used already in a different MRP. In that case return failure. Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the switchdev API") Signed-off-by: Horatiu Vultur

[PATCH 3/3] bridge: mrp: Restore port state when deleting MRP instance

2020-05-20 Thread Horatiu Vultur
When a MRP instance is deleted, then restore the port according to the bridge state. If the bridge is up then the ports will be in forwarding state otherwise will be in disabled state. Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the switchdev API") Signed-off-by: Hora

[PATCH 0/3] net: bridge: mrp: Add small fixes to MRP

2020-05-20 Thread Horatiu Vultur
This patch series adds small fixes to MRP implementation. The following are fixed in this patch series: - now is not allow to add the same port to multiple MRP rings - remove unused variable - restore the port state according to the bridge state when the MRP instance is deleted Horatiu Vultur

Re: [PATCH 1/3] bridge: mrp: Add br_mrp_unique_ifindex function

2020-05-21 Thread Horatiu Vultur
The 05/21/2020 11:16, Nikolay Aleksandrov wrote: > On 20/05/2020 16:09, Horatiu Vultur wrote: > > It is not allow to have the same net bridge port part of multiple MRP > > rings. Therefore add a check if the port is used already in a different > > MRP. In that case return f

Re: [PATCH 1/3] bridge: mrp: Add br_mrp_unique_ifindex function

2020-05-21 Thread Horatiu Vultur
The 05/21/2020 19:58, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 21/05/2020 21:49, Horatiu Vultur wrote: > > The 05/21/2020 11:16, Nikolay Aleksandrov wrote: > >> On 20/05/2020

[PATCH v2 2/3] switchdev: mrp: Remove the variable mrp_ring_state

2020-05-21 Thread Horatiu Vultur
Remove the variable mrp_ring_state from switchdev_attr because is not used anywhere. The ring state is set using SWITCHDEV_OBJ_ID_RING_STATE_MRP. Fixes: c284b5459008 ("switchdev: mrp: Extend switchdev API to offload MRP") Acked-by: Ivan Vecera Signed-off-by: Horatiu Vultur --- i

[PATCH v2 1/3] bridge: mrp: Add br_mrp_unique_ifindex function

2020-05-21 Thread Horatiu Vultur
It is not allow to have the same net bridge port part of multiple MRP rings. Therefore add a check if the port is used already in a different MRP. In that case return failure. Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the switchdev API") Signed-off-by: Horatiu Vultur

[PATCH v2 0/3] bridge: mrp: Add br_mrp_unique_ifindex function

2020-05-21 Thread Horatiu Vultur
rtnl_dereference instead of rcu_dereference in the first patch Horatiu Vultur (3): bridge: mrp: Add br_mrp_unique_ifindex function switchdev: mrp: Remove the variable mrp_ring_state bridge: mrp: Restore port state when deleting MRP instance include/net/switchdev.h | 1 - net/bridge/br_mrp.c

[PATCH v2 3/3] bridge: mrp: Restore port state when deleting MRP instance

2020-05-21 Thread Horatiu Vultur
leksandrov Signed-off-by: Horatiu Vultur --- net/bridge/br_mrp.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c index 854e31bf0151e..528d767eb026f 100644 --- a/net/bridge/br_mrp.c +++ b/net/bridge/br_mrp.c @@ -223,6 +223,7 @@ s

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

2020-12-11 Thread Horatiu Vultur
functional. 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_multica

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 enabl

[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: [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 > >

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 - res

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. &g

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-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: > > > EXTERNAL E

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 by

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 confiden

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 packed

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

2021-03-18 Thread Horatiu Vultur
NULL 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 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 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 --

[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

[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 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 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

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. > >

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; > >

[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 file

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) > > > >

[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: 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

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 fille

[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
r switchdev") 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 insert

[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 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

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 is

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

2021-01-23 Thread Horatiu Vultur
ntinue to configure the node 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 +

[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 1/4] switchdev: mrp: Extend ring_role_mrp and in_role_mrp

2021-01-23 Thread Horatiu Vultur
false 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/switch

[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 change

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

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

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

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

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

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

[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 change

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

2021-01-27 Thread Horatiu Vultur
the frames to CPU. In case 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

[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] 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 v3 1/2] net: core: Notify on changes to dev->promiscuity.

2019-08-29 Thread Horatiu Vultur
cuity value. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h | 1 + net/core/dev.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index aee86a1..14b1617 100644 --- a/include/net/switchdev.h +++ b/include/net/switch

[PATCH v3 2/2] net: mscc: Implement promisc mode.

2019-08-29 Thread Horatiu Vultur
dge and promiscuity is > 0 then add then add the port in promisc mode otherwise don't. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/

[PATCH v3 0/2] net: core: Notify on changes to dev->promiscuity

2019-08-29 Thread Horatiu Vultur
ETIF_F_HW_BR_CAP when setting the network port in promisc mode. Horatiu Vultur (2): net: core: Notify on changes to dev->promiscuity. net: mscc: Implement promisc mode. drivers/net/ethernet/mscc/ocelot.c | 47 ++ include/net/switchdev.h|

Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity.

2019-08-29 Thread Horatiu Vultur
r is changed. > > > >The notification doesn't use any switchdev_attr attribute because in the > >notifier callbacks is it possible to get the dev and read directly > >the promiscuity value. > > > >Signed-off-by: Horatiu Vultur > >--- > > includ

Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity.

2019-08-29 Thread Horatiu Vultur
any switchdev_attr attribute because in the > >> >notifier callbacks is it possible to get the dev and read directly > >> >the promiscuity value. > >> > > >> >Signed-off-by: Horatiu Vultur > >> >--- > >> > include/net/switchdev.h

Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity.

2019-08-29 Thread Horatiu Vultur
The 08/29/2019 14:55, Ivan Vecera wrote: > External E-Mail > > > On Thu, 29 Aug 2019 14:44:14 +0200 > Horatiu Vultur wrote: > > > When a port is added to a bridge, then the port gets in promisc mode. > > But in our case the HW has bridge capabilities so it is no

Re: [PATCH 0/3] Add NETIF_F_HW_BRIDGE feature

2019-08-23 Thread Horatiu Vultur
The 08/23/2019 01:26, Nikolay Aleksandrov wrote: > External E-Mail > > > On 8/23/19 1:09 AM, Nikolay Aleksandrov wrote: > > On 22/08/2019 22:07, Horatiu Vultur wrote: > >> Current implementation of the SW bridge is setting the interfaces in > >> promisc m

Re: [PATCH 1/3] net: Add HW_BRIDGE offload feature

2019-08-23 Thread Horatiu Vultur
The 08/22/2019 22:08, Andrew Lunn wrote: > External E-Mail > > > > +/* Determin if the SW bridge can be offloaded to HW. Return true if all > > + * the interfaces of the bridge have the feature NETIF_F_HW_SWITCHDEV set > > + * and have the same netdev_ops. > > + */ > > Hi Horatiu > > Why do you

Re: [PATCH 0/3] Add NETIF_F_HW_BRIDGE feature

2019-08-23 Thread Horatiu Vultur
Hi Andrew The 08/23/2019 15:25, Andrew Lunn wrote: > External E-Mail > > > > > > Why do the devices have to be from the same driver ? > > After seeing yours and Andrews comments I realize that I try to do two > > things, but I have only explained one of them. > > > > Here is what I was trying t

[PATCH net-next 0/2] Add hw offload of TC flower on MSCC Ocelot

2019-05-27 Thread Horatiu Vultur
ob Herring CC: Mark Rutland CC: Ralf Baechle CC: Paul Burton CC: James Hogan CC: "David S. Miller" CC: linux-m...@vger.kernel.org CC: devicet...@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: net...@vger.kernel.org Horatiu Vultur (2): net: mscc: ocelot: Add support for tcam

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

2019-05-27 Thread Horatiu Vultur
Add ACL support using the TCAM. Using ACL it is possible to create rules in hardware to filter/redirect frames. Signed-off-by: Horatiu Vultur --- arch/mips/boot/dts/mscc/ocelot.dtsi | 5 +- drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/ocelot.c | 13

[PATCH net-next 2/2] net: mscc: ocelot: Hardware ofload for tc flower filter

2019-05-27 Thread Horatiu Vultur
: trap drop These filters are supported only on the ingress schedulare. Add: tc qdisc add dev eth3 ingress tc filter ad dev eth3 parent : ip_proto ip flower \ ip_proto tcp dst_port 80 action drop Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/Makefile| 2 +- drivers

Re: [PATCH net-next] MIPS: generic: Add switchdev, pinctrl and fit to ocelot_defconfig

2019-04-04 Thread Horatiu Vultur
Hi Paul, The 04/03/2019 23:23, Paul Burton wrote: > External E-Mail > > > Hi Horatiu, > > On Wed, Apr 03, 2019 at 05:27:36PM +0200, Horatiu Vultur wrote: > > diff --git a/arch/mips/configs/generic/board-ocelot.config > > b/arch/mips/configs/generic/board-o

[PATCH v2] MIPS: generic: Add switchdev, pinctrl and fit to ocelot_defconfig

2019-04-04 Thread Horatiu Vultur
Some of the configuration were not selected by default anymore, therefore enable them again. Also remove some configs which are used for MSCC Ocelot. Signed-off-by: Horatiu Vultur --- arch/mips/configs/generic/board-ocelot.config | 8 1 file changed, 8 insertions(+) diff --git a/arch

  1   2   3   >