[v2,23/37] net/mvpp2: skip qos init if not requested

Message ID 20210122191925.24308-24-lironh@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series net/mvpp2: misc updates |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Jan. 22, 2021, 7:19 p.m. UTC
  From: Liron Himi <lironh@marvell.com>

Skip qos init if not requested

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

Patch

diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c
index d3ad7cc5a..1c65b5276 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -593,7 +593,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) */
@@ -909,6 +909,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;