Skip to content

Commit

Permalink
[ppi]: Enable bulk API.
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
  • Loading branch information
nazariig committed Dec 9, 2022
1 parent 4ab46b5 commit f697b74
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ config_syncd_bcm()

config_syncd_mlnx()
{
CMD_ARGS+=" -p /tmp/sai.profile"
CMD_ARGS+=" -l -p /tmp/sai.profile"

[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 )

Expand Down Expand Up @@ -285,7 +285,7 @@ config_syncd_nephos()

config_syncd_vs()
{
CMD_ARGS+=" -p $HWSKU_DIR/sai.profile"
CMD_ARGS+=" -l -p $HWSKU_DIR/sai.profile"
}

config_syncd_soda()
Expand Down
4 changes: 2 additions & 2 deletions vslib/SwitchStateBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ sai_status_t SwitchStateBase::bulkCreate(

for (it = 0; it < object_count; it++)
{
object_statuses[it] = create_internal(object_type, serialized_object_ids[it], switch_id, attr_count[it], attr_list[it]);
object_statuses[it] = create(object_type, serialized_object_ids[it], switch_id, attr_count[it], attr_list[it]);

if (object_statuses[it] != SAI_STATUS_SUCCESS)
{
Expand Down Expand Up @@ -779,7 +779,7 @@ sai_status_t SwitchStateBase::bulkRemove(

for (it = 0; it < object_count; it++)
{
object_statuses[it] = remove_internal(object_type, serialized_object_ids[it]);
object_statuses[it] = remove(object_type, serialized_object_ids[it]);

if (object_statuses[it] != SAI_STATUS_SUCCESS)
{
Expand Down
6 changes: 6 additions & 0 deletions vslib/VirtualSwitchSaiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,12 @@ sai_status_t VirtualSwitchSaiInterface::bulkCreate(
{
SWSS_LOG_ENTER();

// create new real object IDs
for (uint32_t idx = 0; idx < object_count; idx++)
{
object_id[idx] = m_realObjectIdManager->allocateNewObjectId(object_type, switch_id);
}

std::vector<std::string> serialized_object_ids;

// on create vid is put in db by syncd
Expand Down

0 comments on commit f697b74

Please sign in to comment.