@@ -101,7 +101,34 @@ def test_PfcAsymmetric(self, dvs, testlog):
101
101
pfc = getPortAttr (dvs , port_oid , 'SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL' )
102
102
assert pfc == pfc_tx
103
103
104
+ def test_PfcUnconfig (self , dvs , testlog ):
104
105
106
+ port_name = 'Ethernet0'
107
+ pfc_queues = [ 3 , 4 ]
108
+
109
+ # Configure default PFC
110
+ setPortPfc (dvs , port_name , pfc_queues )
111
+
112
+ # Get SAI object ID for the interface
113
+ port_oid = getPortOid (dvs , port_name )
114
+
115
+ # Verify default PFC is set to configured value
116
+ pfc = getPortAttr (dvs , port_oid , 'SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL' )
117
+ assert pfc == getBitMaskStr (pfc_queues )
118
+
119
+ # Configure PFC on single TC
120
+ pfc_queues = [ 3 ]
121
+ setPortPfc (dvs , port_name , pfc_queues )
122
+ # Verify default PFC is set to configured value
123
+ pfc = getPortAttr (dvs , port_oid , 'SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL' )
124
+ assert pfc == getBitMaskStr (pfc_queues )
125
+
126
+ # Disable PFC on last TC
127
+ pfc_queues = [ ]
128
+ setPortPfc (dvs , port_name , pfc_queues )
129
+ # Verify default PFC is set to configured value
130
+ pfc = getPortAttr (dvs , port_oid , 'SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL' )
131
+ assert pfc == getBitMaskStr (pfc_queues )
105
132
106
133
# Add Dummy always-pass test at end as workaroud
107
134
# for issue when Flaky fail on final test it invokes module tear-down before retrying
0 commit comments