Skip to content

Commit

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

This also ensures all port setting applied before intf setting.

Signed-off-by: Jipan Yang <[email protected]>
  • Loading branch information
jipanyang authored and lguohan committed Jul 28, 2018
1 parent 2d2fdaa commit 8f52e29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool OrchDaemon::init()

gAclOrch = new AclOrch(acl_table_connectors, gPortsOrch, mirror_orch, gNeighOrch, gRouteOrch);

m_orchList = { switch_orch, gCrmOrch, gPortsOrch, intfs_orch, gNeighOrch, gRouteOrch, copp_orch, tunnel_decap_orch, qos_orch, gBufferOrch, mirror_orch, gAclOrch, gFdbOrch, vrf_orch };
m_orchList = { switch_orch, gCrmOrch, gBufferOrch, gPortsOrch, intfs_orch, gNeighOrch, gRouteOrch, copp_orch, tunnel_decap_orch, qos_orch, mirror_orch, gAclOrch, gFdbOrch, vrf_orch };
m_select = new Select();


Expand Down

0 comments on commit 8f52e29

Please sign in to comment.