summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-06-24 12:23:33 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-02-07 16:10:03 -0500
commitc6eee91f66956a14d73f6b2f2e43a792c854195a (patch)
treeb4888f423738147f30ac134df048766fdda1dfb3 /zebra/rib.h
parent16cdf5ddbc5c92f0dc43d9243a60a7258c67e68d (diff)
zebra: Fix ships in the night issue
When using wait for install there exists situations where zebra will issue several route change operations to the kernel but end up in a state where we shouldn't be at the end due to extra data being received. Example: a) zebra receives from bgp a route change, installs sends the route to the kernel. b) zebra receives a route deletion from bgp, removes the struct route entry and then sends to the kernel a deletion. c) zebra receives an asynchronous notification that (a) succeeded but we treat this as a new route. This is the ships in the night problem. In this case if we receive notification from the kernel about a route that we know nothing about and we are not in startup and we are doing asic offload then we can ignore this update. Ticket: #2563300 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index c1aeb7f07e..ae1fce727c 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -394,13 +394,14 @@ extern int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
unsigned short instance, uint32_t flags, struct prefix *p,
struct prefix_ipv6 *src_p, const struct nexthop *nh,
uint32_t nhe_id, uint32_t table_id, uint32_t metric,
- uint32_t mtu, uint8_t distance, route_tag_t tag);
+ uint32_t mtu, uint8_t distance, route_tag_t tag,
+ bool startup);
/*
* Multipath route apis.
*/
extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
struct prefix_ipv6 *src_p, struct route_entry *re,
- struct nexthop_group *ng);
+ struct nexthop_group *ng, bool startup);
/*
* -1 -> some sort of error
* 0 -> an add
@@ -409,7 +410,7 @@ extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
extern int rib_add_multipath_nhe(afi_t afi, safi_t safi, struct prefix *p,
struct prefix_ipv6 *src_p,
struct route_entry *re,
- struct nhg_hash_entry *nhe);
+ struct nhg_hash_entry *nhe, bool startup);
extern void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
unsigned short instance, uint32_t flags,