Skip to content

[orchagent/dash]: Changes to support gNMI feedback for DASH objects #3490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 28, 2025

Conversation

prabhataravind
Copy link
Contributor

@prabhataravind prabhataravind commented Feb 1, 2025

This PR makes the following changes:

  • Write result of SAI API call to APP_STATE_DB for DASH objects as per https://github.com/sonic-net/SONiC/pull/1759
  • Instantiate DpuOrchDaemon for smartswitch DPUs.

Related PRs

What I did
Changes to support gNMI feedback path for DASH objects on SmartSwitch DPUs

Why I did it
To enable propagation of SAI API call results back to the controller via DPU_APPL_STATE_DB

How I verified it
By verifying that the results of SAI API calls are written to DPU_APPL_STATE_DB during a SET operation and removed during a DEL operation

Details if related

169.254.200.254:6382> select 0
OK
169.254.200.254:6382> keys *

  1. "DASH_ROUTE_GROUP_TABLE:RouteGroup1"
  2. "DASH_ROUTE_TABLE:RouteGroup1:10.0.0.0/16"
  3. "DASH_VNET_TABLE:Vnet1"
  4. "DASH_APPLIANCE_TABLE:100"
  5. "DASH_ENI_ROUTE_TABLE:497f23d7-f0ac-4c99-a98f-59b470e8c7bd"
  6. "DASH_ROUTING_TYPE_TABLE:privatelink"
  7. "DASH_ENI_TABLE:497f23d7-f0ac-4c99-a98f-59b470e8c7bd"
  8. "DASH_VNET_MAPPING_TABLE:Vnet1:10.2.0.100"
  9. "DASH_ROUTE_TABLE:RouteGroup1:10.2.0.0/16"

169.254.200.254:6382> select 16
OK
169.254.200.254:6382[16]> keys *

  1. "DASH_ROUTE_TABLE|RouteGroup1:10.0.0.0/16"
  2. "DASH_VNET_TABLE|Vnet1"
  3. "DASH_ROUTING_TYPE_TABLE|ROUTING_TYPE_PRIVATELINK"
  4. "DASH_ROUTE_GROUP_TABLE|RouteGroup1"
  5. "DASH_ENI_ROUTE_TABLE|497f23d7-f0ac-4c99-a98f-59b470e8c7bd"
  6. "DASH_APPLIANCE_TABLE|100"
  7. "DASH_ROUTE_TABLE|RouteGroup1:10.2.0.0/16"
  8. "DASH_VNET_MAPPING_TABLE|Vnet1:10.2.0.100"
  9. "DASH_ENI_TABLE|497f23d7-f0ac-4c99-a98f-59b470e8c7bd"

169.254.200.254:6382[16]> hgetall "DASH_VNET_TABLE|Vnet1"

  1. "result"
  2. "0"

169.254.200.254:6382[16]> hgetall "DASH_ROUTE_GROUP_TABLE|RouteGroup1"

  1. "result"
  2. "0"
  3. "version"
  4. "rg_version"

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Pull request contains merge conflicts.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@prabhataravind
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@prabhataravind
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@prabhataravind
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

qiluo-msft
qiluo-msft previously approved these changes Apr 23, 2025
@prabhataravind prabhataravind dismissed stale reviews from qiluo-msft and prsunny via 6e6fb94 April 23, 2025 03:52
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

it_prev++;
}
writeResultToDB(dash_tunnel_result_table_, tunnel_name, result);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should only be writing the result here if the tunnel only has one endpoint, if it has multiple then we need to wait until after addTunnelMembersPost

@@ -172,14 +187,17 @@ void DashTunnelOrch::doTask(ConsumerBase &consumer)
}
else
{
result = DASH_RESULT_FAILURE;
Copy link
Contributor

Choose a reason for hiding this comment

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

Keeping the tunnel in the consumer here indicates a success, we need to keep it in the consumer to allow for post-bulk ops in addTunnelMembersPost. I think a simple bool is not able to accurately represent all possible results here which I need to fix it a future PR, but I think at this point we should only consider the task a failure if addTunnelPost signals to remove from the consumer AND there is more than one tunnel endpoint.

Signed-off-by: Prabhat Aravind <[email protected]>
Signed-off-by: Prabhat Aravind <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Prabhat Aravind <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -1250,3 +1202,68 @@ bool FabricOrchDaemon::init()

return true;
}

DpuOrchDaemon::DpuOrchDaemon(DBConnector *applDb, DBConnector *configDb, DBConnector *stateDb, DBConnector *chassisAppDb, DBConnector *dpuAppDb, DBConnector *dpuAppstateDb, ZmqServer *zmqServer) :
Copy link

Choose a reason for hiding this comment

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

So we are using DpuOrchDaemon for Orchs running on DPU? This is discussed and determined? If so, I will adapt my PR to this, but just wanted to confirm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I felt it is better to do it this way given that we have additional dpu specific databases to deal with which are unnecessary for other orchs.

@prsunny prsunny merged commit 47e9b2f into sonic-net:master Apr 28, 2025
15 checks passed
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.

7 participants