Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ECMP NHopGroup for Port Channel oper down #1030

Merged
merged 5 commits into from
Sep 30, 2019

Conversation

sumukhatv
Copy link
Contributor

What I did
Remove nexthop member from nexthop group immediately when port-channel oper status becomes down

Why I did it
This will reduce the response time for port-channel down event thus helping prevent packet drops

How I verified it

Details if related
Timeline of events on a DUT immediately after bringing down a portchannel:
21:20:51 Updated NextHop group to 3 members
21:20:52 First v4 route update
21:21:13 Last v4 route update
21:21:13 4 member NextHop group deleted (v4)
21:21:13 3 member NextHop group created (v6)
21:21:13 First v6 route update
21:21:16 Last v6 route update

Sumukha Tumkur Vani added 3 commits August 9, 2019 14:46
@sumukhatv sumukhatv closed this Aug 16, 2019
@sumukhatv sumukhatv reopened this Aug 16, 2019
@prsunny
Copy link
Collaborator

prsunny commented Aug 16, 2019

@sumukhatv , would need to add a VS test for this change

@sumukhatv sumukhatv changed the title Portchannel Update ECMP NHopGroup for Port Channel oper down Aug 16, 2019
1. Add 4 PortChannels
2. Add to nexthop group
after bringing down a portchannel
tbl = swsscommon.Table(self.cdb, "PORTCHANNEL")
fvs = swsscommon.FieldValuePairs([("admin_status", "up"),("mtu", "9100"),("oper_status", "up")])

tbl.set("PortChannel001", fvs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that there is code repetition. If you can create a list of Portchannels and call function to do set, del operation, it will simplify and reduce the code. Just a suggestion.

@sumukhatv sumukhatv merged commit 175f3de into sonic-net:master Sep 30, 2019
tbl._del("PortChannel002")
tbl._del("PortChannel003")
tbl._del("PortChannel004")
time.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Restore eth0 up. If test_port.py follows this test, we got persistent test failure.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@wendani , would you please provide the fix?

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.

4 participants