Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-10-03 Thread Andrew Lunn
On Tue, Oct 03, 2017 at 10:07:41AM +, Razvan Stefanescu wrote:
> > -Original Message-
> > From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org]
> > On Behalf Of Andrew Lunn
> > Sent: Tuesday, September 19, 2017 3:18 PM
> > To: Razvan Stefanescu <razvan.stefane...@nxp.com>
> > Cc: de...@driverdev.osuosl.org; Ruxandra Ioana Radulescu
> > <ruxandra.radule...@nxp.com>; a...@arndb.de; gre...@linuxfoundation.org;
> > Alexandru Marginean <alexandru.margin...@nxp.com>; linux-
> > ker...@vger.kernel.org; ag...@suse.de; stuyo...@gmail.com; Bogdan
> > Purcareata <bogdan.purcare...@nxp.com>; linux-arm-
> > ker...@lists.infradead.org; Laurentiu Tudor <laurentiu.tu...@nxp.com>
> > Subject: Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README
> > 
> > On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> > > +Driver uses the switch device driver model and exposes each switch port 
> > > as
> > > +a network interface, which can be included in a bridge. Traffic switched
> > > +between ports is offloaded into the hardware. Exposed network interfaces
> > > +are not used for I/O, they are used just for configuration. This
> > > +limitation is going to be addressed in the future.
> > 
> > Hi Razvan
> > 
> > Could you briefly describe how Ethernet frames get from the CPU to the
> > switch. This is what decided if you should write a plain switchdev
> > driver, or a DSA driver.
> > 
> > Andrew
> > 
> Hello Andrew,
> 
> CPU frame handling will be added in a later. Each netdevice associated 
> to a switch port will have I/O capabilities like dpaa2-ethernet devices.
> The dpaa2-ethsw will use ACLs to redirect specific types of frames
> (i.e BPDUs) to CPU.

Hi Razvan

I looked at the architecture documentation after i posted this
email. It looks like each switch port will get its own DMA queues, etc
on the host. It is not sharing one host interface to get packets to
the switch, which is what DSA does. So a pure switchdev driver is the
correct solution here.

  Andrew


Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-10-03 Thread Andrew Lunn
On Tue, Oct 03, 2017 at 10:07:41AM +, Razvan Stefanescu wrote:
> > -Original Message-
> > From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org]
> > On Behalf Of Andrew Lunn
> > Sent: Tuesday, September 19, 2017 3:18 PM
> > To: Razvan Stefanescu 
> > Cc: de...@driverdev.osuosl.org; Ruxandra Ioana Radulescu
> > ; a...@arndb.de; gre...@linuxfoundation.org;
> > Alexandru Marginean ; linux-
> > ker...@vger.kernel.org; ag...@suse.de; stuyo...@gmail.com; Bogdan
> > Purcareata ; linux-arm-
> > ker...@lists.infradead.org; Laurentiu Tudor 
> > Subject: Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README
> > 
> > On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> > > +Driver uses the switch device driver model and exposes each switch port 
> > > as
> > > +a network interface, which can be included in a bridge. Traffic switched
> > > +between ports is offloaded into the hardware. Exposed network interfaces
> > > +are not used for I/O, they are used just for configuration. This
> > > +limitation is going to be addressed in the future.
> > 
> > Hi Razvan
> > 
> > Could you briefly describe how Ethernet frames get from the CPU to the
> > switch. This is what decided if you should write a plain switchdev
> > driver, or a DSA driver.
> > 
> > Andrew
> > 
> Hello Andrew,
> 
> CPU frame handling will be added in a later. Each netdevice associated 
> to a switch port will have I/O capabilities like dpaa2-ethernet devices.
> The dpaa2-ethsw will use ACLs to redirect specific types of frames
> (i.e BPDUs) to CPU.

Hi Razvan

I looked at the architecture documentation after i posted this
email. It looks like each switch port will get its own DMA queues, etc
on the host. It is not sharing one host interface to get packets to
the switch, which is what DSA does. So a pure switchdev driver is the
correct solution here.

  Andrew


