Mclag enhacements support code changes.#1331
Conversation
|
Hi @Praveen-Brcm |
Thanks kelly for checking. Yes, we have the plan and the changes will be added soon. |
|
Hi @Praveen-Brcm |
|
Can you please resolve conflicts |
|
@Praveen-Brcm Wonder if we can arrange some time for you to walk through the design/changes together? |
@gechiang : Sure we can have a call to go over the design(captured in HLD)/code changes. please suggest your convenient time this week .? Thanks. |
|
@Praveen-Brcm Thanks! my calendar is open from 2 to 5 PM on all workdays except Tuesday. Let me know! |
|
retest this please |
|
|
@Praveen-Brcm - please add vs test cases for mlag. See https://github.com/Azure/sonic-swss/tree/master/tests |
@rlhui Thank you for the input. |
@Praveen-Brcm 3PM 11/18/2020 works for me. Thanks! |
orchagent/fdborch.cpp
Outdated
| string key = "Vlan" + to_string(vlan.m_vlan_info.vlan_id) + ":" + entry.mac.to_string(); | ||
|
|
||
| if (fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED) | ||
| status = sai_fdb_api->create_fdb_entry(&fdb_entry, (uint32_t)attrs.size(), attrs.data()); |
There was a problem hiding this comment.
why set again since line 1362 may do the same action.
There was a problem hiding this comment.
@pettershao-ragilenetworks: Thanks for the comments. this duplicate piece looks got introduced while rebase/merging. Corrected.
orchagent/observer.h
Outdated
| #define SWSS_OBSERVER_H | ||
|
|
||
| #include <list> | ||
| #include <algorithm> |
There was a problem hiding this comment.
Please remove this include
orchagent/observer.h
Outdated
|
|
||
| enum SubjectType | ||
| { | ||
| SUBJECT_TYPE_ALL_CHANGES, |
There was a problem hiding this comment.
Where is this used? If not, please remove
There was a problem hiding this comment.
@prsunny :Thanks, the code used to use was part of optimization for the subject calss, which is no more part of the PR. Removed the attribute.
| SUBJECT_TYPE_MIRROR_SESSION_CHANGE, | ||
| SUBJECT_TYPE_INT_SESSION_CHANGE, | ||
| SUBJECT_TYPE_PORT_CHANGE, | ||
| SUBJECT_TYPE_BRIDGE_PORT_CHANGE, |
There was a problem hiding this comment.
Who is sending this update? Can you point me to code?
There was a problem hiding this comment.
@prsunny : This is been processed in isolationgrouporch.cpp:233. The update is sent from portsOrch part of addBridgePort and removeBridgePort calls. thanks.
orchagent/fdborch.cpp
Outdated
| string key = "Vlan" + to_string(vlan.m_vlan_info.vlan_id) + ":" + entry.mac.to_string(); | ||
|
|
||
| if (fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED) | ||
| if ((fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED) || |
There was a problem hiding this comment.
i think should be &&, right?
if ((fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED) &&
(fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED))
There was a problem hiding this comment.
@pettershao-ragilenetworks : Thanks for pointing to the error. You're right and is corrected now.
| SWSS_LOG_INFO("FdbOrch RemoveFDBEntry: mac=%s fdb origin is different; found_origin:%d delete_origin:%d", | ||
| entry.mac.to_string().c_str(), fdbData.origin, origin); | ||
| if ((origin == FDB_ORIGIN_MCLAG_ADVERTIZED) && (fdbData.origin == FDB_ORIGIN_LEARN) && | ||
| (port.m_oper_status == SAI_PORT_OPER_STATUS_DOWN) && (gMlagOrch->isMlagInterface(port.m_alias))) |
There was a problem hiding this comment.
one question:
when remote fdb added, and remote fdb deleted(flush for example), local peer will not remove the remote fdb entry(sync early)(peerlink up), but by local age event, right?
show mac(sync, port already modify to peerlink)
No. Vlan MacAddress Port Type
----- ------ ----------------- ------------ ------
1 10 00:10:94:00:00:33 PortChannel2 dynamic
There was a problem hiding this comment.
@pettershao-ragilenetworks: If the MAC gets added by ICCPd as remote ( Sync MAC from peer MCLAG node) the entry will be programmed as STATIC ( while allowing MAC move) There is no AGE event expected, also as you rightly said the FLUSH will not let the HW remove the MAC entry. MAC gets removed only when ICCPd sends delete event for MAC entry.
| { | ||
| //If the MAC is dynamic_local change the origin accordingly | ||
| //MAC is added/updated as dynamic to allow aging. | ||
| storeFdbData.origin = FDB_ORIGIN_LEARN; |
There was a problem hiding this comment.
so fdb entry syncd from remote peer will not be remoted immediately when remote peer do fdb flush action, right?
| } | ||
|
|
||
| // If MAC is MCLAG remote do not delete for age event, Add the MAC back.. | ||
| if (existing_entry->second.origin == FDB_ORIGIN_MCLAG_ADVERTIZED) |
There was a problem hiding this comment.
i think this can't be reach since addFdbEntry() will modify origin to FDB_ORIGIN_LEARN to store.
There was a problem hiding this comment.
@pettershao-ragilenetworks : This is to address timing scenarios and platforms which doesnt support SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE. If the MAC is added by ICCPD then the origin is set as FDB_ORIGIN_MCLAG (not to age) If the FdbOrch receives an AGE event ( in timing scenarios or on the platform which doesnt have support for SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE) and MAC entry origin is FDB_ORIGIN_MCLAG, since the MAC is remotely leared it should not get deleted so FdbOrch re-adds the MAC entry.
|
so fdb entry syncd from remote peer will not be remoted immediately when remote peer do fdb flush action, right? |
|
@gechiang , @prsunny , @akokhan ,@qiluo-msft ,@pettershao-ragilenetworks : Can you please help approve the PR and merge. Thanks . |
|
@prsunny @akokhan @qiluo-msft @pettershao-ragilenetworks, please be reminded to approve the code PR today, this is blocking the other code PRs from sonic-buildimage |
|
@Praveen-Brcm Please submit a submodule PR for SWSS so that this change is included in submodule. |
This reverts commit 7aca82d.
|
|
||
| if ((fdbData.origin == FDB_ORIGIN_VXLAN_ADVERTIZED) && (fdbData.type == "dynamic")) | ||
| if ((fdbData.origin == FDB_ORIGIN_VXLAN_ADVERTIZED) || (fdbData.origin == FDB_ORIGIN_MCLAG_ADVERTIZED) | ||
| || (fdbData.type == "dynamic")) |
There was a problem hiding this comment.
THIS modification does not look RIGHT.
There was a problem hiding this comment.
@lguohan : Thanks for pointing out. Thats right as part of WB, when the MAC addresses are added via the bake function, the attribute SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE is set wrongly.
Will raise a PR and fix this today. Thanks.
* Mclag enhacements support code changes. * Adding change to allow MCLAG remote MAC move. * Added support for adding mclag remote mac to kernel, on top of PR-1276 * Updating the change from PR1276 and PR885. * Adding new orchfiles to mock_tests * MCLAG Unique IP support changes. * Removed dependency with PR 885. * Adding observer support for mlagorch. * Fixed FDB notifiation issue * Fixing the test_mclag_fdb type attributes. * Remove as the change may not be supported on non-brcm for PortChannel settings. * Removing the isolation group handling from Mlagorch, Isolation group now will be added/updated only via mclagsyncd updates. * Added back the update function. Co-authored-by: Tapash Das <[email protected]>
* Mclag enhacements support code changes. * Adding change to allow MCLAG remote MAC move. * Added support for adding mclag remote mac to kernel, on top of PR-1276 * Updating the change from PR1276 and PR885. * Adding new orchfiles to mock_tests * MCLAG Unique IP support changes. * Removed dependency with PR 885. * Adding observer support for mlagorch. * Fixed FDB notifiation issue * Fixing the test_mclag_fdb type attributes. * Remove as the change may not be supported on non-brcm for PortChannel settings. * Removing the isolation group handling from Mlagorch, Isolation group now will be added/updated only via mclagsyncd updates. * Added back the update function. Co-authored-by: Tapash Das <[email protected]>
|
Hi @Praveen-Brcm but portsorch don't handle this field in doLagTask |
|
@chenkelly can you please open a new issue to track this? Please show a real example on how to configure it and produce the doLagTask issue as you described in that new issue creation and I will assign it to BRCM team to investigate/fix. |
* Mclag enhacements support code changes. * Adding change to allow MCLAG remote MAC move. * Added support for adding mclag remote mac to kernel, on top of PR-1276 * Updating the change from PR1276 and PR885. * Adding new orchfiles to mock_tests * MCLAG Unique IP support changes. * Removed dependency with PR 885. * Adding observer support for mlagorch. * Fixed FDB notifiation issue * Fixing the test_mclag_fdb type attributes. * Remove as the change may not be supported on non-brcm for PortChannel settings. * Removing the isolation group handling from Mlagorch, Isolation group now will be added/updated only via mclagsyncd updates. * Added back the update function. Co-authored-by: Tapash Das <[email protected]>
What I did
This PR contains the code changes to support MCLAG enhancements feature #MCLAG Enhancements HLD SONiC#596
Why I did it
Implemented as per the MCLAG enhancements HLD mentioned at : MCLAG Enhancements HLD SONiC#596
How I verified it
Mclag specific VS tests included part of check-in.
Details:
The PR includes the code changes for the MCLAG enhancements support.
This PR must work with submitted PR's in other sonic repositories which are listed below.
> Iccpd: sonic-net/sonic-buildimage#4819
> swss-common: sonic-net/sonic-swss-common#405
> Mclagsyncd: #1349
> Utilities: sonic-net/sonic-utilities#1138
> Mgmt-FW: sonic-net/sonic-mgmt-framework#59
> Mgmt-Common: sonic-net/sonic-mgmt-common#25