Skip to content

[ssw][ha] set SAI_HA_SCOPE_ATTR_ADMIN_STATE #3841

Merged
prsunny merged 11 commits intosonic-net:masterfrom
zjswhhh:disabled
Aug 27, 2025
Merged

[ssw][ha] set SAI_HA_SCOPE_ATTR_ADMIN_STATE #3841
prsunny merged 11 commits intosonic-net:masterfrom
zjswhhh:disabled

Conversation

@zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Aug 22, 2025

What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.

How I verified it

  • UTs.
  • Integrated tests on DPU.

Details if related

@zjswhhh zjswhhh requested a review from prsunny as a code owner August 22, 2025 00:06
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

sai_object_id_t ha_scope_id = m_ha_scope_entries[key].ha_scope_id;

sai_attribute_t ha_scope_attr;
ha_scope_attr.id = SAI_HA_SCOPE_ATTR_ADMIN_STATE;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need negate operation. disabled = true --> admin_state = false. Same comment in addHaScopeEntry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, addressed.

}

m_ha_scope_entries[key].metadata.set_disabled(disabled);
SWSS_LOG_NOTICE("Set HA Scope admin state for %s to %d", key.c_str(), disabled);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled should be negated as well sonic the log is about admin state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh
Copy link
Contributor Author

zjswhhh commented Aug 27, 2025

Hi @prsunny - please help review and merge.

Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prsunny
Copy link
Collaborator

prsunny commented Aug 27, 2025

@zjswhhh , could you please fix the description to follow the template? Need more details for the commit/merge message

@prsunny prsunny merged commit 6b1e480 into sonic-net:master Aug 27, 2025
15 checks passed
@zjswhhh zjswhhh deleted the disabled branch August 28, 2025 15:57
a114j0y pushed a commit to a114j0y/sonic-swss that referenced this pull request Aug 28, 2025
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.
a114j0y added a commit to a114j0y/sonic-swss that referenced this pull request Aug 28, 2025
* upstream/master:
  [ssw][ha] set `SAI_HA_SCOPE_ATTR_ADMIN_STATE`   (sonic-net#3841)
  Fix DPU restart message drop by Zmq lazy bind. (sonic-net#3837)
  [ssw][ha] consume new ha_scope fields (sonic-net#3825)
  Add PFC historical statistics estimation to the PFCWD Orch (sonic-net#3533)
a114j0y added a commit to a114j0y/sonic-swss that referenced this pull request Aug 28, 2025
* upstream/master:
  [ssw][ha] set `SAI_HA_SCOPE_ATTR_ADMIN_STATE`   (sonic-net#3841)
  Fix DPU restart message drop by Zmq lazy bind. (sonic-net#3837)
  [ssw][ha] consume new ha_scope fields (sonic-net#3825)
  Add PFC historical statistics estimation to the PFCWD Orch (sonic-net#3533)
a114j0y pushed a commit to a114j0y/sonic-swss that referenced this pull request Aug 29, 2025
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss.msft#151

Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
What I did

Take disabled field from HA_SCOPE_TABLE and set ha scope sai attribute SAI_HA_SCOPE_ATTR_ADMIN_STATE accordingly.
https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiexperimentaldashha.h#L310

Why I did it

If admin state is not set to true, the state machine won't be activated in ASIC for DPU scope HA.

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants