[v1,04/38] net/mvpp2: skip vlan flush
diff mbox series

Message ID 20201202101212.4717-5-lironh@marvell.com
State Changes Requested
Delegated to: Jerin Jacob
Headers show
Series
  • net/mvpp2: misc updates
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Dec. 2, 2020, 10:11 a.m. UTC
From: Liron Himi <lironh@marvell.com>

vlan-flush in MUSDK is not supported yet.
until it does, the code should be skipped as currently
an redundant  error message is displayed.

Fixes: a8f3d6783 ("net/mrvl: support VLAN filtering")
Cc: stable@dpdk.org

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Michael Shamis Dec. 23, 2020, 9:42 a.m. UTC | #1
Reviewed-by: Michael Shamis <michaelsh@marvell.com>

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of lironh@marvell.com
Sent: Wednesday, December 2, 2020 12:12 PM
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Cc: dev@dpdk.org; Liron Himi <lironh@marvell.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH v1 04/38] net/mvpp2: skip vlan flush

From: Liron Himi <lironh@marvell.com>

vlan-flush in MUSDK is not supported yet.
until it does, the code should be skipped as currently an redundant  error message is displayed.

Fixes: a8f3d6783 ("net/mrvl: support VLAN filtering")
Cc: stable@dpdk.org

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index ebd2bb1c8..0985ccebe 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -672,15 +672,15 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 	}
 
 	if (!priv->vlan_flushed) {
-		ret = pp2_ppio_flush_vlan(priv->ppio);
-		if (ret) {
-			MRVL_LOG(ERR, "Failed to flush vlan list");
-			/*
-			 * TODO
-			 * once pp2_ppio_flush_vlan() is supported jump to out
-			 * goto out;
-			 */
-		}
+		/*
+		 * TODO
+		 * once pp2_ppio_flush_vlan() is supported call it
+		 * ret = pp2_ppio_flush_vlan(priv->ppio);
+		 * if (ret) {
+		 *	MRVL_LOG(ERR, "Failed to flush vlan list");
+		 *	goto out;
+		 * }
+		 */
 		priv->vlan_flushed = 1;
 	}
 	ret = mrvl_mtu_set(dev, dev->data->mtu);
--
2.28.0
Jerin Jacob Jan. 11, 2021, 2:38 p.m. UTC | #2
On Wed, Dec 23, 2020 at 3:15 PM Michael Shamis <michaelsh@marvell.com> wrote:
>
> Reviewed-by: Michael Shamis <michaelsh@marvell.com>
>
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of lironh@marvell.com
> Sent: Wednesday, December 2, 2020 12:12 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: dev@dpdk.org; Liron Himi <lironh@marvell.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 04/38] net/mvpp2: skip vlan flush
>
> From: Liron Himi <lironh@marvell.com>
>
> vlan-flush in MUSDK is not supported yet.
> until it does, the code should be skipped as currently an redundant  error message is displayed.
>
> Fixes: a8f3d6783 ("net/mrvl: support VLAN filtering")
> Cc: stable@dpdk.org
>
> Signed-off-by: Liron Himi <lironh@marvell.com>
> Reviewed-by: Liron Himi <lironh@marvell.com>
> ---
>  drivers/net/mvpp2/mrvl_ethdev.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index ebd2bb1c8..0985ccebe 100644
> --- a/drivers/net/mvpp2/mrvl_ethdev.c
> +++ b/drivers/net/mvpp2/mrvl_ethdev.c
> @@ -672,15 +672,15 @@ mrvl_dev_start(struct rte_eth_dev *dev)
>         }
>
>         if (!priv->vlan_flushed) {
> -               ret = pp2_ppio_flush_vlan(priv->ppio);
> -               if (ret) {
> -                       MRVL_LOG(ERR, "Failed to flush vlan list");
> -                       /*
> -                        * TODO
> -                        * once pp2_ppio_flush_vlan() is supported jump to out
> -                        * goto out;
> -                        */
> -               }
> +               /*
> +                * TODO
> +                * once pp2_ppio_flush_vlan() is supported call it
> +                * ret = pp2_ppio_flush_vlan(priv->ppio);
> +                * if (ret) {
> +                *      MRVL_LOG(ERR, "Failed to flush vlan list");
> +                *      goto out;
> +                * }
> +                */

This kind of TODO is no go in upstream code.
I think, MUSDK can be updated to skip the error and have an API detect
the feature
is present or not? so that drivers can make intelligent decisions and
have clean code.



>                 priv->vlan_flushed = 1;
>         }
>         ret = mrvl_mtu_set(dev, dev->data->mtu);
> --
> 2.28.0
>

Patch
diff mbox series

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index ebd2bb1c8..0985ccebe 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -672,15 +672,15 @@  mrvl_dev_start(struct rte_eth_dev *dev)
 	}
 
 	if (!priv->vlan_flushed) {
-		ret = pp2_ppio_flush_vlan(priv->ppio);
-		if (ret) {
-			MRVL_LOG(ERR, "Failed to flush vlan list");
-			/*
-			 * TODO
-			 * once pp2_ppio_flush_vlan() is supported jump to out
-			 * goto out;
-			 */
-		}
+		/*
+		 * TODO
+		 * once pp2_ppio_flush_vlan() is supported call it
+		 * ret = pp2_ppio_flush_vlan(priv->ppio);
+		 * if (ret) {
+		 *	MRVL_LOG(ERR, "Failed to flush vlan list");
+		 *	goto out;
+		 * }
+		 */
 		priv->vlan_flushed = 1;
 	}
 	ret = mrvl_mtu_set(dev, dev->data->mtu);