[Dual-ToR] add 'additional_mac' attr to swss vars #13546
Closed
ayurkiv-nvda wants to merge 1 commit intosonic-net:masterfrom
Closed
[Dual-ToR] add 'additional_mac' attr to swss vars #13546ayurkiv-nvda wants to merge 1 commit intosonic-net:masterfrom
ayurkiv-nvda wants to merge 1 commit intosonic-net:masterfrom
Conversation
prsunny
reviewed
Jan 31, 2023
files/build_templates/swss_vars.j2
Outdated
| "resource_type": "{{ DEVICE_METADATA.localhost.resource_type }}", | ||
| "synchronous_mode": {% if DEVICE_METADATA.localhost.synchronous_mode == "disable" %}"disable"{% else %}"enable"{% endif %} | ||
| "synchronous_mode": {% if DEVICE_METADATA.localhost.synchronous_mode == "disable" %}"disable"{% else %}"enable"{% endif %}, | ||
| "additional_mac": {% if DEVICE_METADATA.localhost.type == "ToRRouter" and DEVICE_METADATA.localhost.subtype == "DualToR" and (DEVICE_METADATA.localhost.hwsku == "Mellanox-SN2700-D48C8" or DEVICE_METADATA.localhost.hwsku == "Mellanox-SN2700") %}"enable"{% else %}"disable"{% endif %} |
Contributor
There was a problem hiding this comment.
this is programmed during RIF creation, why not take this mac from that flow?
Contributor
Author
There was a problem hiding this comment.
Want to clarify a flow:
Solution consists of 2 PR's: this one #13546 and ayurkiv-nvda/sonic-sairedis#1
Values defined in swss_vars.j2 fetched in syncd/scripts/syncd_init_common.sh:18
In config_syncd_mlnx() SYNCD_VARS with data from swss_vars.j2 is parsed and used to create sai.profile file with SAI_ADDITIONAL_MAC_ENABLED=1
8426a46 to
3750616
Compare
Contributor
Author
|
Code updated according to requiremnts: |
…anox-SN2700-D48C8 and Mellanox-SN2700) Signed-off-by: Andriy Yurkiv <[email protected]>
3750616 to
f5f317d
Compare
Contributor
Author
|
PR no more need |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Andriy Yurkiv [email protected]
Why I did it
Need to add additional MAC to VLAN interface on SPC-1. It is impossible on SPC-1, so we just add this additional MAC to FDB table, so forwarding will work.
How I did it
Send attr 'additional_mac=enabled' to syncd in order to update sai.profile with SAI_ADDITIONAL_MAC_ENABLED
How to verify it
apply Dual-ToR configuration on SPC-1
ansible-playbook -i inventory --limit sonic-switch-1 deploy_minigraph.yml -e dut_minigraph=sonic-switch-1.dualtor.xml -b -vNo crashes expected
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)