Skip to content

Commit

Permalink
[bufferorch]: Add SAI_BUFFER_PROFILE_THRESHOLD_MODE_* (#271)
Browse files Browse the repository at this point in the history
SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC/STATIC attribute is required
in order to set the corresponding threshold values.
  • Loading branch information
Shuotian Cheng authored Jul 27, 2017
1 parent 43c28f2 commit c2e39c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,20 @@ task_process_status BufferOrch::processBufferProfile(Consumer &consumer)
}
else if (fvField(*i) == buffer_dynamic_th_field_name)
{
attr.id = SAI_BUFFER_PROFILE_ATTR_THRESHOLD_MODE;
attr.value.s32 = SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC;
attribs.push_back(attr);

attr.id = SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH;
attr.value.u32 = (uint32_t)stoul(fvValue(*i));
attribs.push_back(attr);
}
else if (fvField(*i) == buffer_static_th_field_name)
{
attr.id = SAI_BUFFER_PROFILE_ATTR_THRESHOLD_MODE;
attr.value.s32 = SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC;
attribs.push_back(attr);

attr.id = SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH;
attr.value.u32 = (uint32_t)stoul(fvValue(*i));
attribs.push_back(attr);
Expand Down

0 comments on commit c2e39c4

Please sign in to comment.