Skip to content

Commit

Permalink
[bufferorch] Fixed buffer and buffer profile attributes types accorin…
Browse files Browse the repository at this point in the history
…g to changes in SAI 1.5 (#1120)
  • Loading branch information
vsenchyshyn authored and qiluo-msft committed Nov 7, 2019
1 parent 85ff17d commit c57fc34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ task_process_status BufferOrch::processBufferPool(Consumer &consumer)
if (field == buffer_size_field_name)
{
attr.id = SAI_BUFFER_POOL_ATTR_SIZE;
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attribs.push_back(attr);
}
else if (field == buffer_pool_type_field_name)
Expand Down Expand Up @@ -307,7 +307,7 @@ task_process_status BufferOrch::processBufferPool(Consumer &consumer)
}
else if (field == buffer_pool_xoff_field_name)
{
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attr.id = SAI_BUFFER_POOL_ATTR_XOFF_SIZE;
attribs.push_back(attr);
}
Expand Down Expand Up @@ -414,19 +414,19 @@ task_process_status BufferOrch::processBufferProfile(Consumer &consumer)
}
else if (field == buffer_xon_field_name)
{
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attr.id = SAI_BUFFER_PROFILE_ATTR_XON_TH;
attribs.push_back(attr);
}
else if (field == buffer_xon_offset_field_name)
{
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attr.id = SAI_BUFFER_PROFILE_ATTR_XON_OFFSET_TH;
attribs.push_back(attr);
}
else if (field == buffer_xoff_field_name)
{
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attr.id = SAI_BUFFER_PROFILE_ATTR_XOFF_TH;
attribs.push_back(attr);
}
Expand All @@ -453,7 +453,7 @@ task_process_status BufferOrch::processBufferProfile(Consumer &consumer)
attribs.push_back(attr);

attr.id = SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH;
attr.value.u32 = (uint32_t)stoul(value);
attr.value.u64 = (uint64_t)stoul(value);
attribs.push_back(attr);
}
else
Expand Down
2 changes: 1 addition & 1 deletion orchagent/pfcactionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ void PfcWdZeroBufferHandler::ZeroBufferProfile::createZeroBufferProfile(bool ing

// Create zero pool
attr.id = SAI_BUFFER_POOL_ATTR_SIZE;
attr.value.u32 = 0;
attr.value.u64 = 0;
attribs.push_back(attr);

attr.id = SAI_BUFFER_POOL_ATTR_TYPE;
Expand Down

0 comments on commit c57fc34

Please sign in to comment.