From 999a52315f95bade54f0704436c53265c3eccac9 Mon Sep 17 00:00:00 2001 From: vganesan-nokia <67648637+vganesan-nokia@users.noreply.github.com> Date: Wed, 2 Jun 2021 10:12:52 -0400 Subject: [PATCH] [qosorch] Dot1p map list initialization fix (#1746) - For DOT1P QOS map, the map list was not initialized correctly. So "color" field in the key was sending garbage. Because of this, orchagent serialization function is unable to translate and serialize the attribute value properly and returns warning. During subsequent operation which comes with a different garbage, this was treated as a different "color" and syncd/SAI returns error saying "modification not implemented". This is fixed by initializing the dotp1 map list attribute. Signed-off-by: vedganes --- orchagent/qosorch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/qosorch.cpp b/orchagent/qosorch.cpp index b4b208e1b368..31e61b5433e0 100644 --- a/orchagent/qosorch.cpp +++ b/orchagent/qosorch.cpp @@ -232,7 +232,7 @@ bool Dot1pToTcMapHandler::convertFieldValuesToAttributes(KeyOpFieldsValuesTuple sai_qos_map_list_t dot1p_map_list; // Allocated resources are freed in freeAttribResources() call - dot1p_map_list.list = new sai_qos_map_t[kfvFieldsValues(tuple).size()]; + dot1p_map_list.list = new sai_qos_map_t[kfvFieldsValues(tuple).size()](); int i = 0; for (const auto &fv : kfvFieldsValues(tuple)) {