Skip to content

Commit

Permalink
orchagent: Setting SAI_MIRROR_SESSION_ATTR_TC as optional (sonic-net#162
Browse files Browse the repository at this point in the history
)

Signed-off-by: Shuotian Cheng <[email protected]>
  • Loading branch information
Shuotian Cheng authored Feb 11, 2017
1 parent 3abdbdf commit 9f193ba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,14 @@ bool MirrorOrch::activateSession(const string& name, MirrorEntry& session)

assert(!session.status);

attr.id = SAI_MIRROR_SESSION_ATTR_TC;
attr.value.u8 = session.queue;
attrs.push_back(attr);
/* Some platforms don't support SAI_MIRROR_SESSION_ATTR_TC and only
* support global mirror session traffic class. */
if (session.queue != 0)
{
attr.id = SAI_MIRROR_SESSION_ATTR_TC;
attr.value.u8 = session.queue;
attrs.push_back(attr);
}

attr.id = SAI_MIRROR_SESSION_ATTR_MONITOR_PORT;
attr.value.oid = session.neighborInfo.portId;
Expand Down

0 comments on commit 9f193ba

Please sign in to comment.