RE: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-10-03 Thread Razvan Stefanescu
> -Original Message-
> From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org]
> On Behalf Of Andrew Lunn
> Sent: Tuesday, September 19, 2017 3:18 PM
> To: Razvan Stefanescu <razvan.stefane...@nxp.com>
> Cc: de...@driverdev.osuosl.org; Ruxandra Ioana Radulescu
> <ruxandra.radule...@nxp.com>; a...@arndb.de; gre...@linuxfoundation.org;
> Alexandru Marginean <alexandru.margin...@nxp.com>; linux-
> ker...@vger.kernel.org; ag...@suse.de; stuyo...@gmail.com; Bogdan
> Purcareata <bogdan.purcare...@nxp.com>; linux-arm-
> ker...@lists.infradead.org; Laurentiu Tudor <laurentiu.tu...@nxp.com>
> Subject: Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README
> 
> On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> > +Driver uses the switch device driver model and exposes each switch port as
> > +a network interface, which can be included in a bridge. Traffic switched
> > +between ports is offloaded into the hardware. Exposed network interfaces
> > +are not used for I/O, they are used just for configuration. This
> > +limitation is going to be addressed in the future.
> 
> Hi Razvan
> 
> Could you briefly describe how Ethernet frames get from the CPU to the
> switch. This is what decided if you should write a plain switchdev
> driver, or a DSA driver.
> 
>   Andrew
> 
Hello Andrew,

CPU frame handling will be added in a later. Each netdevice associated 
to a switch port will have I/O capabilities like dpaa2-ethernet devices.
The dpaa2-ethsw will use ACLs to redirect specific types of frames
(i.e BPDUs) to CPU.

Best regards,
Razvan S.





RE: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-10-03 Thread Razvan Stefanescu
> -Original Message-
> From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org]
> On Behalf Of Andrew Lunn
> Sent: Tuesday, September 19, 2017 3:18 PM
> To: Razvan Stefanescu 
> Cc: de...@driverdev.osuosl.org; Ruxandra Ioana Radulescu
> ; a...@arndb.de; gre...@linuxfoundation.org;
> Alexandru Marginean ; linux-
> ker...@vger.kernel.org; ag...@suse.de; stuyo...@gmail.com; Bogdan
> Purcareata ; linux-arm-
> ker...@lists.infradead.org; Laurentiu Tudor 
> Subject: Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README
> 
> On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> > +Driver uses the switch device driver model and exposes each switch port as
> > +a network interface, which can be included in a bridge. Traffic switched
> > +between ports is offloaded into the hardware. Exposed network interfaces
> > +are not used for I/O, they are used just for configuration. This
> > +limitation is going to be addressed in the future.
> 
> Hi Razvan
> 
> Could you briefly describe how Ethernet frames get from the CPU to the
> switch. This is what decided if you should write a plain switchdev
> driver, or a DSA driver.
> 
>   Andrew
> 
Hello Andrew,

CPU frame handling will be added in a later. Each netdevice associated 
to a switch port will have I/O capabilities like dpaa2-ethernet devices.
The dpaa2-ethsw will use ACLs to redirect specific types of frames
(i.e BPDUs) to CPU.

Best regards,
Razvan S.





