[teamsyncd]: Add LAG members to syncd when created.#183
[teamsyncd]: Add LAG members to syncd when created.#183marian-pritsak wants to merge 1 commit intosonic-net:masterfrom
Conversation
|
@marian-pritsak could you update the pull request as i just merged #182. |
| return; | ||
|
|
||
| string lagName = rtnl_link_get_name(link); | ||
| string intfName = rtnl_link_get_name(link); |
There was a problem hiding this comment.
Here we can have either a LAG or its member, so I picked a more general name
There was a problem hiding this comment.
Please put a comment to that effect. That this can be the LAG or a member.
teamsyncd/teamsync.cpp
Outdated
| void TeamSync::TeamPortSync::syncMember(const std::string& intfName) | ||
| { | ||
| const std::string config(teamdctl_config_get_raw(m_tdc)); | ||
| const std::string intfNameStr("\"" + (intfName + "\"")); |
There was a problem hiding this comment.
why there is one more '(' and ')' inside?
It is possible that LAG members are created after teamd creates LAG. In that case we have to monitor RTM_NEWLINK messages and addd them via teamdctl. Signed-off-by: marian-pritsak <marianp@mellanox.com> Conflicts: teamsyncd/teamsync.cpp
| return; | ||
|
|
||
| string lagName = rtnl_link_get_name(link); | ||
| string intfName = rtnl_link_get_name(link); |
There was a problem hiding this comment.
Please put a comment to that effect. That this can be the LAG or a member.
| SWSS_LOG_THROW("Failed to allocate teamdctl context."); | ||
| } | ||
|
|
||
| err = teamdctl_connect(m_tdc, m_lagName.c_str(), NULL, NULL); |
There was a problem hiding this comment.
Where is this defined? I'm sorry but I couldn't find the function. Can you please tell me which file has it?
|
Not valid anymore, closing |
Signed-off-by: Sihui Han <sihan@microsoft.com>
…sonic-net#183) <!-- Please make sure you have read and understood the contribution guildlines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md 1. Make sure your commit includes a signature generted with `git commit -s` 2. Make sure your commit title follows the correct format: [component]: description 3. Make sure your commit message contains enough details about the change and related tests 4. Make sure your pull request adds related reviewers, asignees, labels Please also provide the following information in this pull request: --> **What I did** Take `flow_version` field from ha scope event and write it into dpu_state_db entry `ha_term` per HLD. https://github.com/opencomputeproject/SAI/blob/b925fc0f0fc8c620eea7d9dead7fc99e33b7b44e/experimental/saiswitchextensions.h#L113 sign-off: Jing Zhang zhangjing@microsoft.com **Why I did it** Otherwise hamgrd won't be able to deserialize the state db table (due to missing fields). **How I verified it** UTs. **Details if related**
It is possible that LAG members are created after teamd
creates LAG. In that case we have to monitor RTM_NEWLINK
messages and addd them via teamdctl.
Signed-off-by: marian-pritsak marianp@mellanox.com