Skip to content

[P4Orch] Add label to uniquely identify udf group object. - #4211

Draft
ksravani-hcl wants to merge 1 commit into
sonic-net:masterfrom
ksravani-hcl:acl_rule_s1
Draft

[P4Orch] Add label to uniquely identify udf group object.#4211
ksravani-hcl wants to merge 1 commit into
sonic-net:masterfrom
ksravani-hcl:acl_rule_s1

Conversation

@ksravani-hcl

@ksravani-hcl ksravani-hcl commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

What I did
Adding label to uniquely identify udf group object.
Introduced a NameLabelMapper utility to manage unique object-to-label mappings and integrated it into the OrchDaemon lifecycle. Modified p4orch to assign a persistent SAI_UDF_GROUP_ATTR_LABEL during UDF group creation and implemented STATE_DB serialization to preserve these mappings across warm restarts.

Why I did it
To standardize the identification of SAI objects that lack a primary unique key, such as UDF groups, to enable accurate object correlation during reconciliation. This ensures hitless warm restarts and prevents duplicate hardware object creation by providing a persistent identifier that survives control plane restarts.

How I verified it
Verified the persistence mechanism through local builds and successful execution of the full unit test suite.

Details if related
#4176 is the base PR for #4211 & #4246.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

mint570
mint570 previously approved these changes Mar 12, 2026
Comment thread orchagent/namelabelmapper.h Outdated
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ksravani-hcl ksravani-hcl changed the title [P4Orch] Add label to uniquely identify udf group object. [Generic-P4Orch] Add label to uniquely identify udf group object. Apr 15, 2026
mint570
mint570 previously approved these changes Apr 17, 2026
@divyagayathri-hcl

Copy link
Copy Markdown
Contributor

@prsunny can you take a look at this PR to see how this can impact upstream SONiC?

@ksravani-hcl
ksravani-hcl marked this pull request as ready for review April 24, 2026 14:29
@ksravani-hcl
ksravani-hcl requested a review from prsunny as a code owner April 24, 2026 14:29
@kishanps

Copy link
Copy Markdown
Contributor

@prsunny Can you please review this PR?
cc: @mint570

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

mint570
mint570 previously approved these changes Apr 30, 2026
@prsunny

prsunny commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Same comments for namelabel as other PRs.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ksravani-hcl ksravani-hcl changed the title [Generic-P4Orch] Add label to uniquely identify udf group object. [P4Orch] Add label to uniquely identify udf group object. May 14, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ksravani-hcl
ksravani-hcl marked this pull request as draft May 15, 2026 12:08
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: SRAVANI KANASANI <kanasanis@google.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants