RE: [EXT] Re: [PATCH net-next 5/7] net: marvell: prestera: add LAG support

2021-02-10 Thread Mickey Rachamim


> Until that day arrives, are there any chances of Marvell opening up CPSS in 
> the same way DSDT was re-licensed some years back?
The CPSS code is available to everyone on Marvell Extranet (Requires simple 
registration process)
Anyway, as the transition process will progress - it will be less required.

> Being able to clone github.com/Marvell-switching/prestera-firmware (or
> whatever) and build the firmware from source would go a long way to alleviate 
> my fears at least.
I understand your concerns but at this stage - we also concerned about others 
that might build not reliable FW images.
I also agree that at some point we should ensure most of the concerns are being 
addressed.

Mickey.



RE: [EXT] Re: [PATCH net-next 5/7] net: marvell: prestera: add LAG support

2021-02-10 Thread Mickey Rachamim

> It will be interesting to see how well you manage to handle the 'split brain' 
> problem.
Right 😊 this is the challenge per each feature to ensure no "register" 
corruption.
The PP itself provides us the right facilities and by driver-wise - we 
refactoring the driver almost from scratch.

> I guess stats would be a good place to start...
Right, mostly the MAC MIB counters. 

Mickey



RE: [EXT] Re: [PATCH net-next 5/7] net: marvell: prestera: add LAG support

2021-02-09 Thread Mickey Rachamim
Hi Andrew, Jakub, Tobias,

On Tuesday, February 9, 2021 7:35 PM Jakub Kicinski wrote:
> Sounds like we have 3 people who don't like FW-heavy designs dominating the 
> kernel - this conversation can only go one way. 
> Marvell, Plvision anything to share? AFAIU the values of Linux kernel are 
> open source, healthy community, empowering users. With the SDK on the 
> embedded CPU your driver does not seem to tick any of these boxes.

I'll try to share Marvell's insight and plans regarding our Prestera drivers;
 
We do understand the importance and the vision behind the open-source community 
- while being committed to quality, functionality and the developers/end-users.

We started working on the Prestera driver in Q2 2019. it took us more than a 
year to get the first approved driver into 5.10, and we just started.
Right at the beginning - we implemented PP function into the Kernel driver like 
the SDMA operation (This is the RX/TX DMA engine). 
Yet, the FW itself - is an SW package that supports many Marvell Prestera 
Switching families of devices - this is a significant SW package that will take 
many working years to adapt to the Kernel environment.
We do plan to port more and more PP functions as Kernel drivers along the way.
 
We also are working with the community to extend Kernel functionality with a 
new feature beneficial to all Kernel users (e.g. Devlink changes) and we will 
continue to do it.
By extending the Prestera driver to in-kernel implementation with more PP 
features - we will simplify the FW logic and enables cost-effective solutions 
to the market/developers.

Regards,
Mickey.



RE: [EXT] Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-20 Thread Mickey Rachamim
External Email

Hi Andrew, 
My name is Mickey and I'm the SW group manager in Marvell working on the 
Switchdev drivers for the Prestera Switching family.
In addition to Vadym's reply, please have my comments inline;

