Skip to content

Fix serialization and refactor virtual switch init logic#85

Merged
kcudnik merged 3 commits intosonic-net:masterfrom
kcudnik:vsinit
Oct 13, 2016
Merged

Fix serialization and refactor virtual switch init logic#85
kcudnik merged 3 commits intosonic-net:masterfrom
kcudnik:vsinit

Conversation

@kcudnik
Copy link
Copy Markdown
Collaborator

@kcudnik kcudnik commented Oct 11, 2016

No description provided.

{
SWSS_LOG_ENTER();

std::string otstr;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Closed.

{
auto it = vlan_members_map[vlan_id].find(vlan_member_id);

vlan_members_map[vlan_id].erase(it);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will it be set::end? If never, add assertion?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

no, as you can se its only executed after success, so vlan member id will exists

std::string lane_str;
std::set<int> lane_set;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you could use tokenize() function in swss-common


vlan_members_map[DEFAULT_VLAN_NUMBER] = {};

for (auto &port_id : port_list)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i doubt if we will add this to vs behavior. default vlan 1 needs to be there, but we could have 0 members in the default vlan. the behavior of adding all ports into default vlan by default is optional.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is virtual switch, we decide what behavior is, also metadata will not allow removing vlan 1

@kcudnik kcudnik closed this Oct 12, 2016
@kcudnik kcudnik deleted the vsinit branch October 12, 2016 21:45
@kcudnik kcudnik restored the vsinit branch October 12, 2016 21:50
@kcudnik kcudnik reopened this Oct 12, 2016
@kcudnik kcudnik merged commit b14b0f8 into sonic-net:master Oct 13, 2016
@kcudnik kcudnik deleted the vsinit branch October 13, 2016 00:07
DavidZagury pushed a commit to DavidZagury/sonic-sairedis that referenced this pull request Dec 6, 2025
… class (sonic-net#85)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
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.

3 participants