From 902239ad4c67c8e85da296b00badbc08b9820001 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 26 Jul 2018 14:07:24 -0700 Subject: [PATCH] [portsorch]: Refix: Don't print error when alias equal to PortConfigDone (#548) --- orchagent/portsorch.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 109695a2821d..82b09b5ab098 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -1357,7 +1357,13 @@ void PortsOrch::doPortTask(Consumer &consumer) continue; } - if (alias != "PortConfigDone" && !gBufferOrch->isPortReady(alias)) + if (alias == "PortConfigDone") + { + it = consumer.m_toSync.erase(it); + continue; + } + + if (!gBufferOrch->isPortReady(alias)) { // buffer configuration hasn't been applied yet. save it for future retry it++; @@ -1365,7 +1371,7 @@ void PortsOrch::doPortTask(Consumer &consumer) } Port p; - if (!getPort(alias, p) && alias != "PortConfigDone") + if (!getPort(alias, p)) { SWSS_LOG_ERROR("Failed to get port id by alias:%s", alias.c_str()); } @@ -1516,7 +1522,6 @@ void PortsOrch::doPortTask(Consumer &consumer) { SWSS_LOG_ERROR("Unknown fec mode %s", fec_mode.c_str()); } - } } }