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

[docker-sonic-vs]Added support for Mellanox-SN2700 based SKU for docker-sonic-vs #9044

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

dgsudharsan
Copy link
Collaborator

@dgsudharsan dgsudharsan commented Oct 22, 2021

Signed-off-by: Sudharsan Dhamal Gopalarathnam [email protected]

Why I did it

Added support for Mellanox-SN2700 based SKU for docker-sonic-vs and to differentiate platform based on hw-sku rather than on fake_platform in VS.
Currently SAI VS library uses hwsku based SAI profile to differentiate and mock different platform implementations. The same functionality in swss is achieved using a fake_platform env variable.
Using a fake_platform has some drawbacks that the vs container appears to still use a different vendor hw-sku

env
PLATFORM=x86_64-kvm_x86_64-r0
HOSTNAME=dd21a1637723
PWD=/
HOME=/root
TERM=xterm
HWSKU=Force10-S6000
SHLVL=1
fake_platform=mellanox
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEBIAN_FRONTEND=noninteractive
_=/usr/bin/env

In order to unify the approach at both swss and vs SAI and to be uniform throughout this PR introduces the approach of using hw-sku to differentiate different platforms. This requires support for Mellanox-SN2700 HWSKU for Mellanox platform which is also addressed by this PR.

root@23c9ba83b0aa:/# show platform summary
/bin/sh: 1: sudo: not found
Platform: x86_64-kvm_x86_64-r0
HwSKU: Mellanox-SN2700
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
root@23c9ba83b0aa:/# env
PLATFORM=x86_64-kvm_x86_64-r0
HOSTNAME=23c9ba83b0aa
PWD=/
HOME=/root
TERM=xterm
HWSKU=Mellanox-SN2700
SHLVL=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEBIAN_FRONTEND=noninteractive
_=/usr/bin/env
root@23c9ba83b0aa:/#

How I did it

Copied relevant platform files. Modified orchagent scripts to infer platform from hwsku.

How to verify it

Run the tests that depend on platform type in vs and ensure they pass using the new approach.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@lguohan
Copy link
Collaborator

lguohan commented Oct 24, 2021

can you explain the motivation for doing this?

@dgsudharsan
Copy link
Collaborator Author

can you explain the motivation for doing this?

To have docker-sonic-vs Mellanox-SN2700 based docker-sonic-vs SKU functional. Currently It is missing few files. Additionally there were some concerns over using fake_platform by @kcudnik
sonic-net/sonic-sairedis#920 (comment)
sonic-net/sonic-sairedis#920 (comment)
Currently there is logic need to mock a specific platform both at swss and SAI vs. In SAI vs it is done based on SKU. Using fake_platform just sets swss env variable and other platform parameters in the vs appears to still show Force10-S6000 which doesn't appear to be in place.
Hence created support for a Mellanox docker-sonic-vs SKU and used it to mock mellanox based platforms

@dgsudharsan
Copy link
Collaborator Author

@lguohan Updated the description. Let me know if this sounds good.

@lguohan lguohan merged commit dd9ff10 into sonic-net:master Nov 2, 2021
prsunny pushed a commit that referenced this pull request Nov 5, 2021
… used (#9175)

*Removing fake_platform environment variable. Following the merge of #9044 and sonic-net/sonic-swss#1978 the fake_platform environment variable is not used in any place and removing the stale references.

Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
@dgsudharsan dgsudharsan deleted the vs_hwsku branch March 9, 2023 01:53
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.

3 participants