Skip to content
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

[DPU] Simplify SWSS initialization to meet DPU requirements. #2440

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

oleksandrivantsiv
Copy link
Collaborator

Signed-off-by: Oleksandr Ivantsiv oivantsiv@nvidia.com

What I did
DPU supports features subset from Switch SONiC. To allow SWSS to run on DPU the initialization flow was simplified. During the start of the SWSS applications unsupported attributes are not configured. The list of SAI attributes supported by DPU is documented in DASH HLD.

  • The precondition is to have the switch type as 'dpu'
  • SAI Redis timeouts were extended such as for other switch types
  • Only SAI calls are masked, the rest is the same using defaults. It is assumed that the user should not invoke flows/CLI commands which DPU does not support. No extra validation has been added.

Why I did it
To allow the SWSS application to run on DPU.

How I verified it
Run SWSS on DPU platform. Verify that unsupported attributes are not called.
Run SONiC as VS set as switch type DPU

Details if related

Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
vector<string> p4rt_tables = {APP_P4RT_TABLE_NAME};
gP4Orch = new P4Orch(m_applDb, p4rt_tables, vrf_orch, gCoppOrch);
m_orchList.push_back(gP4Orch);
if (gMySwitchType != "dpu")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this applicable? This should not be impacting even if initialized, correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After reworking of P4Orch this is not needed anymore.

/* In DPU SONiC this step is not needed as netdevs in Kernel are created in the early stage of the syncd service start,
* when driver is loading. And exist while the driver is not unloaded.
*/
if (g_switchType != "dpu")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just add the check and return if dpu. If other platform require this in future, lets address it accordingly.

@oleksandrivantsiv
Copy link
Collaborator Author

@prsunny I resolved all the comments. Can you please take a look?

@prsunny prsunny merged commit ab8e6bb into sonic-net:dash Sep 19, 2022
prsunny pushed a commit that referenced this pull request Oct 11, 2022
* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
Pterosaur pushed a commit to Pterosaur/sonic-swss that referenced this pull request Nov 5, 2022
…et#2440)

* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
oleksandrivantsiv added a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Dec 21, 2022
…et#2440)

* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Jul 21, 2023
…et#2440)

* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Jul 25, 2023
…et#2440)

* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Jul 27, 2023
sonic-net#2440)

* [DPU] Simplify SWSS initialization to meet DPU requirements.
Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
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.

2 participants