diff --git a/orchagent/countercheckorch.cpp b/orchagent/countercheckorch.cpp index 54d6c1a51c..e970dc4712 100644 --- a/orchagent/countercheckorch.cpp +++ b/orchagent/countercheckorch.cpp @@ -56,7 +56,8 @@ void CounterCheckOrch::mcCounterCheck() { auto oid = i.first; auto mcCounters = i.second; - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; Port port; if (!gPortsOrch->getPort(oid, port)) @@ -67,7 +68,7 @@ void CounterCheckOrch::mcCounterCheck() auto newMcCounters = getQueueMcCounters(port); - if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcMask)) + if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port %s", port.m_alias.c_str()); continue; @@ -75,7 +76,7 @@ void CounterCheckOrch::mcCounterCheck() for (size_t prio = 0; prio != mcCounters.size(); prio++) { - bool isLossy = ((1 << prio) & pfcMask) == 0; + bool isLossy = ((1 << prio) & pfcRxMask) == 0; if (newMcCounters[prio] == numeric_limits::max()) { SWSS_LOG_WARN("Could not retreive MC counters on queue %zu port %s", @@ -104,7 +105,8 @@ void CounterCheckOrch::pfcFrameCounterCheck() auto oid = i.first; auto counters = i.second; auto newCounters = getPfcFrameCounters(oid); - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; Port port; if (!gPortsOrch->getPort(oid, port)) @@ -113,7 +115,7 @@ void CounterCheckOrch::pfcFrameCounterCheck() continue; } - if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcMask)) + if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port %s", port.m_alias.c_str()); continue; @@ -121,7 +123,7 @@ void CounterCheckOrch::pfcFrameCounterCheck() for (size_t prio = 0; prio != counters.size(); prio++) { - bool isLossy = ((1 << prio) & pfcMask) == 0; + bool isLossy = ((1 << prio) & pfcRxMask) == 0; if (newCounters[prio] == numeric_limits::max()) { SWSS_LOG_WARN("Could not retreive PFC frame count on queue %zu port %s", diff --git a/orchagent/pfcactionhandler.cpp b/orchagent/pfcactionhandler.cpp index 34c513e5d6..fa541c5c70 100644 --- a/orchagent/pfcactionhandler.cpp +++ b/orchagent/pfcactionhandler.cpp @@ -393,16 +393,17 @@ PfcWdLossyHandler::PfcWdLossyHandler(sai_object_id_t port, sai_object_id_t queue { SWSS_LOG_ENTER(); - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; - if (!gPortsOrch->getPortPfc(port, &pfcMask)) + if (!gPortsOrch->getPortPfc(port, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port 0x%" PRIx64, port); } - pfcMask = static_cast(pfcMask & ~(1 << queueId)); + pfcRxMask = static_cast(pfcRxMask & ~(1 << queueId)); - if (!gPortsOrch->setPortPfc(port, pfcMask)) + if (!gPortsOrch->setPortPfc(port, pfcTxMask, pfcRxMask)) { SWSS_LOG_ERROR("Failed to set PFC mask on port 0x%" PRIx64, port); } @@ -412,16 +413,17 @@ PfcWdLossyHandler::~PfcWdLossyHandler(void) { SWSS_LOG_ENTER(); - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; - if (!gPortsOrch->getPortPfc(getPort(), &pfcMask)) + if (!gPortsOrch->getPortPfc(getPort(), &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port 0x%" PRIx64, getPort()); } - pfcMask = static_cast(pfcMask | (1 << getQueueId())); + pfcRxMask = static_cast(pfcRxMask | (1 << getQueueId())); - if (!gPortsOrch->setPortPfc(getPort(), pfcMask)) + if (!gPortsOrch->setPortPfc(getPort(), pfcTxMask, pfcRxMask)) { SWSS_LOG_ERROR("Failed to set PFC mask on port 0x%" PRIx64, getPort()); } diff --git a/orchagent/pfcwdorch.cpp b/orchagent/pfcwdorch.cpp index ca37a85be2..ad3124dffa 100644 --- a/orchagent/pfcwdorch.cpp +++ b/orchagent/pfcwdorch.cpp @@ -381,7 +381,8 @@ void PfcWdSwOrch::enableBigRedSwitchMode() for (auto &it: allPorts) { Port port = it.second; - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; if (port.m_type != Port::PHY) { @@ -389,7 +390,7 @@ void PfcWdSwOrch::enableBigRedSwitchMode() continue; } - if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcMask)) + if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port %s", port.m_alias.c_str()); return; @@ -398,7 +399,7 @@ void PfcWdSwOrch::enableBigRedSwitchMode() for (uint8_t i = 0; i < PFC_WD_TC_MAX; i++) { sai_object_id_t queueId = port.m_queue_ids[i]; - if ((pfcMask & (1 << i)) == 0 && m_entryMap.find(queueId) == m_entryMap.end()) + if ((pfcRxMask & (1 << i)) == 0 && m_entryMap.find(queueId) == m_entryMap.end()) { continue; } @@ -425,7 +426,8 @@ void PfcWdSwOrch::enableBigRedSwitchMode() for (auto & it: allPorts) { Port port = it.second; - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; if (port.m_type != Port::PHY) { @@ -433,7 +435,7 @@ void PfcWdSwOrch::enableBigRedSwitchMode() continue; } - if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcMask)) + if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port %s", port.m_alias.c_str()); return; @@ -441,7 +443,7 @@ void PfcWdSwOrch::enableBigRedSwitchMode() for (uint8_t i = 0; i < PFC_WD_TC_MAX; i++) { - if ((pfcMask & (1 << i)) == 0) + if ((pfcRxMask & (1 << i)) == 0) { continue; } @@ -477,18 +479,21 @@ bool PfcWdSwOrch::registerInWdDb(const Port& port, { SWSS_LOG_ENTER(); - uint8_t pfcMask = 0; + uint8_t pfcTxMask = 0; + uint8_t pfcRxMask = 0; - if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcMask)) + if (!gPortsOrch->getPortPfc(port.m_port_id, &pfcTxMask, &pfcRxMask)) { SWSS_LOG_ERROR("Failed to get PFC mask on port %s", port.m_alias.c_str()); return false; } + // "losslessTc" contains lossless priorities provided by "pfc_enable" attr in QoS config + // "losslessTc" contains all priorities in case of enabled asymmetric PFC feature set losslessTc; for (uint8_t i = 0; i < PFC_WD_TC_MAX; i++) { - if ((pfcMask & (1 << i)) == 0) + if ((pfcRxMask & (1 << i)) == 0) { continue; } diff --git a/orchagent/port.h b/orchagent/port.h index ad77f0a5d2..0e695707ac 100644 --- a/orchagent/port.h +++ b/orchagent/port.h @@ -39,6 +39,13 @@ struct VlanInfo sai_object_id_t host_intf_id = SAI_NULL_OBJECT_ID; }; +struct PfcInfo +{ + sai_port_priority_flow_control_mode_t pfc_mode = SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED; + uint8_t pfc_tx_bitmask = 0; + uint8_t pfc_rx_bitmask = 0; +}; + class Port { public: @@ -107,6 +114,7 @@ class Port std::vector m_priority_group_ids; sai_port_priority_flow_control_mode_t m_pfc_asym = SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED; uint8_t m_pfc_bitmask = 0; + PfcInfo m_pfc_info; uint32_t m_nat_zone_id = 0; uint32_t m_vnid = VNID_NONE; uint32_t m_fdb_count = 0; diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 31076d70ea..2427cf17d9 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -974,7 +974,7 @@ bool PortsOrch::setPortFec(Port &port, sai_port_fec_mode_t mode) return true; } -bool PortsOrch::getPortPfc(sai_object_id_t portId, uint8_t *pfc_bitmask) +bool PortsOrch::getPortPfc(sai_object_id_t portId, uint8_t *pfc_tx_bitmask, uint8_t *pfc_rx_bitmask) { SWSS_LOG_ENTER(); @@ -986,12 +986,13 @@ bool PortsOrch::getPortPfc(sai_object_id_t portId, uint8_t *pfc_bitmask) return false; } - *pfc_bitmask = p.m_pfc_bitmask; + *pfc_tx_bitmask = p.m_pfc_info.pfc_tx_bitmask; + *pfc_rx_bitmask = p.m_pfc_info.pfc_rx_bitmask; return true; } -bool PortsOrch::setPortPfc(sai_object_id_t portId, uint8_t pfc_bitmask) +bool PortsOrch::setPortPfc(sai_object_id_t portId, uint8_t pfc_tx_bitmask, uint8_t pfc_rx_bitmask) { SWSS_LOG_ENTER(); @@ -1004,39 +1005,73 @@ bool PortsOrch::setPortPfc(sai_object_id_t portId, uint8_t pfc_bitmask) return false; } - if (p.m_pfc_asym == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED) + if (p.m_pfc_info.pfc_mode == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED) { + if (pfc_tx_bitmask != pfc_rx_bitmask) + { + SWSS_LOG_ERROR("Cannot set unequal Tx 0x%x and Rx 0x%x PFC bitmasks " + "for the port 0x%" PRIx64 " with disabled \"asymmetric\" PFC mode", + pfc_tx_bitmask, pfc_rx_bitmask, portId); + return false; + } + attr.id = SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL; + attr.value.u8 = pfc_tx_bitmask; + + sai_status_t status = sai_port_api->set_port_attribute(portId, &attr); + if (status != SAI_STATUS_SUCCESS) + { + SWSS_LOG_ERROR("Failed to set PFC bitmask 0x%x for the port 0x%" PRIx64 " (rc:%d)", + attr.value.u8, portId, status); + task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); + if (handle_status != task_success) + { + return parseHandleSaiStatusFailure(handle_status); + } + } } - else if (p.m_pfc_asym == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE) + else if (p.m_pfc_info.pfc_mode == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE) { attr.id = SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_TX; - } - else - { - SWSS_LOG_ERROR("Incorrect asymmetric PFC mode: %u", p.m_pfc_asym); - return false; - } + attr.value.u8 = pfc_tx_bitmask; - attr.value.u8 = pfc_bitmask; + sai_status_t status = sai_port_api->set_port_attribute(portId, &attr); + if (status != SAI_STATUS_SUCCESS) + { + SWSS_LOG_ERROR("Failed to set Tx PFC bitmask 0x%x for the port 0x%" PRIx64 " (rc:%d)", + attr.value.u8, portId, status); + task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); + if (handle_status != task_success) + { + return parseHandleSaiStatusFailure(handle_status); + } + } - sai_status_t status = sai_port_api->set_port_attribute(portId, &attr); - if (status != SAI_STATUS_SUCCESS) - { - SWSS_LOG_ERROR("Failed to set PFC 0x%x to port id 0x%" PRIx64 " (rc:%d)", attr.value.u8, portId, status); - task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); - if (handle_status != task_success) + attr.id = SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_RX; + attr.value.u8 = pfc_rx_bitmask; + + status = sai_port_api->set_port_attribute(portId, &attr); + if (status != SAI_STATUS_SUCCESS) { - return parseHandleSaiStatusFailure(handle_status); + SWSS_LOG_ERROR("Failed to set Rx PFC bitmask 0x%x for the port 0x%" PRIx64 " (rc:%d)", + attr.value.u8, portId, status); + task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); + if (handle_status != task_success) + { + return parseHandleSaiStatusFailure(handle_status); + } } } - - if (p.m_pfc_bitmask != pfc_bitmask) + else { - p.m_pfc_bitmask = pfc_bitmask; - m_portList[p.m_alias] = p; + SWSS_LOG_ERROR("Incorrect PFC mode %u for the port 0x%" PRIx64, p.m_pfc_info.pfc_mode, portId); + return false; } + p.m_pfc_info.pfc_tx_bitmask = pfc_tx_bitmask; + p.m_pfc_info.pfc_rx_bitmask = pfc_rx_bitmask; + m_portList[p.m_alias] = p; + return true; } @@ -1045,37 +1080,46 @@ bool PortsOrch::setPortPfcAsym(Port &port, string pfc_asym) SWSS_LOG_ENTER(); sai_attribute_t attr; - uint8_t pfc = 0; + uint8_t pfc_tx_bitmask = 0; + uint8_t pfc_rx_bitmask = 0; - if (!getPortPfc(port.m_port_id, &pfc)) + if (pfc_asym_map.find(pfc_asym) == pfc_asym_map.end()) { + SWSS_LOG_ERROR("Incorrect asymmetric PFC mode: %s", pfc_asym.c_str()); return false; } - auto found = pfc_asym_map.find(pfc_asym); - if (found == pfc_asym_map.end()) + if (port.m_pfc_info.pfc_mode == pfc_asym_map[pfc_asym]) + { + SWSS_LOG_NOTICE("Asymmetric PFC mode is already set to \"%s\" for the port 0x%" PRIx64, + pfc_asym.c_str(), port.m_port_id); + return true; + } + + if (!getPortPfc(port.m_port_id, &pfc_tx_bitmask, &pfc_rx_bitmask)) { - SWSS_LOG_ERROR("Incorrect asymmetric PFC mode: %s", pfc_asym.c_str()); return false; } - auto new_pfc_asym = found->second; - if (port.m_pfc_asym == new_pfc_asym) + if (pfc_asym_map[pfc_asym] == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE) { - SWSS_LOG_NOTICE("Already set asymmetric PFC mode: %s", pfc_asym.c_str()); - return true; + pfc_rx_bitmask = static_cast(0xff); + } + else + { + pfc_rx_bitmask = pfc_tx_bitmask; } - port.m_pfc_asym = new_pfc_asym; + port.m_pfc_info.pfc_mode = pfc_asym_map[pfc_asym]; m_portList[port.m_alias] = port; attr.id = SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_MODE; - attr.value.s32 = (int32_t) port.m_pfc_asym; + attr.value.s32 = static_cast(port.m_pfc_info.pfc_mode); sai_status_t status = sai_port_api->set_port_attribute(port.m_port_id, &attr); if (status != SAI_STATUS_SUCCESS) { - SWSS_LOG_ERROR("Failed to set PFC mode %d to port id 0x%" PRIx64 " (rc:%d)", port.m_pfc_asym, port.m_port_id, status); + SWSS_LOG_ERROR("Failed to set PFC mode %d for port 0x%" PRIx64 " (rc:%d)", port.m_pfc_info.pfc_mode, port.m_port_id, status); task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); if (handle_status != task_success) { @@ -1083,29 +1127,12 @@ bool PortsOrch::setPortPfcAsym(Port &port, string pfc_asym) } } - if (!setPortPfc(port.m_port_id, pfc)) + if (!setPortPfc(port.m_port_id, pfc_tx_bitmask, pfc_rx_bitmask)) { return false; } - if (port.m_pfc_asym == SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE) - { - attr.id = SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_RX; - attr.value.u8 = static_cast(0xff); - - sai_status_t status = sai_port_api->set_port_attribute(port.m_port_id, &attr); - if (status != SAI_STATUS_SUCCESS) - { - SWSS_LOG_ERROR("Failed to set RX PFC 0x%x to port id 0x%" PRIx64 " (rc:%d)", attr.value.u8, port.m_port_id, status); - task_process_status handle_status = handleSaiSetStatus(SAI_API_PORT, status); - if (handle_status != task_success) - { - return parseHandleSaiStatusFailure(handle_status); - } - } - } - - SWSS_LOG_INFO("Set asymmetric PFC %s to port id 0x%" PRIx64, pfc_asym.c_str(), port.m_port_id); + SWSS_LOG_INFO("Set asymmetric PFC mode to \"%s\" for the port id 0x%" PRIx64, pfc_asym.c_str(), port.m_port_id); return true; } diff --git a/orchagent/portsorch.h b/orchagent/portsorch.h index 3c4d23fca9..721643e10c 100755 --- a/orchagent/portsorch.h +++ b/orchagent/portsorch.h @@ -119,8 +119,8 @@ class PortsOrch : public Orch, public Subject bool bindUnbindAclTableGroup(Port &port, bool ingress, bool bind); - bool getPortPfc(sai_object_id_t portId, uint8_t *pfc_bitmask); - bool setPortPfc(sai_object_id_t portId, uint8_t pfc_bitmask); + bool getPortPfc(sai_object_id_t portId, uint8_t *pfc_tx_bitmask, uint8_t *pfc_rx_bitmask); + bool setPortPfc(sai_object_id_t portId, uint8_t pfc_tx_bitmask, uint8_t pfc_rx_bitmask); void generateQueueMap(); void generatePriorityGroupMap(); diff --git a/orchagent/qosorch.cpp b/orchagent/qosorch.cpp index c2e15aa763..7fecb91fcc 100644 --- a/orchagent/qosorch.cpp +++ b/orchagent/qosorch.cpp @@ -1377,7 +1377,7 @@ task_process_status QosOrch::handlePortQosMapTable(Consumer& consumer) if (pfc_enable) { - if (!gPortsOrch->setPortPfc(port.m_port_id, pfc_enable)) + if (!gPortsOrch->setPortPfc(port.m_port_id, pfc_enable, pfc_enable)) { SWSS_LOG_ERROR("Failed to apply PFC bits 0x%x to port %s", pfc_enable, port_name.c_str()); } diff --git a/tests/test_pfcwd.py b/tests/test_pfcwd.py index c569bc8a43..2369074ebe 100644 --- a/tests/test_pfcwd.py +++ b/tests/test_pfcwd.py @@ -12,6 +12,70 @@ PFCWD_RULE_NAME_1 = "DROP_TEST_RULE_1" PFCWD_RULE_NAME_2 = "DROP_TEST_RULE_2" + +# Define fake platform for "DVS" fixture, it will set "platform" environment variable for the "orchagent" code. +# It is needed for the "test_PfcWdAsym" test case because some PFCWD "orchagent" code is under "platform" condition. +# There is no implementation for the virtual switch so as a result PFCWD cannot correctly initialize. +DVS_FAKE_PLATFORM = "mellanox" + + +def setPortPfc(dvs, port_name, pfc_queues): + cfg_db = dvs.get_config_db() + + if pfc_queues: + cfg_db.create_entry('PORT_QOS_MAP', port_name, {'pfc_enable': ','.join(str(q) for q in pfc_queues)}) + else: + cfg_db.delete_entry('PORT_QOS_MAP', port_name) + + +def getPortOid(dvs, port_name): + cnt_db = swsscommon.DBConnector(swsscommon.COUNTERS_DB, dvs.redis_sock, 0) + port_map_tbl = swsscommon.Table(cnt_db, 'COUNTERS_PORT_NAME_MAP') + + for k in port_map_tbl.get('')[1]: + if k[0] == port_name: + return k[1] + + return '' + + +def setPortPfcAsym(dvs, port_name, pfc_asym): + cfg_db = dvs.get_config_db() + + cfg_db.update_entry('PORT', port_name, {'pfc_asym': pfc_asym}) + + +def startPfcWd(dvs, port_name): + dvs.runcmd("pfcwd start --action drop --restoration-time 400 {} 400".format(port_name)) + + +def verifyPfcWdCountersList(dvs, port_oid): + + pfc_wd_db = swsscommon.DBConnector(swsscommon.PFC_WD_DB, dvs.redis_sock, 0) + flex_cnt_tbl = swsscommon.Table(pfc_wd_db, 'FLEX_COUNTER_TABLE') + + expected_counters_list = ['SAI_PORT_STAT_PFC_0_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_1_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_2_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_3_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_4_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_5_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_6_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_7_RX_PAUSE_DURATION_US', + 'SAI_PORT_STAT_PFC_0_RX_PKTS', + 'SAI_PORT_STAT_PFC_1_RX_PKTS', + 'SAI_PORT_STAT_PFC_2_RX_PKTS', + 'SAI_PORT_STAT_PFC_3_RX_PKTS', + 'SAI_PORT_STAT_PFC_4_RX_PKTS', + 'SAI_PORT_STAT_PFC_5_RX_PKTS', + 'SAI_PORT_STAT_PFC_6_RX_PKTS', + 'SAI_PORT_STAT_PFC_7_RX_PKTS'] + + counters_list = flex_cnt_tbl.get('PFC_WD:{}'.format(port_oid))[1][0][1].split(',') + + assert sorted(counters_list) == sorted(expected_counters_list), "PFCWD is not started for all PFC priorities" + + class TestPfcWd: def test_PfcWdAclCreationDeletion(self, dvs, dvs_acl, testlog): try: @@ -77,6 +141,37 @@ def test_PfcWdAclCreationDeletion(self, dvs, dvs_acl, testlog): finally: dvs_acl.remove_acl_table(PFCWD_TABLE_NAME) + + ''' + Verifies that PFC WD starts for all priorities in case of Asymmetric PFC is enabled + ''' + def test_PfcWdAsym(self, dvs, testlog): + + port_name = 'Ethernet0' + pfc_queues = [ 3, 4 ] + + # Configure default PFC + setPortPfc(dvs, port_name, pfc_queues) + + # Get SAI object ID for the interface + port_oid = getPortOid(dvs, port_name) + + # Enable asymmetric PFC + setPortPfcAsym(dvs, port_name, 'on') + + # Start PFCWD + startPfcWd(dvs, port_name) + + # Verify that PFC WD was started for all PFC priorities + verifyPfcWdCountersList(dvs, port_oid) + + # Disable asymmetric PFC + setPortPfcAsym(dvs, port_name, 'off') + + # Remove default PFC + setPortPfc(dvs, port_name, []) + + # # Add Dummy always-pass test at end as workaroud # for issue when Flaky fail on final test it invokes module tear-down before retrying