summaryrefslogtreecommitdiff
path: root/pbrd/pbr_map.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-19 09:04:17 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-06 13:22:43 -0400
commitb13e5ad68a740b66c921c5ab1314e0898f0ed310 (patch)
treef08e165c4507040ecfd17ec9c10b109f5b5fa941 /pbrd/pbr_map.h
parentd36d0d57711ec79bb7ff4360b62d80b1a9809f6f (diff)
pbrd: Remove pbr_events
The pbr_events.c file was a mistake in that it overly complicated the code and made it hard to think about what was happening. Remove all the events and just do the work where needed. Additionally rethink the sending of the pbr map to zebra and only send one notification at a time instead of having the sending function attempt to figure out what to do. Clean up some of the no form of commands to make them work properly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.h')
-rw-r--r--pbrd/pbr_map.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/pbrd/pbr_map.h b/pbrd/pbr_map.h
index fca59951b5..12d49d98c0 100644
--- a/pbrd/pbr_map.h
+++ b/pbrd/pbr_map.h
@@ -104,7 +104,11 @@ struct pbr_map_sequence {
*/
bool nhs_installed;
+ /*
+ * Are we installed
+ */
bool installed;
+
/*
* A reason of 0 means we think the pbr_map_sequence is good to go
* We can accumuluate multiple failure states
@@ -115,7 +119,6 @@ struct pbr_map_sequence {
#define PBR_MAP_INVALID_NO_NEXTHOPS (1 << 2)
#define PBR_MAP_INVALID_BOTH_NHANDGRP (1 << 3)
#define PBR_MAP_INVALID_SRCDST (1 << 4)
-#define PBR_MAP_DEL_SEQUENCE_NUMBER (1 << 5)
uint64_t reason;
QOBJ_FIELDS
@@ -130,7 +133,8 @@ extern struct pbr_map_sequence *pbrms_lookup_unique(uint32_t unique,
ifindex_t ifindex);
extern struct pbr_map *pbrm_find(const char *name);
-extern void pbr_map_delete(const char *name, uint32_t seqno);
+extern void pbr_map_delete(struct pbr_map_sequence *pbrms);
+extern void pbr_map_delete_nexthop_group(struct pbr_map_sequence *pbrms);
extern void pbr_map_add_interface(struct pbr_map *pbrm, struct interface *ifp);
extern void pbr_map_interface_delete(struct pbr_map *pbrm,
struct interface *ifp);
@@ -139,16 +143,15 @@ extern void pbr_map_init(void);
extern bool pbr_map_check_valid(const char *name);
-extern void pbr_map_check(const char *name, uint32_t seqno);
+extern void pbr_map_check(struct pbr_map_sequence *pbrms);
extern void pbr_map_check_nh_group_change(const char *nh_group);
-extern void pbr_map_check_policy_change(const char *name);
extern void pbr_map_reason_string(unsigned int reason, char *buf, int size);
-extern void pbr_map_add_interfaces(const char *name);
extern void pbr_map_schedule_policy_from_nhg(const char *nh_group);
-extern void pbr_map_install(const char *name);
+extern void pbr_map_install(struct pbr_map *pbrm);
extern void pbr_map_policy_install(const char *name);
-extern void pbr_map_policy_delete(const char *ifname);
+extern void pbr_map_policy_delete(struct pbr_map *pbrm,
+ struct pbr_map_interface *pmi);
#endif