From dead0c073665e892b82009092602c3a542e51567 Mon Sep 17 00:00:00 2001 From: bingwang Date: Sat, 2 Apr 2022 04:19:20 +0000 Subject: [PATCH 1/3] Update YANG for pfcwd_sw_enable Signed-off-by: bingwang --- src/sonic-yang-models/tests/files/sample_config_db.json | 6 ++++-- .../tests/yang_model_tests/tests_config/qosmaps.json | 9 ++++++--- .../yang-models/sonic-port-qos-map.yang | 6 ++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index e40d75e8f2c5..627fa208db09 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1603,7 +1603,8 @@ "tc_to_pg_map": "tc_to_pg_map1", "pfc_to_queue_map": "pfc_prio_to_q_map1", "pfc_to_pg_map" : "pfc_prio_to_pg_map1", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dot1p_to_tc_map" : "Dot1p_to_tc_map2", @@ -1612,7 +1613,8 @@ "tc_to_pg_map": "tc_to_pg_map2", "pfc_to_queue_map": "pfc_prio_to_q_map2", "pfc_to_pg_map" : "pfc_prio_to_pg_map2", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json index fe085ee3c7f9..991675bc3979 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json @@ -621,7 +621,8 @@ "pfc_to_pg_map": "map1", "dscp_to_tc_map": "map1", "dot1p_to_tc_map": "map1", - "pfc_enable": "3,4" + "pfc_enable": "3,4", + "pfcwd_sw_enable" : "3,4" } ] } @@ -657,7 +658,8 @@ "pfc_to_pg_map": "map2", "dscp_to_tc_map": "map2", "dot1p_to_tc_map": "map2", - "pfc_enable": "3,4" + "pfc_enable": "3,4", + "pfcwd_sw_enable" : "3,4" } ] } @@ -714,7 +716,8 @@ "PORT_QOS_MAP_LIST": [ { "ifname": "Ethernet4", - "pfc_enable": "8" + "pfc_enable": "8", + "pfcwd_sw_enable" : "8" } ] } diff --git a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang index b29e2f547087..f4576789a5b5 100644 --- a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang +++ b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang @@ -81,6 +81,12 @@ module sonic-port-qos-map { } } + leaf pfcwd_sw_enable { + type string { + pattern "[0-7](,[0-7])?"; + } + } + leaf pfc_to_queue_map { type leafref { path "/ppqm:sonic-pfc-priority-queue-map/ppqm:MAP_PFC_PRIORITY_TO_QUEUE/ppqm:MAP_PFC_PRIORITY_TO_QUEUE_LIST/ppqm:name"; From 18b9884760a454dece6b04ce4ce902318b791858 Mon Sep 17 00:00:00 2001 From: bingwang Date: Sat, 2 Apr 2022 04:27:08 +0000 Subject: [PATCH 2/3] Fix alignment Signed-off-by: bingwang --- src/sonic-yang-models/tests/files/sample_config_db.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index 627fa208db09..ff99fc7335df 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1604,7 +1604,7 @@ "pfc_to_queue_map": "pfc_prio_to_q_map1", "pfc_to_pg_map" : "pfc_prio_to_pg_map1", "pfc_enable" : "3,4", - "pfcwd_sw_enable" : "3,4" + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dot1p_to_tc_map" : "Dot1p_to_tc_map2", @@ -1614,7 +1614,7 @@ "pfc_to_queue_map": "pfc_prio_to_q_map2", "pfc_to_pg_map" : "pfc_prio_to_pg_map2", "pfc_enable" : "3,4", - "pfcwd_sw_enable" : "3,4" + "pfcwd_sw_enable" : "3,4" } }, From 870419854c8323b80c2d6c8971058735cddd383d Mon Sep 17 00:00:00 2001 From: bingwang Date: Sat, 2 Apr 2022 04:39:01 +0000 Subject: [PATCH 3/3] Add description Signed-off-by: bingwang --- src/sonic-yang-models/yang-models/sonic-port-qos-map.yang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang index f4576789a5b5..8f4c2d88f4ed 100644 --- a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang +++ b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang @@ -85,6 +85,8 @@ module sonic-port-qos-map { type string { pattern "[0-7](,[0-7])?"; } + description + "Specify the queue(s) on which software pfc watchdog are enabled."; } leaf pfc_to_queue_map {