Skip to content

[teamsyncd]: Add LAG members to syncd when created.#183

Closed
marian-pritsak wants to merge 1 commit intosonic-net:masterfrom
marian-pritsak:master
Closed

[teamsyncd]: Add LAG members to syncd when created.#183
marian-pritsak wants to merge 1 commit intosonic-net:masterfrom
marian-pritsak:master

Conversation

@marian-pritsak
Copy link
Collaborator

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

@stcheng
Copy link
Contributor

stcheng commented Mar 27, 2017

@marian-pritsak could you update the pull request as i just merged #182.
And according to my understanding of this pull request, we don't need to have teamdctl in /etc/network/interfaces file, correct? Or make this change as an option when starting teamsyncd, so we could later switch to this method when we moving interfaces information into each of the containers.

return;

string lagName = rtnl_link_get_name(link);
string intfName = rtnl_link_get_name(link);
Copy link
Contributor

Choose a reason for hiding this comment

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

or change to teamName?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we can have either a LAG or its member, so I picked a more general name

Copy link
Contributor

@nikos-github nikos-github Sep 25, 2017

Choose a reason for hiding this comment

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

Please put a comment to that effect. That this can be the LAG or a member.

void TeamSync::TeamPortSync::syncMember(const std::string& intfName)
{
const std::string config(teamdctl_config_get_raw(m_tdc));
const std::string intfNameStr("\"" + (intfName + "\""));
Copy link
Contributor

Choose a reason for hiding this comment

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

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);
Copy link
Contributor

@nikos-github nikos-github Sep 25, 2017

Choose a reason for hiding this comment

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

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this defined? I'm sorry but I couldn't find the function. Can you please tell me which file has it?

@marian-pritsak
Copy link
Collaborator Author

Not valid anymore, closing

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
Signed-off-by: Sihui Han <sihan@microsoft.com>
kktheballer pushed a commit to kktheballer/sonic-swss that referenced this pull request Jan 14, 2026
…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**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants