]> git.puffer.fish Git - mirror/frr.git/commit
bgpd : backpressure - Handle BGP-Zebra Install evt Creation 15524/head
authorDonald Sharp <sharpd@nvidia.com>
Fri, 26 Jan 2024 19:48:53 +0000 (14:48 -0500)
committerRajasekar Raja <rajasekarr@nvidia.com>
Tue, 26 Mar 2024 00:49:35 +0000 (17:49 -0700)
commitccfe452763d16c432fa81fd20e805bec819b345e
treed03fb5ee7e6ffcec190e4e2b112ede504847b8d4
parent5f379bebe82591c0665c29419fd3ab8758258e4e
bgpd : backpressure - Handle BGP-Zebra Install evt Creation

BGP is now keeping a list of dests with the dest having a pointer
to the bgp_path_info that it will be working on.

1) When bgp receives a prefix, process it, add the bgp_dest of the
prefix into the new Fifo list if not present, update the flags (Ex:
earlier if the prefix was advertised and now it is a withdrawn),
increment the ref_count and DO NOT advertise the install/withdraw
to zebra yet.

2) Schedule an event to wake up to invoke the new function which will
walk the list one by one and installs/withdraws the routes into zebra.
  a) if BUFFER_EMPTY, process the next item on the list
  b) if BUFFER_PENDING, bail out and the callback in
  zclient_flush_data() will invoke the same function when BUFFER_EMPTY

Changes
 - rename old bgp_zebra_announce to bgp_zebra_announce_actual
 - rename old bgp_zebra_withdrw to bgp_zebra_withdraw_actual
 - Handle new fifo list cleanup in bgp_exit()
 - New funcs: bgp_handle_route_announcements_to_zebra() and
   bgp_zebra_route_install()
 - Define a callback function to invoke
   bgp_handle_route_announcements_to_zebra() when BUFFER_EMPTY in
   zclient_flush_data()

The current change deals with bgp installing routes via
bgp_process_main_one()

Ticket: #3390099

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
bgpd/bgp_route.c
bgpd/bgp_table.h
bgpd/bgp_zebra.c
bgpd/bgp_zebra.h
bgpd/bgpd.c
bgpd/bgpd.h
lib/zclient.c