Skip to content

Commit 66287cf

Browse files
yangbashuanglguohan
authored andcommitted
fix SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH value type mismatch bug (sonic-net#502)
1 parent 43365f3 commit 66287cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

orchagent/bufferorch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ task_process_status BufferOrch::processBufferProfile(Consumer &consumer)
245245
attribs.push_back(attr);
246246

247247
attr.id = SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH;
248-
attr.value.u32 = (uint32_t)stoul(value);
248+
attr.value.s8 = (sai_int8_t)stol(value);
249249
attribs.push_back(attr);
250250
}
251251
else if (field == buffer_static_th_field_name)

orchagent/pfcactionhandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ void PfcWdZeroBufferHandler::ZeroBufferProfile::createZeroBufferProfile(bool ing
593593
attribs.push_back(attr);
594594

595595
attr.id = SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH;
596-
attr.value.u32 = -8; // ALPHA_0
596+
attr.value.s8 = -8; // ALPHA_0
597597
attribs.push_back(attr);
598598

599599
status = sai_buffer_api->create_buffer_profile(

0 commit comments

Comments
 (0)