On Fri, Aug 14, 2020 at 03:18:15PM +0200, Andrew Lunn wrote:
> > > > > Currently
> > > > > 
> > > > > compatible = "marvell,prestera"
> > > > > 
> > > > > is used as default, so may be
> > > > > 
> > > > > you mean to support few matching including particular silicon too, 
> > > > > like ?
> > > > > 
> > > > > 
> > > > > compatible = "marvell,prestera"
> > > > > compatible = "marvell,prestera-ac3x"
> > > > > 
> > > > > Would you please give an example ?
> > > > 
> > > > AFAICT "Prestera" is the general name for the Marvell 
> > > > enterprise/data-centre silicon, comparable to the "LinkStreet"
> > > > designation for their lower end switching. The mv88e* drivers do 
> > > > not mention LinkStreet in their compatible strings at all, 
> > > > choosing instead to refer to chip IDs (I see mv88e6085, mv88e6190 + 
> > > > mv88e6250).
> > > > 
> > > > I do not have enough familiarity with the Prestera range to be 
> > > > able to tell what commonality there is between the different 
> > > > versions (it appears you need an NDA to get hold of the 
> > > > programming references), but even just looking at your driver and 
> > > > the vendor code for the BobCat it seems that AlleyCat3 uses an 
> > > > extended DSA header format, and requires a firmware with message 
> > > > based access, in comparison to the BobCat which uses register poking.
> > > > 
> > > > Based on that I'd recommend not using the bare "marvell,prestera"
> > > > compatible string, but instead something more specific.
> > > > "marvell,prestera-ac3x" seems like a suitable choice, assuming 
> > > > that's how these chips are named/generally referred to.
> > > > 
> > > > Also I'd expand your Kconfig information to actually include 
> > > > "Marvell Prestera 98DX326x" as that's the only supported chip range at 
> > > > present.
> > > > 
> > > 
> > > Yes, Prestera covers more range of devices. But it is planning to 
> > > cover other devices too, and currently there is no device-specific 
> > > DTS properties which are used in this version, but only the generic 
> > > one - since only the MAC address node.
> > > 
> > > I mean that if there will be other Prestera devices supported then 
> > > it will require to extend the DTS matching string in the driver just 
> > > to support the same generic DTS properties for new device.
> > > 
> > > Anyway I will rise and discuss this question.
> > 
> > Hi Vadym
> > 
> > Lets start with how mv88e6xxx does this. The switches have ID 
> > registers. Once you have read the ID registers, you know what device 
> > you have, and you can select device specific code as needed. However, 
> > these ID registers are in three different locations, depending on the 
> > chip family. So the compatible string is all about where to read the 
> > ID from, not about what specific chip is. So most device tree bindings 
> > say "marvell,mv88e6085", but the 6390 family use "marvell,mv88e6190"
> > for example.
> > 
> > This naming scheme is actually odd compared to others. And that 
> > oddness causes confusion. But it avoids a few problems. If you have 
> > per chip compatible strings, what do you do when it conflicts with the 
> > ID registers. If from day 1 you validate the compatible string against 
> > the ID register and fail the probe if it is incorrect, you are O.K. 
> > But if you decide to add this validation later, you are going to find 
> > a number of device tree blobs which have the wrong compatible string. 
> > Do you fail the probe on boards which have worked?
> > 
> > So what to do with this driver?
> > 
> > Does the prestera have ID registers? Are you using them in the driver?
> > 
> 
> ASIC device specific handling is serviced by the firmware, current driver's 
> logic does not have PP specific code and relies on the FW ABI which is 
> PP-generic, and it looks like this how it should work for boards with other 
> ASICs, of course these boards should follow the Marvell's Switchdev board 
> design.
> 

All Marvell Prestera (DX) devices are all based on CPSS SDK. This is one SDK 
and one build procedure that enables the Prestera driver to support all 
devices. 
This unified support enables us (and our customers) to have one SW 
implementation that will support variety of Prestera devices in same 
build/real-time 
execution. 
This approach also lead us with the implementation of the Prestera Switchdev 
drivers.
As having detailed familiarity (20Y) with Marvell Prestera old/current/future 
devices - 
this approach will be kept strictly also on the future.

> > Marvell is not particularly good at backwards compatibility. Does your 
> > compatible string give you enough wiggle room you can easily introduce 
> > another compatible string in order to find the ID registers when they 
> > move?
> > 
> > 

[PATCH] MAINTAINERS: Add entry for Marvell Prestera Ethernet Switch driver

2020-12-02 Thread Mickey Rachamim
Add maintainers info for new Marvell Prestera Ethernet switch driver.

Signed-off-by: Mickey Rachamim 
---
 MAINTAINERS | 9 +
 1 file changed, 9 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a7bdebf955bb..04a27eb89428 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10540,6 +10540,15 @@ S: Supported
 F: Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
 F: drivers/net/ethernet/marvell/octeontx2/af/
 
+MARVELL PRESTERA ETHERNET SWITCH DRIVER
+M: Vadym Kochan 
+M: Taras Chornyi 
+M: Mickey Rachamim 
+L: net...@vger.kernel.org
+S: Supported
+W: http://www.marvell.com
+F: drivers/net/ethernet/marvell/prestera/
+
 MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
 M: Nicolas Pitre 
 S: Odd Fixes
-- 
2.17.1