summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-05-31 15:28:08 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-06-08 15:20:17 +0000
commit85435b680a5876762ce5c98e15880a4dc20c1da8 (patch)
tree1480d3cea1a23dc1be7e641ec6f775601375b0e0
parent40afa6d4382bcc1d56c1cb965fb51818ea119c7e (diff)
bfdd: remove redundant nb destroy callbacks
Fixes warning logs: ``` 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/profile/minimum-ttl' 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl' ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit f7884aedf7a1249e3aae71b6a66c9a0f0915c4ef)
-rw-r--r--bfdd/bfdd_nb.c2
-rw-r--r--bfdd/bfdd_nb.h3
-rw-r--r--bfdd/bfdd_nb_config.c38
3 files changed, 0 insertions, 43 deletions
diff --git a/bfdd/bfdd_nb.c b/bfdd/bfdd_nb.c
index 29a9b5f2d5..a819516ec8 100644
--- a/bfdd/bfdd_nb.c
+++ b/bfdd/bfdd_nb.c
@@ -88,7 +88,6 @@ const struct frr_yang_module_info frr_bfdd_info = {
.xpath = "/frr-bfdd:bfdd/bfd/profile/minimum-ttl",
.cbs = {
.modify = bfdd_bfd_profile_minimum_ttl_modify,
- .destroy = bfdd_bfd_profile_minimum_ttl_destroy,
.cli_show = bfd_cli_show_minimum_ttl,
}
},
@@ -375,7 +374,6 @@ const struct frr_yang_module_info frr_bfdd_info = {
.xpath = "/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl",
.cbs = {
.modify = bfdd_bfd_sessions_multi_hop_minimum_ttl_modify,
- .destroy = bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy,
.cli_show = bfd_cli_show_minimum_ttl,
}
},
diff --git a/bfdd/bfdd_nb.h b/bfdd/bfdd_nb.h
index d7ac320638..072a4a93e0 100644
--- a/bfdd/bfdd_nb.h
+++ b/bfdd/bfdd_nb.h
@@ -39,7 +39,6 @@ int bfdd_bfd_profile_required_receive_interval_modify(
int bfdd_bfd_profile_administrative_down_modify(struct nb_cb_modify_args *args);
int bfdd_bfd_profile_passive_mode_modify(struct nb_cb_modify_args *args);
int bfdd_bfd_profile_minimum_ttl_modify(struct nb_cb_modify_args *args);
-int bfdd_bfd_profile_minimum_ttl_destroy(struct nb_cb_destroy_args *args);
int bfdd_bfd_profile_echo_mode_modify(struct nb_cb_modify_args *args);
int bfdd_bfd_profile_desired_echo_transmission_interval_modify(
struct nb_cb_modify_args *args);
@@ -142,8 +141,6 @@ int bfdd_bfd_sessions_multi_hop_administrative_down_modify(
struct nb_cb_modify_args *args);
int bfdd_bfd_sessions_multi_hop_minimum_ttl_modify(
struct nb_cb_modify_args *args);
-int bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy(
- struct nb_cb_destroy_args *args);
struct yang_data *
bfdd_bfd_sessions_multi_hop_stats_local_discriminator_get_elem(
struct nb_cb_get_elem_args *args);
diff --git a/bfdd/bfdd_nb_config.c b/bfdd/bfdd_nb_config.c
index c1a2ad7bb4..cc74d584ac 100644
--- a/bfdd/bfdd_nb_config.c
+++ b/bfdd/bfdd_nb_config.c
@@ -437,20 +437,6 @@ int bfdd_bfd_profile_minimum_ttl_modify(struct nb_cb_modify_args *args)
return NB_OK;
}
-int bfdd_bfd_profile_minimum_ttl_destroy(struct nb_cb_destroy_args *args)
-{
- struct bfd_profile *bp;
-
- if (args->event != NB_EV_APPLY)
- return NB_OK;
-
- bp = nb_running_get_entry(args->dnode, NULL, true);
- bp->minimum_ttl = BFD_DEF_MHOP_TTL;
- bfd_profile_update(bp);
-
- return NB_OK;
-}
-
/*
* XPath: /frr-bfdd:bfdd/bfd/profile/echo-mode
*/
@@ -873,27 +859,3 @@ int bfdd_bfd_sessions_multi_hop_minimum_ttl_modify(
return NB_OK;
}
-
-int bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy(
- struct nb_cb_destroy_args *args)
-{
- struct bfd_session *bs;
-
- switch (args->event) {
- case NB_EV_VALIDATE:
- case NB_EV_PREPARE:
- return NB_OK;
-
- case NB_EV_APPLY:
- break;
-
- case NB_EV_ABORT:
- return NB_OK;
- }
-
- bs = nb_running_get_entry(args->dnode, NULL, true);
- bs->peer_profile.minimum_ttl = BFD_DEF_MHOP_TTL;
- bfd_session_apply(bs);
-
- return NB_OK;
-}