[v1,23/38] net/mvpp2: skip qos init if not requested
diff mbox series

Message ID 20201202101212.4717-24-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>

skip qos init if not requested

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_qos.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Michael Shamis Dec. 23, 2020, 9:36 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>
Subject: [dpdk-dev] [PATCH v1 23/38] net/mvpp2: skip qos init if not requested

From: Liron Himi <lironh@marvell.com>

skip qos init if not requested

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_qos.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index 18cf470dd..d8f6dd5c6 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -617,7 +617,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args)
 			}
 		} else {
 			(*cfg)->port[n].mapping_priority =
-				PP2_CLS_QOS_TBL_VLAN_IP_PRI;
+				PP2_CLS_QOS_TBL_NONE;
 		}
 
 		/* Parse policer configuration (if any) */ @@ -933,6 +933,9 @@ mrvl_start_qos_mapping(struct mrvl_priv *priv)  {
 	size_t i;
 
+	if (priv->qos_tbl_params.type == PP2_CLS_QOS_TBL_NONE)
+		return 0;
+
 	if (priv->ppio == NULL) {
 		MRVL_LOG(ERR, "ppio must not be NULL here!");
 		return -1;
--
2.28.0

Patch
diff mbox series

diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c
index 18cf470dd..d8f6dd5c6 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -617,7 +617,7 @@  mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args)
 			}
 		} else {
 			(*cfg)->port[n].mapping_priority =
-				PP2_CLS_QOS_TBL_VLAN_IP_PRI;
+				PP2_CLS_QOS_TBL_NONE;
 		}
 
 		/* Parse policer configuration (if any) */
@@ -933,6 +933,9 @@  mrvl_start_qos_mapping(struct mrvl_priv *priv)
 {
 	size_t i;
 
+	if (priv->qos_tbl_params.type == PP2_CLS_QOS_TBL_NONE)
+		return 0;
+
 	if (priv->ppio == NULL) {
 		MRVL_LOG(ERR, "ppio must not be NULL here!");
 		return -1;