-
Notifications
You must be signed in to change notification settings - Fork 552
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
[fpmsyncd] don't manipulate route weight #2320
Conversation
Signed-off-by: Ying Xie <[email protected]>
can you add kernel show ip route sample here? |
checked more on the frr code. it looks like when zebra send the weight to the kernel it minus -1, FRRouting/frr@df7fb58 . however, for the weight read from fpm netlink, there is no such minus -1. https://github.com/Azure/sonic-frr/blob/frr/8.2/zebra/zebra_fpm_netlink.c#L486 |
I can't revert my approval, but here is the reason that we do the logic of +1 when there is weight assigned. |
I see kernel and frr are in sync:
|
@hasan-brcm, check here, looks like ip route show tool compensate this kernel behavior. https://github.com/shemminger/iproute2/blob/main/ip/ipnexthop.c#L242 |
Thanks @lguohan for the reference. Yes, it confirms that user space weight is always +1 of what is in the kernel. The fpmsyncd should increment the weight only if it is receiving route updates from kernel (as what iproute2 does.) Given that fpmsyncd receives updates from frr (instead of kernel) in the default build image, it shouldn't increment the weight. In order to take care of such scenarios, there should be awareness of where the updates are coming from and handle it accordingly. |
@hasan-brcm, my worry is that current fpm behavior is an oversight from frr, they may change current behavior to align with kernel. |
What I did This is a cherry-pick PR for #2320. Why I did it We don't necessarily think it is the right solution, but before we can make Zebra behavior consistent. This change will unblock SONiC tests. It will be a temporary solution until we converge with FRR/Zebra changes. Signed-off-by: Ying Xie <[email protected]>
opened frr issue on this. let's track that, if frr decides to sync the fpmlink and netlink behavior, we will need to adjust. FRRouting/frr#11384 |
if weight =1 means ECMP without weight, the logic should be |
1 similar comment
if weight =1 means ECMP without weight, the logic should be |
is this some kind of convention? |
From the PR description and the code, it seems to be FRR behavior, isn’t it?
From: Guohan Lu ***@***.***>
Reply-To: Azure/sonic-swss ***@***.***>
Date: Tuesday, June 14, 2022 at 2:53 PM
To: Azure/sonic-swss ***@***.***>
Cc: Zhenghui Cai ***@***.***>, Comment ***@***.***>
Subject: Re: [Azure/sonic-swss] [fpmsyncd] don't manipulate route weight (PR #2320)
[External Email. Be cautious of content]
if weight =1 means ECMP without weight, the logic should be
is this some kind of convention?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/Azure/sonic-swss/pull/2320*issuecomment-1155600743__;Iw!!NEt6yMaO-gk!ALDtxBvzdLcaO-QwcVeO8iUIH1KSFVEb_9Z15PmOZWOvwrHp47P5xKDAixsI1_5sEox2jqY4m0sQ6TKaMS66IFk$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKDUQJV2IJVOVMQQYUZZT3TVPDIMBANCNFSM5YLIKINQ__;!!NEt6yMaO-gk!ALDtxBvzdLcaO-QwcVeO8iUIH1KSFVEb_9Z15PmOZWOvwrHp47P5xKDAixsI1_5sEox2jqY4m0sQ6TKa6YGkqKw$>.
You are receiving this because you commented.Message ID: ***@***.***>
Juniper Business Use Only
|
frr decides to keep current behavior as it is. |
Ok, so using FRR will always result in non-zero weight set in appDB and AsicDB.
We will have to make sure all SAI implementations be able to handle this.
From: Guohan Lu ***@***.***>
Reply-To: Azure/sonic-swss ***@***.***>
Date: Friday, June 17, 2022 at 2:04 AM
To: Azure/sonic-swss ***@***.***>
Cc: Zhenghui Cai ***@***.***>, Comment ***@***.***>
Subject: Re: [Azure/sonic-swss] [fpmsyncd] don't manipulate route weight (PR #2320)
[External Email. Be cautious of content]
frr decides to keep current behavior as it is.
FRRouting/frr#11384<https://urldefense.com/v3/__https:/github.com/FRRouting/frr/issues/11384__;!!NEt6yMaO-gk!Bs3Syr78U7fziipIffeJhw4sRfQUuUUEevvgp77RYapgZblm_nDKtcPQU5O-fYaeSduiH7BlxF3EYr9boT7elcM$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/Azure/sonic-swss/pull/2320*issuecomment-1158523316__;Iw!!NEt6yMaO-gk!Bs3Syr78U7fziipIffeJhw4sRfQUuUUEevvgp77RYapgZblm_nDKtcPQU5O-fYaeSduiH7BlxF3EYr9byvLN-I8$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKDUQJXDAGCDSQ5ZGBMDRTDVPQIPTANCNFSM5YLIKINQ__;!!NEt6yMaO-gk!Bs3Syr78U7fziipIffeJhw4sRfQUuUUEevvgp77RYapgZblm_nDKtcPQU5O-fYaeSduiH7BlxF3EYr9bzXchHrs$>.
You are receiving this because you commented.Message ID: ***@***.***>
Juniper Business Use Only
|
Return the next hop weight obtained from kernel as-is. Sample next hop weight: admin@svcstr-7050-acs-4:~$ ip route show 193.11.248.128/25 193.11.248.128/25 nhid 1452 proto bgp src 10.1.0.33 metric 20 nexthop via 10.0.1.61 dev PortChannel103 weight 1 nexthop via 10.0.1.63 dev PortChannel104 weight 1 nexthop via 10.0.1.59 dev PortChannel102 weight 1 nexthop via 10.0.1.57 dev PortChannel101 weight 1 Signed-off-by: Ying Xie <[email protected]>
What I did
Return the next hop weight obtained from kernel as-is.
Sample next hop weight:
Why I did it
Some platforms have issue dealing with arbitrary next hop weight values.
Signed-off-by: Ying Xie [email protected]