Skip to content

bgpd:send EOR during GR only when fib install comeplete for wfi enabled#19522

Merged
ton31337 merged 1 commit intoFRRouting:masterfrom
vijayalaxmi-basavaraj:bgp_gr_wait_forfib_install
Sep 27, 2025
Merged

bgpd:send EOR during GR only when fib install comeplete for wfi enabled#19522
ton31337 merged 1 commit intoFRRouting:masterfrom
vijayalaxmi-basavaraj:bgp_gr_wait_forfib_install

Conversation

@vijayalaxmi-basavaraj
Copy link
Contributor

Currently during GR, EOR is sent to neighbor prematurely for wfi enabled case. below fix has be implemented.
keep a counter to track the routes installed in FIB.Increamnet
counter when bgp send route install to zebra, decreamnet counter when
fib install ack to received from zebra in bgp.when this count reaches
zero and route deferred count is 0 ad gr route syn pending is set, then
do further processing of sending EOR and zebra gr update complete.
This will send EOR as soon as last route fib install ack is received.

Testing:
before:
2020:2025/08/19 21:23:53.786402 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1.3 2021:2025/08/19 21:23:53.786412 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s0.3 2022:2025/08/19 21:23:53.786415 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s0.3 2511:2025/08/19 21:23:54.162310 BGP: [TN0HX-6G1RR] u1:s5 send UPDATE w/ attr: , origin ?, mp_nexthop ::(::), path 64900 56000 2512:2025/08/19 21:23:54.162314 BGP: [H06SA-0JAPR] u1:s5 send MP_REACH for afi/safi IPv4/unicast 2513:2025/08/19 21:23:54.162316 BGP: [HVRWP-5R9NQ] u1:s5 send UPDATE 91.0.0.49/32 IPv4 unicast

after:
4270:2025/08/22 17:41:41.631993 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:1::/125 IPv6 unicast 4271:2025/08/22 17:41:41.631998 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:7:2::/125 IPv6 unicast 4272:2025/08/22 17:41:41.632003 BGP: [WEV7K-2GAQ5] u2:s2 send UPDATE len 116 (max message len: 65535) numpfx 2 4273:2025/08/22 17:41:41.632008 BGP: [JJ5V1-EZ0XX] u2:s2 swp1s1 send UPDATE w/ mp_nexthops 2003:0:1::1, fe80::1e34:daff:febe:4169 4274:2025/08/22 17:41:41.632041 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1 4275:2025/08/22 17:41:41.632054 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s1

@frrbot frrbot bot added the bgp label Sep 2, 2025
@vijayalaxmi-basavaraj vijayalaxmi-basavaraj marked this pull request as draft September 2, 2025 22:07
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

Please use something like a "normal" variable name instead of the wfi abbreviation, which is "not friendly". And, can we have a topotest to verify this behavior?

UPDATE1 => Styling MUST be fixed too.

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts label Sep 9, 2025
@riw777 riw777 self-requested a review September 9, 2025 14:59
@github-actions github-actions bot added size/XXL and removed size/L labels Sep 10, 2025
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

Please don't use public IP ranges in topotests and don't use topojson (it's horrible to debug it).

@vijayalaxmi-basavaraj vijayalaxmi-basavaraj force-pushed the bgp_gr_wait_forfib_install branch 2 times, most recently from 76f6706 to 4b68712 Compare September 16, 2025 19:01
@vijayalaxmi-basavaraj
Copy link
Contributor Author

Please use something like a "normal" variable name instead of the wfi abbreviation, which is "not friendly". And, can we have a topotest to verify this behavior?

UPDATE1 => Styling MUST be fixed too.

Done

@vijayalaxmi-basavaraj
Copy link
Contributor Author

Please don't use public IP ranges in topotests and don't use topojson (it's horrible to debug it).
Done

@vijayalaxmi-basavaraj vijayalaxmi-basavaraj marked this pull request as ready for review September 16, 2025 19:05
@vijayalaxmi-basavaraj vijayalaxmi-basavaraj force-pushed the bgp_gr_wait_forfib_install branch 3 times, most recently from d18ebbc to a993c53 Compare September 16, 2025 20:36
@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci: rerun

@soumyar-roy
Copy link
Contributor

ci:rerun

1 similar comment
@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci:rerun

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

  • Please use frr.conf (a single config for loading all configurations, without bgpd/zebra/etc.);
  • Drop all debug, log from configs;
  • No sleep() in topotests, replace all using topotest.run_and_expect();
  • No public IPs in topotests.

@vijayalaxmi-basavaraj vijayalaxmi-basavaraj force-pushed the bgp_gr_wait_forfib_install branch 2 times, most recently from e88c7a9 to 0359408 Compare September 18, 2025 05:48
@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci: rerun

1 similar comment
@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci: rerun

@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci:rerun

@github-actions github-actions bot added the rebase PR needs rebase label Sep 19, 2025
…fib enabled

Currently during GR, EOR is sent to neighbor prematurely for suppress fib enabled
case. below fix has be implemented.
  keep a counter to track the routes installed in FIB.Increamnet
   counter when bgp send route install to zebra, decreamnet counter when
   fib install ack to received from zebra in bgp.when this count reaches
   zero and route deferred count is 0 ad gr route syn pending is set, then
   do further processing of sending EOR and zebra gr update complete.
   This will send EOR as soon as last route fib install ack is received.

Testing:
before:
2020:2025/08/19 21:23:53.786402 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1.3
2021:2025/08/19 21:23:53.786412 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s0.3
2022:2025/08/19 21:23:53.786415 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s0.3
2511:2025/08/19 21:23:54.162310 BGP: [TN0HX-6G1RR] u1:s5 send UPDATE w/ attr: , origin ?, mp_nexthop ::(::), path 64900 56000
2512:2025/08/19 21:23:54.162314 BGP: [H06SA-0JAPR] u1:s5 send MP_REACH for afi/safi IPv4/unicast
2513:2025/08/19 21:23:54.162316 BGP: [HVRWP-5R9NQ] u1:s5 send UPDATE 91.0.0.49/32 IPv4 unicast

after:
4270:2025/08/22 17:41:41.631993 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:1::/125 IPv6 unicast
4271:2025/08/22 17:41:41.631998 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:7:2::/125 IPv6 unicast
4272:2025/08/22 17:41:41.632003 BGP: [WEV7K-2GAQ5] u2:s2 send UPDATE len 116 (max message len: 65535) numpfx 2
4273:2025/08/22 17:41:41.632008 BGP: [JJ5V1-EZ0XX] u2:s2 swp1s1 send UPDATE w/ mp_nexthops 2003:0:1::1, fe80::1e34:daff:febe:4169
4274:2025/08/22 17:41:41.632041 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1
4275:2025/08/22 17:41:41.632054 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s1

Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

LGTM

@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci:rerun

2 similar comments
@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci:rerun

@vijayalaxmi-basavaraj
Copy link
Contributor Author

ci:rerun

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