[qca-ssdk-shell]: new qos support for cppe

Change-Id: I0691b2d665be7b71c5b6f8482c61248e1fd39718
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
diff --git a/include/fal/fal_qos.h b/include/fal/fal_qos.h
old mode 100644
new mode 100755
index af7c9d0..0973776
--- a/include/fal/fal_qos.h
+++ b/include/fal/fal_qos.h
@@ -64,6 +64,9 @@
 	a_int8_t preheader_pri;
 	a_uint8_t flow_pri;
 	a_uint8_t acl_pri;
+	a_uint8_t post_acl_pri;
+	a_bool_t pcp_pri_force;
+	a_bool_t dscp_pri_force;
 } fal_qos_pri_precedence_t;
 
 typedef struct {
@@ -78,6 +81,13 @@
 	a_uint8_t internal_pri;
 	a_uint8_t internal_dscp;
 	a_uint8_t internal_dp;
+	a_uint8_t dscp_mask;
+	a_bool_t dscp_en;
+	a_bool_t pcp_en;
+	a_bool_t dei_en;
+	a_bool_t pri_en;
+	a_bool_t dp_en;
+	a_uint8_t qos_prec; /* resolution precedence */
 } fal_qos_cosmap_t;
 
 typedef enum {
diff --git a/src/shell/shell_io.c b/src/shell/shell_io.c
index 3a5bb19..55b579c 100755
--- a/src/shell/shell_io.c
+++ b/src/shell/shell_io.c
@@ -17472,6 +17472,81 @@
     }
     while (talk_mode && (SW_OK != rv));
 
+    do
+    {
+        cmd = get_sub_cmd("post_acl_pri_prece", "0");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: priority\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_uint8(cmd, &(entry.post_acl_pri),
+                                       sizeof (a_uint8_t));
+            if (SW_OK != rv)
+                dprintf("usage: priority\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("pcp_pri_force", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.pcp_pri_force),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("dscp_pri_force", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.dscp_pri_force),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
     *(fal_qos_pri_precedence_t *)val = entry;
     return SW_OK;
 }
@@ -17485,8 +17560,10 @@
     
     dprintf("\n[pcp_pri_prece]:0x%x [dscp_pri_prece]:0x%x [preheader_pri_prece]:0x%x ",
 			entry->pcp_pri, entry->dscp_pri, entry->preheader_pri);
-    dprintf("\n[flow_pri_prece]:0x%x [acl_pri_prece]:0x%x ",
-			entry->flow_pri, entry->acl_pri);
+    dprintf("\n[flow_pri_prece]:0x%x [acl_pri_prece]:0x%x [post_acl_pri_prece]:0x%x ",
+			entry->flow_pri, entry->acl_pri, entry->post_acl_pri);
+    dprintf("\n[pcp_pri_force]:0x%x [dscp_pri_force]:0x%x ",
+			entry->pcp_pri_force, entry->dscp_pri_force);
 }
 
 sw_error_t
@@ -17724,6 +17801,181 @@
     }
     while (talk_mode && (SW_OK != rv));
 
+    do
+    {
+        cmd = get_sub_cmd("dscp_mask", "0");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: dscp mask\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_uint8(cmd, &(entry.dscp_mask),
+                                       sizeof (a_uint8_t));
+            if (SW_OK != rv)
+                dprintf("usage: dscp mask\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("dscp_en", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.dscp_en),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("pcp_en", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.pcp_en),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("dei_en", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.dei_en),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("pri_en", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.pri_en),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("dp_en", "no");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: <yes/no/y/n>\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_confirm(cmd, A_FALSE, &(entry.dp_en),
+                                       sizeof (a_bool_t));
+            if (SW_OK != rv)
+                dprintf("usage: <yes/no/y/n>\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
+    do
+    {
+        cmd = get_sub_cmd("qos_prec", "0");
+        SW_RTN_ON_NULL_PARAM(cmd);
+
+        if (!strncasecmp(cmd, "quit", 4))
+        {
+            return SW_BAD_VALUE;
+        }
+        else if (!strncasecmp(cmd, "help", 4))
+        {
+            dprintf("usage: dscp mask\n");
+            rv = SW_BAD_VALUE;
+        }
+        else
+        {
+            rv = cmd_data_check_uint8(cmd, &(entry.qos_prec),
+                                       sizeof (a_uint8_t));
+            if (SW_OK != rv)
+                dprintf("usage: dscp mask\n");
+        }
+
+    }
+    while (talk_mode && (SW_OK != rv));
+
     *(fal_qos_cosmap_t *)val = entry;
     return SW_OK;
 }
@@ -17737,8 +17989,12 @@
     
     dprintf("\n[internal_pcp]:0x%x [internal_dei]:0x%x [internal_pri]:0x%x ",
 			entry->internal_pcp, entry->internal_dei, entry->internal_pri);
-    dprintf("\n[internal_dscp]:0x%x [internal_dp]:0x%x ",
-			entry->internal_dscp, entry->internal_dp);
+    dprintf("\n[internal_dscp]:0x%x [internal_dp]:0x%x [dscp_mask]:0x%x ",
+			entry->internal_dscp, entry->internal_dp, entry->dscp_mask);
+    dprintf("\n[dscp_en]:0x%x [pcp_en]:0x%x [dei_en]:0x%x ",
+			entry->dscp_en, entry->pcp_en, entry->dei_en);
+    dprintf("\n[pri_en]:0x%x [dp_en]:0x%x [qos_prec]:0x%x ",
+			entry->pri_en, entry->dp_en, entry->qos_prec);
 }
 
 void