@@ -334,11 +334,14 @@ task_process_status BufferOrch::processBufferPool(Consumer &consumer)
334
334
}
335
335
if (SAI_NULL_OBJECT_ID != sai_object)
336
336
{
337
- sai_status = sai_buffer_api->set_buffer_pool_attribute (sai_object, &attribs[0 ]);
338
- if (SAI_STATUS_SUCCESS != sai_status)
337
+ for (auto &attribute : attribs)
339
338
{
340
- SWSS_LOG_ERROR (" Failed to modify buffer pool, name:%s, sai object:%" PRIx64 " , status:%d" , object_name.c_str (), sai_object, sai_status);
341
- return task_process_status::task_failed;
339
+ sai_status = sai_buffer_api->set_buffer_pool_attribute (sai_object, &attribute);
340
+ if (SAI_STATUS_SUCCESS != sai_status)
341
+ {
342
+ SWSS_LOG_ERROR (" Failed to modify buffer pool, name:%s, sai object:%" PRIx64 " , status:%d" , object_name.c_str (), sai_object, sai_status);
343
+ return task_process_status::task_failed;
344
+ }
342
345
}
343
346
SWSS_LOG_DEBUG (" Modified existing pool:%" PRIx64 " , type:%s name:%s " , sai_object, map_type_name.c_str (), object_name.c_str ());
344
347
}
@@ -503,11 +506,14 @@ task_process_status BufferOrch::processBufferProfile(Consumer &consumer)
503
506
if (SAI_NULL_OBJECT_ID != sai_object)
504
507
{
505
508
SWSS_LOG_DEBUG (" Modifying existing sai object:%" PRIx64, sai_object);
506
- sai_status = sai_buffer_api->set_buffer_profile_attribute (sai_object, &attribs[0 ]);
507
- if (SAI_STATUS_SUCCESS != sai_status)
509
+ for (auto &attribute : attribs)
508
510
{
509
- SWSS_LOG_ERROR (" Failed to modify buffer profile, name:%s, sai object:%" PRIx64 " , status:%d" , object_name.c_str (), sai_object, sai_status);
510
- return task_process_status::task_failed;
511
+ sai_status = sai_buffer_api->set_buffer_profile_attribute (sai_object, &attribute);
512
+ if (SAI_STATUS_SUCCESS != sai_status)
513
+ {
514
+ SWSS_LOG_ERROR (" Failed to modify buffer profile, name:%s, sai object:%" PRIx64 " , status:%d" , object_name.c_str (), sai_object, sai_status);
515
+ return task_process_status::task_failed;
516
+ }
511
517
}
512
518
}
513
519
else
0 commit comments