From c57fc34b10689fef48ed9131bd0b4088ade92c33 Mon Sep 17 00:00:00 2001 From: Vitaliy Senchyshyn <43479243+vsenchyshyn@users.noreply.github.com> Date: Thu, 7 Nov 2019 10:58:14 -0800 Subject: [PATCH] [bufferorch] Fixed buffer and buffer profile attributes types accoring to changes in SAI 1.5 (#1120) --- orchagent/bufferorch.cpp | 12 ++++++------ orchagent/pfcactionhandler.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/orchagent/bufferorch.cpp b/orchagent/bufferorch.cpp index 20944304b801..ce2f2f2d1e29 100644 --- a/orchagent/bufferorch.cpp +++ b/orchagent/bufferorch.cpp @@ -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) @@ -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); } @@ -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); } @@ -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 diff --git a/orchagent/pfcactionhandler.cpp b/orchagent/pfcactionhandler.cpp index df0977cb66f6..b78b9e993e24 100644 --- a/orchagent/pfcactionhandler.cpp +++ b/orchagent/pfcactionhandler.cpp @@ -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;