[RESEND PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and
interfaces.

Signed-off-by: Razvan Stefanescu 
---
 drivers/staging/fsl-dpaa2/ethsw/README | 106 +
 1 file changed, 106 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README

diff --git a/drivers/staging/fsl-dpaa2/ethsw/README 
b/drivers/staging/fsl-dpaa2/ethsw/README
new file mode 100644
index 000..f6fc07f
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/README
@@ -0,0 +1,106 @@
+DPAA2 Ethernet Switch driver
+
+
+This file provides documentation for the DPAA2 Ethernet Switch driver
+
+
+Contents
+
+   Supported Platforms
+   Architecture Overview
+   Creating an Ethernet Switch
+   Features
+
+
+   Supported Platforms
+===
+This driver provides networking support for Freescale LS2085A, LS2088A
+DPAA2 SoCs.
+
+
+Architecture Overview
+=
+The Ethernet Switch in the DPAA2 architecture consists of several hardware
+resources that provide the functionality. These are allocated and
+configured via the Management Complex (MC) portals. MC abstracts most of
+these resources as DPAA2 objects and exposes ABIs through which they can
+be configured and controlled.
+
+For a more detailed description of the DPAA2 architecture and its object
+abstractions see:
+   drivers/staging/fsl-mc/README.txt
+
+The Ethernet Switch is built on top of a Datapath Switch (DPSW) object.
+
+Configuration interface:
+
+  -
+ | DPAA2 Switch driver |
+  -
+   .
+   .
+  --
+ | DPSW API |
+  --
+   .   software
+ = . ==
+   .   hardware
+  -
+ | MC hardware portals |
+  -
+   .
+   .
+ --
+| DPSW |
+ --
+
+Driver uses the switch device driver model and exposes each switch port as
+a network interface, which can be included in a bridge. Traffic switched
+between ports is offloaded into the hardware. Exposed network interfaces
+are not used for I/O, they are used just for configuration. This
+limitation is going to be addressed in the future.
+
+The DPSW can have ports connected to DPNIs or to PHYs via DPMACs.
+
+
+ [ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
+:  :  :  :  :  :
+:  :  :  :  :  :
+[eth drv]  [eth drv]  [ethsw drv  ]
+:  :  :  :  :  :kernel
+
+:  :  :  :  :  :hardware
+ [DPNI]  [DPNI] [= DPSW =]
+|  |  |  |  |  |
+|   --   |   [DPMAC][DPMAC]
+ ---|  |
+|  |
+  [PHY]  [PHY]
+
+For a more detailed description of the Ethernet switch device driver model
+see:
+   Documentation/networking/switchdev.txt
+
+Creating an Ethernet Switch
+===
+A device is created for the switch objects probed on the MC bus. Each DPSW
+has a number of properties which determine the configuration options and
+associated hardware resources.
+
+A DPSW object (and the other DPAA2 objects needed for a DPAA2 switch) can
+be added to a container on the MC bus in one of two ways: statically,
+through a Datapath Layout Binary file (DPL) that is parsed by MC at boot
+time; or created dynamically at runtime, via the DPAA2 objects APIs.
+
+Features
+
+Driver configures DPSW to perform hardware switching offload of
+unicast/multicast/broadcast (VLAN tagged or untagged) traffic between its
+ports.
+
+It allows configuration of hardware learning, flooding, multicast groups,
+port VLAN configuration and STP state.
+
+Static entries can be added/removed from the FDB.
+
+Hardware statistics for each port are provided through ethtool -S option.
-- 
1.9.1



[RESEND PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and
interfaces.

Signed-off-by: Razvan Stefanescu 
---
 drivers/staging/fsl-dpaa2/ethsw/README | 106 +
 1 file changed, 106 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README

diff --git a/drivers/staging/fsl-dpaa2/ethsw/README 
b/drivers/staging/fsl-dpaa2/ethsw/README
new file mode 100644
index 000..f6fc07f
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/README
@@ -0,0 +1,106 @@
+DPAA2 Ethernet Switch driver
+
+
+This file provides documentation for the DPAA2 Ethernet Switch driver
+
+
+Contents
+
+   Supported Platforms
+   Architecture Overview
+   Creating an Ethernet Switch
+   Features
+
+
+   Supported Platforms
+===
+This driver provides networking support for Freescale LS2085A, LS2088A
+DPAA2 SoCs.
+
+
+Architecture Overview
+=
+The Ethernet Switch in the DPAA2 architecture consists of several hardware
+resources that provide the functionality. These are allocated and
+configured via the Management Complex (MC) portals. MC abstracts most of
+these resources as DPAA2 objects and exposes ABIs through which they can
+be configured and controlled.
+
+For a more detailed description of the DPAA2 architecture and its object
+abstractions see:
+   drivers/staging/fsl-mc/README.txt
+
+The Ethernet Switch is built on top of a Datapath Switch (DPSW) object.
+
+Configuration interface:
+
+  -
+ | DPAA2 Switch driver |
+  -
+   .
+   .
+  --
+ | DPSW API |
+  --
+   .   software
+ = . ==
+   .   hardware
+  -
+ | MC hardware portals |
+  -
+   .
+   .
+ --
+| DPSW |
+ --
+
+Driver uses the switch device driver model and exposes each switch port as
+a network interface, which can be included in a bridge. Traffic switched
+between ports is offloaded into the hardware. Exposed network interfaces
+are not used for I/O, they are used just for configuration. This
+limitation is going to be addressed in the future.
+
+The DPSW can have ports connected to DPNIs or to PHYs via DPMACs.
+
+
+ [ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
+:  :  :  :  :  :
+:  :  :  :  :  :
+[eth drv]  [eth drv]  [ethsw drv  ]
+:  :  :  :  :  :kernel
+
+:  :  :  :  :  :hardware
+ [DPNI]  [DPNI] [= DPSW =]
+|  |  |  |  |  |
+|   --   |   [DPMAC][DPMAC]
+ ---|  |
+|  |
+  [PHY]  [PHY]
+
+For a more detailed description of the Ethernet switch device driver model
+see:
+   Documentation/networking/switchdev.txt
+
+Creating an Ethernet Switch
+===
+A device is created for the switch objects probed on the MC bus. Each DPSW
+has a number of properties which determine the configuration options and
+associated hardware resources.
+
+A DPSW object (and the other DPAA2 objects needed for a DPAA2 switch) can
+be added to a container on the MC bus in one of two ways: statically,
+through a Datapath Layout Binary file (DPL) that is parsed by MC at boot
+time; or created dynamically at runtime, via the DPAA2 objects APIs.
+
+Features
+
+Driver configures DPSW to perform hardware switching offload of
+unicast/multicast/broadcast (VLAN tagged or untagged) traffic between its
+ports.
+
+It allows configuration of hardware learning, flooding, multicast groups,
+port VLAN configuration and STP state.
+
+Static entries can be added/removed from the FDB.
+
+Hardware statistics for each port are provided through ethtool -S option.
-- 
1.9.1



Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Andrew Lunn
On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> +Driver uses the switch device driver model and exposes each switch port as
> +a network interface, which can be included in a bridge. Traffic switched
> +between ports is offloaded into the hardware. Exposed network interfaces
> +are not used for I/O, they are used just for configuration. This
> +limitation is going to be addressed in the future.

Hi Razvan

Could you briefly describe how Ethernet frames get from the CPU to the
switch. This is what decided if you should write a plain switchdev
driver, or a DSA driver.

Andrew


Re: [PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Andrew Lunn
On Tue, Sep 19, 2017 at 12:01:37PM +0300, Razvan Stefanescu wrote:
> +Driver uses the switch device driver model and exposes each switch port as
> +a network interface, which can be included in a bridge. Traffic switched
> +between ports is offloaded into the hardware. Exposed network interfaces
> +are not used for I/O, they are used just for configuration. This
> +limitation is going to be addressed in the future.

Hi Razvan

Could you briefly describe how Ethernet frames get from the CPU to the
switch. This is what decided if you should write a plain switchdev
driver, or a DSA driver.

Andrew


[PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and
interfaces.

Signed-off-by: Razvan Stefanescu 
---
 drivers/staging/fsl-dpaa2/ethsw/README | 106 +
 1 file changed, 106 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README

diff --git a/drivers/staging/fsl-dpaa2/ethsw/README 
b/drivers/staging/fsl-dpaa2/ethsw/README
new file mode 100644
index 000..f6fc07f
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/README
@@ -0,0 +1,106 @@
+DPAA2 Ethernet Switch driver
+
+
+This file provides documentation for the DPAA2 Ethernet Switch driver
+
+
+Contents
+
+   Supported Platforms
+   Architecture Overview
+   Creating an Ethernet Switch
+   Features
+
+
+   Supported Platforms
+===
+This driver provides networking support for Freescale LS2085A, LS2088A
+DPAA2 SoCs.
+
+
+Architecture Overview
+=
+The Ethernet Switch in the DPAA2 architecture consists of several hardware
+resources that provide the functionality. These are allocated and
+configured via the Management Complex (MC) portals. MC abstracts most of
+these resources as DPAA2 objects and exposes ABIs through which they can
+be configured and controlled.
+
+For a more detailed description of the DPAA2 architecture and its object
+abstractions see:
+   drivers/staging/fsl-mc/README.txt
+
+The Ethernet Switch is built on top of a Datapath Switch (DPSW) object.
+
+Configuration interface:
+
+  -
+ | DPAA2 Switch driver |
+  -
+   .
+   .
+  --
+ | DPSW API |
+  --
+   .   software
+ = . ==
+   .   hardware
+  -
+ | MC hardware portals |
+  -
+   .
+   .
+ --
+| DPSW |
+ --
+
+Driver uses the switch device driver model and exposes each switch port as
+a network interface, which can be included in a bridge. Traffic switched
+between ports is offloaded into the hardware. Exposed network interfaces
+are not used for I/O, they are used just for configuration. This
+limitation is going to be addressed in the future.
+
+The DPSW can have ports connected to DPNIs or to PHYs via DPMACs.
+
+
+ [ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
+:  :  :  :  :  :
+:  :  :  :  :  :
+[eth drv]  [eth drv]  [ethsw drv  ]
+:  :  :  :  :  :kernel
+
+:  :  :  :  :  :hardware
+ [DPNI]  [DPNI] [= DPSW =]
+|  |  |  |  |  |
+|   --   |   [DPMAC][DPMAC]
+ ---|  |
+|  |
+  [PHY]  [PHY]
+
+For a more detailed description of the Ethernet switch device driver model
+see:
+   Documentation/networking/switchdev.txt
+
+Creating an Ethernet Switch
+===
+A device is created for the switch objects probed on the MC bus. Each DPSW
+has a number of properties which determine the configuration options and
+associated hardware resources.
+
+A DPSW object (and the other DPAA2 objects needed for a DPAA2 switch) can
+be added to a container on the MC bus in one of two ways: statically,
+through a Datapath Layout Binary file (DPL) that is parsed by MC at boot
+time; or created dynamically at runtime, via the DPAA2 objects APIs.
+
+Features
+
+Driver configures DPSW to perform hardware switching offload of
+unicast/multicast/broadcast (VLAN tagged or untagged) traffic between its
+ports.
+
+It allows configuration of hardware learning, flooding, multicast groups,
+port VLAN configuration and STP state.
+
+Static entries can be added/removed from the FDB.
+
+Hardware statistics for each port are provided through ethtool -S option.
-- 
1.9.1



[PATCH 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-09-19 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and
interfaces.

Signed-off-by: Razvan Stefanescu 
---
 drivers/staging/fsl-dpaa2/ethsw/README | 106 +
 1 file changed, 106 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README

diff --git a/drivers/staging/fsl-dpaa2/ethsw/README 
b/drivers/staging/fsl-dpaa2/ethsw/README
new file mode 100644
index 000..f6fc07f
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/README
@@ -0,0 +1,106 @@
+DPAA2 Ethernet Switch driver
+
+
+This file provides documentation for the DPAA2 Ethernet Switch driver
+
+
+Contents
+
+   Supported Platforms
+   Architecture Overview
+   Creating an Ethernet Switch
+   Features
+
+
+   Supported Platforms
+===
+This driver provides networking support for Freescale LS2085A, LS2088A
+DPAA2 SoCs.
+
+
+Architecture Overview
+=
+The Ethernet Switch in the DPAA2 architecture consists of several hardware
+resources that provide the functionality. These are allocated and
+configured via the Management Complex (MC) portals. MC abstracts most of
+these resources as DPAA2 objects and exposes ABIs through which they can
+be configured and controlled.
+
+For a more detailed description of the DPAA2 architecture and its object
+abstractions see:
+   drivers/staging/fsl-mc/README.txt
+
+The Ethernet Switch is built on top of a Datapath Switch (DPSW) object.
+
+Configuration interface:
+
+  -
+ | DPAA2 Switch driver |
+  -
+   .
+   .
+  --
+ | DPSW API |
+  --
+   .   software
+ = . ==
+   .   hardware
+  -
+ | MC hardware portals |
+  -
+   .
+   .
+ --
+| DPSW |
+ --
+
+Driver uses the switch device driver model and exposes each switch port as
+a network interface, which can be included in a bridge. Traffic switched
+between ports is offloaded into the hardware. Exposed network interfaces
+are not used for I/O, they are used just for configuration. This
+limitation is going to be addressed in the future.
+
+The DPSW can have ports connected to DPNIs or to PHYs via DPMACs.
+
+
+ [ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
+:  :  :  :  :  :
+:  :  :  :  :  :
+[eth drv]  [eth drv]  [ethsw drv  ]
+:  :  :  :  :  :kernel
+
+:  :  :  :  :  :hardware
+ [DPNI]  [DPNI] [= DPSW =]
+|  |  |  |  |  |
+|   --   |   [DPMAC][DPMAC]
+ ---|  |
+|  |
+  [PHY]  [PHY]
+
+For a more detailed description of the Ethernet switch device driver model
+see:
+   Documentation/networking/switchdev.txt
+
+Creating an Ethernet Switch
+===
+A device is created for the switch objects probed on the MC bus. Each DPSW
+has a number of properties which determine the configuration options and
+associated hardware resources.
+
+A DPSW object (and the other DPAA2 objects needed for a DPAA2 switch) can
+be added to a container on the MC bus in one of two ways: statically,
+through a Datapath Layout Binary file (DPL) that is parsed by MC at boot
+time; or created dynamically at runtime, via the DPAA2 objects APIs.
+
+Features
+
+Driver configures DPSW to perform hardware switching offload of
+unicast/multicast/broadcast (VLAN tagged or untagged) traffic between its
+ports.
+
+It allows configuration of hardware learning, flooding, multicast groups,
+port VLAN configuration and STP state.
+
+Static entries can be added/removed from the FDB.
+
+Hardware statistics for each port are provided through ethtool -S option.
-- 
1.9.1