Skip to content

Commit

Permalink
Postpone intf task after buffer configuration applied on the port. (s…
Browse files Browse the repository at this point in the history
…onic-net#539)

This also ensures all port setting applied before intf setting.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
  • Loading branch information
jipanyang authored and lguohan committed Jul 25, 2018
1 parent 4730653 commit 651bedb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "swssnet.h"
#include "tokenize.h"
#include "crmorch.h"
#include "bufferorch.h"

extern sai_object_id_t gVirtualRouterId;

Expand All @@ -20,6 +21,7 @@ extern sai_neighbor_api_t* sai_neighbor_api;
extern PortsOrch *gPortsOrch;
extern sai_object_id_t gSwitchId;
extern CrmOrch *gCrmOrch;
extern BufferOrch *gBufferOrch;

const int intfsorch_pri = 35;

Expand Down Expand Up @@ -97,6 +99,13 @@ void IntfsOrch::doTask(Consumer &consumer)
continue;
}

// buffer configuration hasn't been applied yet, hold from intf config.
if (!gBufferOrch->isPortReady(alias))
{
it++;
continue;
}

auto it_intfs = m_syncdIntfses.find(alias);
if (it_intfs == m_syncdIntfses.end())
{
Expand Down
4 changes: 2 additions & 2 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bool OrchDaemon::init()
CFG_DTEL_EVENT_TABLE_NAME
};

m_orchList = { switch_orch, gCrmOrch, gPortsOrch, intfs_orch, gNeighOrch, gRouteOrch, copp_orch, tunnel_decap_orch, qos_orch, gBufferOrch, mirror_orch };
m_orchList = { switch_orch, gCrmOrch, gBufferOrch, gPortsOrch, intfs_orch, gNeighOrch, gRouteOrch, copp_orch, tunnel_decap_orch, qos_orch, mirror_orch };

bool initialize_dtel = false;
if (platform == BFN_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING)
Expand Down Expand Up @@ -155,7 +155,7 @@ bool OrchDaemon::init()
m_orchList.push_back(gAclOrch);
m_orchList.push_back(gFdbOrch);
m_orchList.push_back(vrf_orch);

m_select = new Select();


Expand Down

0 comments on commit 651bedb

Please sign in to comment.