Skip to content

[Dual-ToR] add 'additional_mac' attr to swss vars #13546

Closed
ayurkiv-nvda wants to merge 1 commit intosonic-net:masterfrom
ayurkiv-nvda:upstream_additional_mac
Closed

[Dual-ToR] add 'additional_mac' attr to swss vars #13546
ayurkiv-nvda wants to merge 1 commit intosonic-net:masterfrom
ayurkiv-nvda:upstream_additional_mac

Conversation

@ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented Jan 30, 2023

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 -v
No crashes expected

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

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)

"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 %}
Copy link
Contributor

Choose a reason for hiding this comment

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

this is programmed during RIF creation, why not take this mac from that flow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@ayurkiv-nvda ayurkiv-nvda force-pushed the upstream_additional_mac branch from 8426a46 to 3750616 Compare January 31, 2023 16:52
@ayurkiv-nvda
Copy link
Contributor Author

Code updated according to requiremnts:

This confiugration knob should be set when the Dual-TOR feature is enabled in SONIC. 
The proposal is to use the following SONIC configuration to set the knob in sai.profile:

DEVICE_METADATA|localhost.type == ToRRouter
DEVICE_METADATA|localhost.subtype == DualTor

Only when all configuration criteria above are true then the knob 
(can be called SAI_ADDITIONAL_MAC and set to TRUE or enable) will be set to sai.profile

…anox-SN2700-D48C8 and Mellanox-SN2700)

Signed-off-by: Andriy Yurkiv <[email protected]>
@ayurkiv-nvda ayurkiv-nvda force-pushed the upstream_additional_mac branch from 3750616 to f5f317d Compare February 1, 2023 17:52
@ayurkiv-nvda ayurkiv-nvda changed the title [Dual-ToR] add 'additional_mac' attr to swss vars (enable it for Mellanox-SN2700-D48C8 and Mellanox-SN2700) [Dual-ToR] add 'additional_mac' attr to swss vars Feb 2, 2023
@ayurkiv-nvda
Copy link
Contributor Author

PR no more need
Will use DUAL_TOR from #12605 for Additional MAC

@ayurkiv-nvda ayurkiv-nvda deleted the upstream_additional_mac branch February 7, 2023 15:34
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