-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[docker-orchagent][201911] Pass ASIC vendor information to swss docker as docker level environment variable #8274
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
Conversation
…nt variable Motivation: Recently, the reserved buffer of admin-down ports is going to be reclaimed. However, the way to do this differs among vendors. We need to find a way to pass vendor information to swss docker. Implementation: Fetch the ASIC vendor information when the docker is created and pass it to docker as ASIC_VENDOR Signed-off-by: Stephen Sun <[email protected]>
@@ -245,6 +245,11 @@ start() { | |||
echo "Creating new {{docker_container_name}}$DEV container with HWSKU $HWSKU" | |||
{%- endif %} | |||
|
|||
{%- if docker_container_name == "swss" %} | |||
# Obtain the vendor name | |||
ASIC_VENDOR=`$SONIC_CFGGEN -y /etc/sonic/sonic_version.yml -v asic_type` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the 'sonic_asic_platform' var instead of defining "ASIC_VENDOR"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @neethajohn 's suggestion and it should go to master, 202012 and later branches. So please fix on master first, and then cherry-pick. If cherry-pick does not work, we can continue review here after master commit merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiluo-msft PR to master created #8361
…VENDOR Signed-off-by: Stephen Sun <[email protected]>
Thanks, Qi. |
what is the motivation to move expose asic vendor to swss docker? |
Related to the comments in sonic-net/sonic-swss#1837 |
Why I did it
Recently, the reserved buffer of admin-down ports is going to be reclaimed.
However, the way to do this differs among vendors.
We need to find a way to pass vendor information to swss docker.
Signed-off-by: Stephen Sun [email protected]
How I did it
Fetch the ASIC vendor information when the docker is created and pass it to the docker as environment variable
ASIC_VENDOR
.How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)