2019-07-05 14:42:21

by Ioana Ciornei

[permalink] [raw]
Subject: [PATCH v2 0/6] staging: fsl-dpaa2/ethsw: code cleanup

This patch set contains various small cleanup patches
for the DPAA2 ethsw driver.

Changes in v2:
- removed patch "staging: fsl-dpaa2/ethsw: Check notification relevance"
since another patch doing the same thing was merged through net-next

Razvan Stefanescu (6):
staging: fsl-dpaa2/ethsw: Fix setting port learning/flooding flags
staging: fsl-dpaa2/ethsw: Add network interface statistics
staging: fsl-dpaa2/ethsw: Remove netdevice on port probing error
staging: fsl-dpaa2/ethsw: Add ndo_get_phys_port_name
staging: fsl-dpaa2/ethsw: Add switch driver documentation
staging: fsl-dpaa2/ethsw: Add comments to ETHSW_VLAN flags

.../device_drivers/freescale/dpaa2/overview.rst | 6 ++++
MAINTAINERS | 1 +
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 39 ++++++++++++++++++----
drivers/staging/fsl-dpaa2/ethsw/ethsw.h | 4 +++
4 files changed, 44 insertions(+), 6 deletions(-)

--
1.9.1


2019-07-05 14:42:24

by Ioana Ciornei

[permalink] [raw]
Subject: [PATCH v2 1/6] staging: fsl-dpaa2/ethsw: Fix setting port learning/flooding flags

From: Razvan Stefanescu <[email protected]>

ethsw_set_learning()/ethsw_set_flood() use flags parameter as an
enable/disable (1/0) indicator. Previous usage sent incorrect values.

Signed-off-by: Razvan Stefanescu <[email protected]>
Signed-off-by: Ioana Ciornei <[email protected]>
---
Changes in v2:
- none

drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index f73edaf6ce87..87470070c3a5 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -673,11 +673,12 @@ static int port_attr_br_flags_set(struct net_device *netdev,
return 0;

/* Learning is enabled per switch */
- err = ethsw_set_learning(port_priv->ethsw_data, flags & BR_LEARNING);
+ err = ethsw_set_learning(port_priv->ethsw_data,
+ !!(flags & BR_LEARNING));
if (err)
goto exit;

- err = ethsw_port_set_flood(port_priv, flags & BR_FLOOD);
+ err = ethsw_port_set_flood(port_priv, !!(flags & BR_FLOOD));

exit:
return err;
--
1.9.1

2019-07-05 15:48:38

by Ioana Ciornei

[permalink] [raw]
Subject: [PATCH v2 5/6] staging: fsl-dpaa2/ethsw: Add switch driver documentation

From: Razvan Stefanescu <[email protected]>

Add a switch driver entry in the dpaa2 overview documentation.

Signed-off-by: Razvan Stefanescu <[email protected]>
Signed-off-by: Ioana Ciornei <[email protected]>
---
Changes in v2:
- none

.../networking/device_drivers/freescale/dpaa2/overview.rst | 6 ++++++
MAINTAINERS | 1 +
2 files changed, 7 insertions(+)

diff --git a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst b/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
index d638b5a8aadd..7b7f35908890 100644
--- a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
+++ b/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
@@ -393,6 +393,12 @@ interfaces needed to connect the DPAA2 network interface to
the network stack.
Each DPNI corresponds to a Linux network interface.

+Ethernet L2 Switch driver
+-------------------------
+The Ethernet L2 Switch driver is bound to a DPSW and makes use of the
+switchdev support in kernel.
+Each switch port has a corresponding Linux network interface.
+
MAC driver
----------
An Ethernet PHY is an off-chip, board specific component and is managed
diff --git a/MAINTAINERS b/MAINTAINERS
index c0a02dccc869..5c51be8e281c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4938,6 +4938,7 @@ M: Ioana Ciornei <[email protected]>
L: [email protected]
S: Maintained
F: drivers/staging/fsl-dpaa2/ethsw
+F: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst

DPAA2 PTP CLOCK DRIVER
M: Yangbo Lu <[email protected]>
--
1.9.1

2019-07-05 15:48:39

by Ioana Ciornei

[permalink] [raw]
Subject: [PATCH v2 4/6] staging: fsl-dpaa2/ethsw: Add ndo_get_phys_port_name

From: Razvan Stefanescu <[email protected]>

Add the ndo_get_phys_port_name callback to the ethsw driver.

Signed-off-by: Razvan Stefanescu <[email protected]>
Signed-off-by: Ioana Ciornei <[email protected]>
---
Changes in v2:
- none

drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index 9f1617164865..341c36b3a76d 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -516,6 +516,19 @@ static int swdev_get_port_parent_id(struct net_device *dev,
return 0;
}

+static int port_get_phys_name(struct net_device *netdev, char *name,
+ size_t len)
+{
+ struct ethsw_port_priv *port_priv = netdev_priv(netdev);
+ int err;
+
+ err = snprintf(name, len, "p%d", port_priv->idx);
+ if (err >= len)
+ return -EINVAL;
+
+ return 0;
+}
+
static const struct net_device_ops ethsw_port_ops = {
.ndo_open = port_open,
.ndo_stop = port_stop,
@@ -528,6 +541,7 @@ static int swdev_get_port_parent_id(struct net_device *dev,

.ndo_start_xmit = port_dropframe,
.ndo_get_port_parent_id = swdev_get_port_parent_id,
+ .ndo_get_phys_port_name = port_get_phys_name,
};

static void ethsw_links_state_update(struct ethsw_core *ethsw)
--
1.9.1

2019-07-15 19:53:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 5/6] staging: fsl-dpaa2/ethsw: Add switch driver documentation

On Fri, Jul 05, 2019 at 05:27:15PM +0300, Ioana Ciornei wrote:
> From: Razvan Stefanescu <[email protected]>
>
> Add a switch driver entry in the dpaa2 overview documentation.
>
> Signed-off-by: Razvan Stefanescu <[email protected]>
> Signed-off-by: Ioana Ciornei <[email protected]>
> ---
> Changes in v2:
> - none
>
> .../networking/device_drivers/freescale/dpaa2/overview.rst | 6 ++++++
> MAINTAINERS | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst b/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> index d638b5a8aadd..7b7f35908890 100644
> --- a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> +++ b/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> @@ -393,6 +393,12 @@ interfaces needed to connect the DPAA2 network interface to
> the network stack.
> Each DPNI corresponds to a Linux network interface.
>
> +Ethernet L2 Switch driver
> +-------------------------
> +The Ethernet L2 Switch driver is bound to a DPSW and makes use of the
> +switchdev support in kernel.
> +Each switch port has a corresponding Linux network interface.
> +
> MAC driver
> ----------
> An Ethernet PHY is an off-chip, board specific component and is managed
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c0a02dccc869..5c51be8e281c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4938,6 +4938,7 @@ M: Ioana Ciornei <[email protected]>
> L: [email protected]
> S: Maintained
> F: drivers/staging/fsl-dpaa2/ethsw
> +F: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
>
> DPAA2 PTP CLOCK DRIVER
> M: Yangbo Lu <[email protected]>
> --
> 1.9.1
>

This patch did not apply :(

2019-07-16 08:36:53

by Ioana Ciornei

[permalink] [raw]
Subject: RE: [PATCH v2 5/6] staging: fsl-dpaa2/ethsw: Add switch driver documentation

> Subject: Re: [PATCH v2 5/6] staging: fsl-dpaa2/ethsw: Add switch driver
> documentation
>
> On Fri, Jul 05, 2019 at 05:27:15PM +0300, Ioana Ciornei wrote:
> > From: Razvan Stefanescu <[email protected]>
> >
> > Add a switch driver entry in the dpaa2 overview documentation.
> >
> > Signed-off-by: Razvan Stefanescu <[email protected]>
> > Signed-off-by: Ioana Ciornei <[email protected]>
> > ---
> > Changes in v2:
> > - none
> >
> > .../networking/device_drivers/freescale/dpaa2/overview.rst | 6 ++++++
> > MAINTAINERS | 1 +
> > 2 files changed, 7 insertions(+)
> >
> > diff --git
> > a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> > b/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> > index d638b5a8aadd..7b7f35908890 100644
> > ---
> > a/Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
> > +++ b/Documentation/networking/device_drivers/freescale/dpaa2/overview
> > +++ .rst
> > @@ -393,6 +393,12 @@ interfaces needed to connect the DPAA2 network
> > interface to the network stack.
> > Each DPNI corresponds to a Linux network interface.
> >
> > +Ethernet L2 Switch driver
> > +-------------------------
> > +The Ethernet L2 Switch driver is bound to a DPSW and makes use of the
> > +switchdev support in kernel.
> > +Each switch port has a corresponding Linux network interface.
> > +
> > MAC driver
> > ----------
> > An Ethernet PHY is an off-chip, board specific component and is
> > managed diff --git a/MAINTAINERS b/MAINTAINERS index
> > c0a02dccc869..5c51be8e281c 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -4938,6 +4938,7 @@ M: Ioana Ciornei <[email protected]>
> > L: [email protected]
> > S: Maintained
> > F: drivers/staging/fsl-dpaa2/ethsw
> > +F:
> Documentation/networking/device_drivers/freescale/dpaa2/overview.r
> st
> >
> > DPAA2 PTP CLOCK DRIVER
> > M: Yangbo Lu <[email protected]>
> > --
> > 1.9.1
> >
>
> This patch did not apply :(

Sorry for this. I'll take this chance to also add more information and send it properly.

--
Ioana