Skip to content

Commit

Permalink
[syncd] Fix status succes on bulk fallback (sonic-net#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored Jul 30, 2021
1 parent 6921d99 commit 0d5f82f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/RedisRemoteSaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ sai_status_t RedisRemoteSaiInterface::waitForBulkResponse(

if (values.size () != object_count)
{
SWSS_LOG_THROW("wrong number of counters, got %zu, expected %u", values.size(), object_count);
SWSS_LOG_THROW("wrong number of statuses, got %zu, expected %u", values.size(), object_count);
}

// deserialize statuses for all objects
Expand Down
6 changes: 6 additions & 0 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,8 @@ sai_status_t Syncd::processBulkEntry(

// vendor SAI don't bulk API yet, so execute one by one

all = SAI_STATUS_SUCCESS;

for (size_t idx = 0; idx < objectIds.size(); ++idx)
{
sai_object_meta_key_t metaKey;
Expand Down Expand Up @@ -1585,6 +1587,10 @@ sai_status_t Syncd::processBulkOid(
}
}

// vendor SAI don't bulk API yet, so execute one by one

all = SAI_STATUS_SUCCESS;

for (size_t idx = 0; idx < objectIds.size(); ++idx)
{
sai_status_t status = SAI_STATUS_FAILURE;
Expand Down

0 comments on commit 0d5f82f

Please sign in to comment.