Skip to content

Commit

Permalink
Fix in switchorch: unsupported attribute causes skipping of processin…
Browse files Browse the repository at this point in the history
…g the rest of configurations

Signed-off-by: mazora <[email protected]>
  • Loading branch information
amazor committed Jun 30, 2024
1 parent 78af15d commit 5741ef1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion orchagent/switchorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,18 @@ void SwitchOrch::doAppSwitchTableTask(Consumer &consumer)
invalid_attr = true;
break;
}
if (invalid_attr || unsupported_attr)
if (invalid_attr)
{
/* break from kfvFieldsValues for loop */
SWSS_LOG_ERROR("Invalid Attribute %s", attribute.c_str());
// Will not continue to set the rest of the attributes
break;
}
if (unsupported_attr){
SWSS_LOG_ERROR("Unsupported Attribute %s", attribute.c_str());
// Continue to set the rest of the attributes, even if current attribute is unsupported
continue;
}

sai_status_t status = sai_switch_api->set_switch_attribute(gSwitchId, &attr);
if (status != SAI_STATUS_SUCCESS)
Expand Down

0 comments on commit 5741ef1

Please sign in to comment.