Skip to content

[fgnhgorch] Fg Nhg link handling#1537

Merged
prsunny merged 5 commits intosonic-net:masterfrom
anish-n:fgnhg_link_handling
Dec 19, 2020
Merged

[fgnhgorch] Fg Nhg link handling#1537
prsunny merged 5 commits intosonic-net:masterfrom
anish-n:fgnhg_link_handling

Conversation

@anish-n
Copy link
Contributor

@anish-n anish-n commented Dec 11, 2020

What I did
Added fine grained ecmp link oper state handling changes

Why I did it
To adjust ECMP appropriately on link oper change

How I verified it
Verified using VS swss test cases

Details if related
HLD update associated with change: sonic-net/SONiC#693

@lgtm-com
Copy link

lgtm-com bot commented Dec 11, 2020

This pull request introduces 3 alerts when merging 44065d1 into b7e4410 - view on LGTM.com

new alerts:

  • 2 for Variable defined multiple times
  • 1 for Unused local variable

@anish-n
Copy link
Contributor Author

anish-n commented Dec 11, 2020

retest this please

@lgtm-com
Copy link

lgtm-com bot commented Dec 14, 2020

This pull request introduces 3 alerts when merging 44065d1 into b7e4410 - view on LGTM.com

new alerts:

  • 2 for Variable defined multiple times
  • 1 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Dec 14, 2020

This pull request introduces 3 alerts when merging 9a586c6 into 1301d0d - view on LGTM.com

new alerts:

  • 2 for Variable defined multiple times
  • 1 for Unused local variable


/* add next-hop into SAI group */
if (!validNextHopInNextHopGroup(nhk))
else if (link_oper)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the flow here handled for the case where port doesn't exists (get_port failed)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If get_port fails then link_oper will have the default value of 1 per: https://github.com/Azure/sonic-swss/blob/9a586c6cdbc95e2b75e429964f19047d68c9b751/orchagent/fgnhgorch.cpp#L1498

So it will end up going into the else if and call into validNextHopInNextHopGroup(assuming hasNextHop is true).

@anish-n anish-n force-pushed the fgnhg_link_handling branch from 9a586c6 to 2600f75 Compare December 15, 2020 21:44
@anish-n
Copy link
Contributor Author

anish-n commented Dec 17, 2020

retest this please

@anish-n
Copy link
Contributor Author

anish-n commented Dec 17, 2020

retest this please

2 similar comments
@anish-n
Copy link
Contributor Author

anish-n commented Dec 18, 2020

retest this please

@anish-n
Copy link
Contributor Author

anish-n commented Dec 18, 2020

retest this please

@prsunny prsunny merged commit fcd1e6d into sonic-net:master Dec 19, 2020
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Added fine grained ecmp link oper state handling changes
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.

2 participants