summaryrefslogtreecommitdiff
path: root/pbrd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-10-24 09:25:54 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-11-04 13:34:27 -0400
commitf3c6dd49f47d4d092a43d55d4af87521a323b3ae (patch)
tree8ea9464fc6d205cd4c96cfb9bedc8b8de6e34dd4 /pbrd
parentf0f618dcdbcd70047897109851b61ded5a63d5e8 (diff)
*: Add ability for daemons to notice resilience changes
This patch just introduces the callback mechanism for the resilient nexthop changes so that upper level daemons can take advantage of the change. This does nothing at this point but just call some code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_main.c5
-rw-r--r--pbrd/pbr_nht.c4
-rw-r--r--pbrd/pbr_nht.h1
3 files changed, 7 insertions, 3 deletions
diff --git a/pbrd/pbr_main.c b/pbrd/pbr_main.c
index 59aa3676bf..28a7b62d10 100644
--- a/pbrd/pbr_main.c
+++ b/pbrd/pbr_main.c
@@ -160,10 +160,9 @@ int main(int argc, char **argv, char **envp)
pbr_debug_init();
- nexthop_group_init(pbr_nhgroup_add_cb,
+ nexthop_group_init(pbr_nhgroup_add_cb, pbr_nhgroup_modify_cb,
pbr_nhgroup_add_nexthop_cb,
- pbr_nhgroup_del_nexthop_cb,
- pbr_nhgroup_delete_cb);
+ pbr_nhgroup_del_nexthop_cb, pbr_nhgroup_delete_cb);
/*
* So we safely ignore these commands since
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c
index cbff4832a4..298c961519 100644
--- a/pbrd/pbr_nht.c
+++ b/pbrd/pbr_nht.c
@@ -229,6 +229,10 @@ void pbr_nhgroup_add_cb(const char *name)
pbr_map_check_nh_group_change(name);
}
+void pbr_nhgroup_modify_cb(const struct nexthop_group_cmd *nhgc)
+{
+}
+
void pbr_nhgroup_add_nexthop_cb(const struct nexthop_group_cmd *nhgc,
const struct nexthop *nhop)
{
diff --git a/pbrd/pbr_nht.h b/pbrd/pbr_nht.h
index ecc92cc051..900b7627f2 100644
--- a/pbrd/pbr_nht.h
+++ b/pbrd/pbr_nht.h
@@ -96,6 +96,7 @@ extern void pbr_nht_set_rule_range(uint32_t low, uint32_t high);
extern uint32_t pbr_nht_get_next_rule(uint32_t seqno);
extern void pbr_nhgroup_add_cb(const char *name);
+extern void pbr_nhgroup_modify_cb(const struct nexthop_group_cmd *nhgc);
extern void pbr_nhgroup_add_nexthop_cb(const struct nexthop_group_cmd *nhg,
const struct nexthop *nhop);
extern void pbr_nhgroup_del_nexthop_cb(const struct nexthop_group_cmd *nhg,