diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-10 15:31:57 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-16 20:14:57 +0100 |
commit | 4df3e31c3d09f83340e7c1a0d7645d0bdddcb68f (patch) | |
tree | 01b36a351e9a10d91d25d5dd802bb7f09a69108c | |
parent | Merge pull request #8260 from volta-networks/fix_isis_snmp_test (diff) | |
download | frr-4df3e31c3d09f83340e7c1a0d7645d0bdddcb68f.tar.xz frr-4df3e31c3d09f83340e7c1a0d7645d0bdddcb68f.zip |
bfdd: separate echo rx/tx timers
Currently there is a single interval for both RX and TX echo functions.
This commit introduces separate RX and TX timers for echo packets.
The main advantage is to be able to set the receive interval to zero
when we don't want to receive echo packets from the remote system.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
33 files changed, 388 insertions, 106 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 3cbb3691e..aa30ca8ad 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -90,7 +90,8 @@ static void bfd_profile_set_default(struct bfd_profile *bp) bp->echo_mode = false; bp->passive = false; bp->minimum_ttl = BFD_DEF_MHOP_TTL; - bp->min_echo_rx = BFD_DEF_REQ_MIN_ECHO; + bp->min_echo_rx = BFD_DEF_REQ_MIN_ECHO_RX; + bp->min_echo_tx = BFD_DEF_DES_MIN_ECHO_TX; bp->min_rx = BFD_DEFREQUIREDMINRX; bp->min_tx = BFD_DEFDESIREDMINTX; } @@ -179,13 +180,19 @@ void bfd_session_apply(struct bfd_session *bs) /* We can only apply echo options on single hop sessions. */ if (!CHECK_FLAG(bs->flags, BFD_SESS_FLAG_MH)) { - /* Configure remote echo if it was default. */ - if (bs->peer_profile.min_echo_rx == BFD_DEF_REQ_MIN_ECHO) - bs->timers.required_min_echo = bp->min_echo_rx; + /* Configure echo timers if they were default. */ + if (bs->peer_profile.min_echo_rx == BFD_DEF_REQ_MIN_ECHO_RX) + bs->timers.required_min_echo_rx = bp->min_echo_rx; else - bs->timers.required_min_echo = + bs->timers.required_min_echo_rx = bs->peer_profile.min_echo_rx; + if (bs->peer_profile.min_echo_tx == BFD_DEF_DES_MIN_ECHO_TX) + bs->timers.desired_min_echo_tx = bp->min_echo_tx; + else + bs->timers.desired_min_echo_tx = + bs->peer_profile.min_echo_tx; + /* Toggle echo if default value. */ if (bs->peer_profile.echo_mode == false) bfd_set_echo(bs, bp->echo_mode); @@ -700,7 +707,8 @@ struct bfd_session *bfd_session_new(void) bs->timers.desired_min_tx = BFD_DEFDESIREDMINTX; bs->timers.required_min_rx = BFD_DEFREQUIREDMINRX; - bs->timers.required_min_echo = BFD_DEF_REQ_MIN_ECHO; + bs->timers.required_min_echo_rx = BFD_DEF_REQ_MIN_ECHO_RX; + bs->timers.desired_min_echo_tx = BFD_DEF_DES_MIN_ECHO_TX; bs->detect_mult = BFD_DEFDETECTMULT; bs->mh_ttl = BFD_DEF_MHOP_TTL; bs->ses_state = PTM_BFD_DOWN; @@ -769,9 +777,14 @@ static void _bfd_session_update(struct bfd_session *bs, bs->peer_profile.detection_multiplier = bs->detect_mult; } - if (bpc->bpc_has_echointerval) { - bs->timers.required_min_echo = bpc->bpc_echointerval * 1000; - bs->peer_profile.min_echo_rx = bs->timers.required_min_echo; + if (bpc->bpc_has_echorecvinterval) { + bs->timers.required_min_echo_rx = bpc->bpc_echorecvinterval * 1000; + bs->peer_profile.min_echo_rx = bs->timers.required_min_echo_rx; + } + + if (bpc->bpc_has_echotxinterval) { + bs->timers.desired_min_echo_tx = bpc->bpc_echotxinterval * 1000; + bs->peer_profile.min_echo_tx = bs->timers.desired_min_echo_tx; } if (bpc->bpc_has_label) @@ -1189,10 +1202,10 @@ void bs_echo_timer_handler(struct bfd_session *bs) * RFC 5880, Section 6.8.9. */ old_timer = bs->echo_xmt_TO; - if (bs->remote_timers.required_min_echo > bs->timers.required_min_echo) + if (bs->remote_timers.required_min_echo > bs->timers.desired_min_echo_tx) bs->echo_xmt_TO = bs->remote_timers.required_min_echo; else - bs->echo_xmt_TO = bs->timers.required_min_echo; + bs->echo_xmt_TO = bs->timers.desired_min_echo_tx; if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO_ACTIVE) == 0 || old_timer != bs->echo_xmt_TO) diff --git a/bfdd/bfd.h b/bfdd/bfd.h index 7c537b40d..503b5ca7d 100644 --- a/bfdd/bfd.h +++ b/bfdd/bfd.h @@ -215,6 +215,8 @@ struct bfd_profile { /** Echo mode (only applies to single hop). */ bool echo_mode; + /** Desired echo transmission interval (in microseconds). */ + uint32_t min_echo_tx; /** Minimum required echo receive interval (in microseconds). */ uint32_t min_echo_rx; @@ -228,6 +230,13 @@ TAILQ_HEAD(bfdproflist, bfd_profile); /* bfd_session shortcut label forwarding. */ struct peer_label; +struct bfd_config_timers { + uint32_t desired_min_tx; + uint32_t required_min_rx; + uint32_t desired_min_echo_tx; + uint32_t required_min_echo_rx; +}; + /* * Session state information */ @@ -251,7 +260,7 @@ struct bfd_session { struct bfd_profile peer_profile; /* Timers */ - struct bfd_timers timers; + struct bfd_config_timers timers; struct bfd_timers cur_timers; uint64_t detect_TO; struct thread *echo_recvtimer_ev; @@ -332,7 +341,8 @@ TAILQ_HEAD(obslist, bfd_session_observer); #define BFD_DEFDETECTMULT 3 #define BFD_DEFDESIREDMINTX (300 * 1000) /* microseconds. */ #define BFD_DEFREQUIREDMINRX (300 * 1000) /* microseconds. */ -#define BFD_DEF_REQ_MIN_ECHO (50 * 1000) /* microseconds. */ +#define BFD_DEF_DES_MIN_ECHO_TX (50 * 1000) /* microseconds. */ +#define BFD_DEF_REQ_MIN_ECHO_RX (50 * 1000) /* microseconds. */ #define BFD_DEF_SLOWTX (1000 * 1000) /* microseconds. */ /** Minimum multi hop TTL. */ #define BFD_DEF_MHOP_TTL 254 diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 12bb52cf6..c871e2abe 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -267,7 +267,7 @@ void ptm_bfd_snd(struct bfd_session *bfd, int fbit) cp.timers.required_min_rx = htonl(bfd->cur_timers.required_min_rx); } - cp.timers.required_min_echo = htonl(bfd->timers.required_min_echo); + cp.timers.required_min_echo = htonl(bfd->timers.required_min_echo_rx); if (_ptm_bfd_send(bfd, NULL, &cp, BFD_PKT_LEN) != 0) return; diff --git a/bfdd/bfdctl.h b/bfdd/bfdctl.h index e1cff9a31..c4b2e8030 100644 --- a/bfdd/bfdctl.h +++ b/bfdd/bfdctl.h @@ -47,7 +47,8 @@ struct sockaddr_any { #define BPC_DEF_DETECTMULTIPLIER 3 #define BPC_DEF_RECEIVEINTERVAL 300 /* milliseconds */ #define BPC_DEF_TRANSMITINTERVAL 300 /* milliseconds */ -#define BPC_DEF_ECHOINTERVAL 50 /* milliseconds */ +#define BPC_DEF_ECHORECEIVEINTERVAL 50 /* milliseconds */ +#define BPC_DEF_ECHOTRANSMITINTERVAL 50 /* milliseconds */ /* Peer status */ enum bfd_peer_status { @@ -81,8 +82,11 @@ struct bfd_peer_cfg { bool bpc_has_txinterval; uint64_t bpc_txinterval; - bool bpc_has_echointerval; - uint64_t bpc_echointerval; + bool bpc_has_echorecvinterval; + uint64_t bpc_echorecvinterval; + + bool bpc_has_echotxinterval; + uint64_t bpc_echotxinterval; bool bpc_has_minimum_ttl; uint8_t bpc_minimum_ttl; diff --git a/bfdd/bfdd_cli.c b/bfdd/bfdd_cli.c index 206f6c7d0..44e94eb89 100644 --- a/bfdd/bfdd_cli.c +++ b/bfdd/bfdd_cli.c @@ -451,8 +451,8 @@ void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode, DEFPY_YANG( bfd_peer_echo_interval, bfd_peer_echo_interval_cmd, "echo-interval (10-60000)$interval", - "Configure peer echo interval\n" - "Configure peer echo interval value in milliseconds\n") + "Configure peer echo intervals\n" + "Configure peer echo rx/tx intervals value in milliseconds\n") { char value[32]; @@ -464,21 +464,88 @@ DEFPY_YANG( snprintf(value, sizeof(value), "%ld", interval * 1000); nb_cli_enqueue_change(vty, "./desired-echo-transmission-interval", NB_OP_MODIFY, value); + nb_cli_enqueue_change(vty, "./required-echo-receive-interval", + NB_OP_MODIFY, value); + + return nb_cli_apply_changes(vty, NULL); +} + +DEFPY_YANG( + bfd_peer_echo_transmit_interval, bfd_peer_echo_transmit_interval_cmd, + "echo transmit-interval (10-60000)$interval", + "Configure peer echo intervals\n" + "Configure desired transmit interval\n" + "Configure interval value in milliseconds\n") +{ + char value[32]; + + if (!bfd_cli_is_profile(vty) && !bfd_cli_is_single_hop(vty)) { + vty_out(vty, "%% Echo mode is only available for single hop sessions.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + snprintf(value, sizeof(value), "%ld", interval * 1000); + nb_cli_enqueue_change(vty, "./desired-echo-transmission-interval", + NB_OP_MODIFY, value); + + return nb_cli_apply_changes(vty, NULL); +} + +void bfd_cli_show_desired_echo_transmission_interval(struct vty *vty, + struct lyd_node *dnode, bool show_defaults) +{ + uint32_t value; + + if (show_defaults) + vty_out(vty, " echo transmit-interval %d\n", + BFD_DEF_DES_MIN_ECHO_TX); + else { + value = yang_dnode_get_uint32(dnode, NULL); + vty_out(vty, " echo transmit-interval %u\n", value / 1000); + } +} + +DEFPY_YANG( + bfd_peer_echo_receive_interval, bfd_peer_echo_receive_interval_cmd, + "echo receive-interval <disabled$disabled|(10-60000)$interval>", + "Configure peer echo intervals\n" + "Configure required receive interval\n" + "Disable echo packets receive\n" + "Configure interval value in milliseconds\n") +{ + char value[32]; + + if (!bfd_cli_is_profile(vty) && !bfd_cli_is_single_hop(vty)) { + vty_out(vty, "%% Echo mode is only available for single hop sessions.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + if (disabled) + snprintf(value, sizeof(value), "0"); + else + snprintf(value, sizeof(value), "%ld", interval * 1000); + + nb_cli_enqueue_change(vty, "./required-echo-receive-interval", + NB_OP_MODIFY, value); return nb_cli_apply_changes(vty, NULL); } -void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode, - bool show_defaults) +void bfd_cli_show_required_echo_receive_interval(struct vty *vty, + struct lyd_node *dnode, bool show_defaults) { uint32_t value; if (show_defaults) - vty_out(vty, " echo-interval %d\n", - BFD_DEF_REQ_MIN_ECHO); + vty_out(vty, " echo receive-interval %d\n", + BFD_DEF_REQ_MIN_ECHO_RX); else { value = yang_dnode_get_uint32(dnode, NULL); - vty_out(vty, " echo-interval %u\n", value / 1000); + if (value) + vty_out(vty, " echo receive-interval %u\n", + value / 1000); + else + vty_out(vty, " echo receive-interval disabled\n"); } } @@ -575,6 +642,21 @@ ALIAS_YANG(bfd_peer_echo_interval, bfd_profile_echo_interval_cmd, "Configure peer echo interval\n" "Configure peer echo interval value in milliseconds\n") +ALIAS_YANG( + bfd_peer_echo_transmit_interval, bfd_profile_echo_transmit_interval_cmd, + "echo transmit-interval (10-60000)$interval", + "Configure peer echo intervals\n" + "Configure desired transmit interval\n" + "Configure interval value in milliseconds\n") + +ALIAS_YANG( + bfd_peer_echo_receive_interval, bfd_profile_echo_receive_interval_cmd, + "echo receive-interval <disabled$disabled|(10-60000)$interval>", + "Configure peer echo intervals\n" + "Configure required receive interval\n" + "Disable echo packets receive\n" + "Configure interval value in milliseconds\n") + DEFPY_YANG(bfd_peer_profile, bfd_peer_profile_cmd, "[no] profile BFDPROF$pname", NO_STR @@ -632,6 +714,8 @@ bfdd_cli_init(void) install_element(BFD_PEER_NODE, &bfd_peer_tx_cmd); install_element(BFD_PEER_NODE, &bfd_peer_echo_cmd); install_element(BFD_PEER_NODE, &bfd_peer_echo_interval_cmd); + install_element(BFD_PEER_NODE, &bfd_peer_echo_transmit_interval_cmd); + install_element(BFD_PEER_NODE, &bfd_peer_echo_receive_interval_cmd); install_element(BFD_PEER_NODE, &bfd_peer_profile_cmd); install_element(BFD_PEER_NODE, &bfd_peer_passive_cmd); install_element(BFD_PEER_NODE, &bfd_peer_minimum_ttl_cmd); @@ -652,6 +736,8 @@ bfdd_cli_init(void) install_element(BFD_PROFILE_NODE, &bfd_profile_shutdown_cmd); install_element(BFD_PROFILE_NODE, &bfd_profile_echo_cmd); install_element(BFD_PROFILE_NODE, &bfd_profile_echo_interval_cmd); + install_element(BFD_PROFILE_NODE, &bfd_profile_echo_transmit_interval_cmd); + install_element(BFD_PROFILE_NODE, &bfd_profile_echo_receive_interval_cmd); install_element(BFD_PROFILE_NODE, &bfd_profile_passive_cmd); install_element(BFD_PROFILE_NODE, &bfd_profile_minimum_ttl_cmd); install_element(BFD_PROFILE_NODE, &no_bfd_profile_minimum_ttl_cmd); diff --git a/bfdd/bfdd_nb.c b/bfdd/bfdd_nb.c index 64ba3cf81..29a9b5f2d 100644 --- a/bfdd/bfdd_nb.c +++ b/bfdd/bfdd_nb.c @@ -103,8 +103,15 @@ const struct frr_yang_module_info frr_bfdd_info = { .xpath = "/frr-bfdd:bfdd/bfd/profile/desired-echo-transmission-interval", .cbs = { .modify = bfdd_bfd_profile_desired_echo_transmission_interval_modify, - .cli_show = bfd_cli_show_echo_interval, - } + .cli_show = bfd_cli_show_desired_echo_transmission_interval, + } + }, + { + .xpath = "/frr-bfdd:bfdd/bfd/profile/required-echo-receive-interval", + .cbs = { + .modify = bfdd_bfd_profile_required_echo_receive_interval_modify, + .cli_show = bfd_cli_show_required_echo_receive_interval, + } }, { .xpath = "/frr-bfdd:bfdd/bfd/sessions/single-hop", @@ -179,7 +186,14 @@ const struct frr_yang_module_info frr_bfdd_info = { .xpath = "/frr-bfdd:bfdd/bfd/sessions/single-hop/desired-echo-transmission-interval", .cbs = { .modify = bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify, - .cli_show = bfd_cli_show_echo_interval, + .cli_show = bfd_cli_show_desired_echo_transmission_interval, + } + }, + { + .xpath = "/frr-bfdd:bfdd/bfd/sessions/single-hop/required-echo-receive-interval", + .cbs = { + .modify = bfdd_bfd_sessions_single_hop_required_echo_receive_interval_modify, + .cli_show = bfd_cli_show_required_echo_receive_interval, } }, { diff --git a/bfdd/bfdd_nb.h b/bfdd/bfdd_nb.h index fbd557b6b..874e98691 100644 --- a/bfdd/bfdd_nb.h +++ b/bfdd/bfdd_nb.h @@ -43,6 +43,8 @@ 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); +int bfdd_bfd_profile_required_echo_receive_interval_modify( + struct nb_cb_modify_args *args); int bfdd_bfd_sessions_single_hop_create(struct nb_cb_create_args *args); int bfdd_bfd_sessions_single_hop_destroy(struct nb_cb_destroy_args *args); const void * @@ -71,6 +73,8 @@ int bfdd_bfd_sessions_single_hop_echo_mode_modify( struct nb_cb_modify_args *args); int bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify( struct nb_cb_modify_args *args); +int bfdd_bfd_sessions_single_hop_required_echo_receive_interval_modify( + struct nb_cb_modify_args *args); struct yang_data * bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem( struct nb_cb_get_elem_args *args); @@ -209,8 +213,10 @@ void bfd_cli_show_shutdown(struct vty *vty, struct lyd_node *dnode, bool show_defaults); void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode, bool show_defaults); -void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode, - bool show_defaults); +void bfd_cli_show_desired_echo_transmission_interval( + struct vty *vty, struct lyd_node *dnode, bool show_defaults); +void bfd_cli_show_required_echo_receive_interval( + struct vty *vty, struct lyd_node *dnode, bool show_defaults); void bfd_cli_show_profile(struct vty *vty, struct lyd_node *dnode, bool show_defaults); void bfd_cli_peer_profile_show(struct vty *vty, struct lyd_node *dnode, diff --git a/bfdd/bfdd_nb_config.c b/bfdd/bfdd_nb_config.c index c8dd5cc3f..26bce4f35 100644 --- a/bfdd/bfdd_nb_config.c +++ b/bfdd/bfdd_nb_config.c @@ -483,17 +483,57 @@ int bfdd_bfd_profile_echo_mode_modify(struct nb_cb_modify_args *args) } /* - * XPath: /frr-bfdd:bfdd/bfd/profile/desired-echo-echo-transmission-interval + * XPath: /frr-bfdd:bfdd/bfd/profile/desired-echo-transmission-interval */ int bfdd_bfd_profile_desired_echo_transmission_interval_modify( struct nb_cb_modify_args *args) { struct bfd_profile *bp; + uint32_t min_tx; + + switch (args->event) { + case NB_EV_VALIDATE: + min_tx = yang_dnode_get_uint32(args->dnode, NULL); + if (min_tx < 10000 || min_tx > 60000000) + return NB_ERR_VALIDATION; + break; + + case NB_EV_PREPARE: + /* NOTHING */ + break; + + case NB_EV_APPLY: + min_tx = yang_dnode_get_uint32(args->dnode, NULL); + bp = nb_running_get_entry(args->dnode, NULL, true); + if (bp->min_echo_tx == min_tx) + return NB_OK; + + bp->min_echo_tx = min_tx; + bfd_profile_update(bp); + break; + + case NB_EV_ABORT: + /* NOTHING */ + break; + } + + return NB_OK; +} + +/* + * XPath: /frr-bfdd:bfdd/bfd/profile/required-echo-receive-interval + */ +int bfdd_bfd_profile_required_echo_receive_interval_modify( + struct nb_cb_modify_args *args) +{ + struct bfd_profile *bp; uint32_t min_rx; switch (args->event) { case NB_EV_VALIDATE: min_rx = yang_dnode_get_uint32(args->dnode, NULL); + if (min_rx == 0) + return NB_OK; if (min_rx < 10000 || min_rx > 60000000) return NB_ERR_VALIDATION; break; @@ -789,7 +829,46 @@ int bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify( case NB_EV_APPLY: bs = nb_running_get_entry(args->dnode, NULL, true); - if (echo_interval == bs->timers.required_min_echo) + if (echo_interval == bs->timers.desired_min_echo_tx) + return NB_OK; + + bs->peer_profile.min_echo_tx = echo_interval; + bfd_session_apply(bs); + break; + + case NB_EV_ABORT: + /* NOTHING */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-bfdd:bfdd/bfd/sessions/single-hop/required-echo-receive-interval + */ +int bfdd_bfd_sessions_single_hop_required_echo_receive_interval_modify( + struct nb_cb_modify_args *args) +{ + uint32_t echo_interval = yang_dnode_get_uint32(args->dnode, NULL); + struct bfd_session *bs; + + switch (args->event) { + case NB_EV_VALIDATE: + if (echo_interval == 0) + return NB_OK; + if (echo_interval < 10000 || echo_interval > 60000000) + return NB_ERR_VALIDATION; + break; + + case NB_EV_PREPARE: + /* NOTHING */ + break; + + case NB_EV_APPLY: + bs = nb_running_get_entry(args->dnode, NULL, true); + if (echo_interval == bs->timers.required_min_echo_rx) return NB_OK; bs->peer_profile.min_echo_rx = echo_interval; diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index cb140f7b1..a03fb9f21 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -158,8 +158,16 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs) bs->timers.required_min_rx / 1000); vty_out(vty, "\t\t\tTransmission interval: %ums\n", bs->timers.desired_min_tx / 1000); - vty_out(vty, "\t\t\tEcho transmission interval: %ums\n", - bs->timers.required_min_echo / 1000); + if (bs->timers.required_min_echo_rx != 0) + vty_out(vty, "\t\t\tEcho receive interval: %ums\n", + bs->timers.required_min_echo_rx / 1000); + else + vty_out(vty, "\t\t\tEcho receive interval: disabled\n"); + if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO)) + vty_out(vty, "\t\t\tEcho transmission interval: %ums\n", + bs->timers.desired_min_echo_tx / 1000); + else + vty_out(vty, "\t\t\tEcho transmission interval: disabled\n"); vty_out(vty, "\t\tRemote timers:\n"); vty_out(vty, "\t\t\tDetect-multiplier: %u\n", @@ -168,8 +176,11 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs) bs->remote_timers.required_min_rx / 1000); vty_out(vty, "\t\t\tTransmission interval: %ums\n", bs->remote_timers.desired_min_tx / 1000); - vty_out(vty, "\t\t\tEcho transmission interval: %ums\n", - bs->remote_timers.required_min_echo / 1000); + if (bs->remote_timers.required_min_echo != 0) + vty_out(vty, "\t\t\tEcho receive interval: %ums\n", + bs->remote_timers.required_min_echo / 1000); + else + vty_out(vty, "\t\t\tEcho receive interval: disabled\n"); vty_out(vty, "\n"); } @@ -245,11 +256,13 @@ static struct json_object *__display_peer_json(struct bfd_session *bs) bs->timers.required_min_rx / 1000); json_object_int_add(jo, "transmit-interval", bs->timers.desired_min_tx / 1000); + json_object_int_add(jo, "echo-receive-interval", + bs->timers.required_min_echo_rx / 1000); if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO)) - json_object_int_add(jo, "echo-interval", - bs->timers.required_min_echo / 1000); + json_object_int_add(jo, "echo-transmit-interval", + bs->timers.desired_min_echo_tx / 1000); else - json_object_int_add(jo, "echo-interval", 0); + json_object_int_add(jo, "echo-transmit-interval", 0); json_object_int_add(jo, "detect-multiplier", bs->detect_mult); @@ -257,7 +270,7 @@ static struct json_object *__display_peer_json(struct bfd_session *bs) bs->remote_timers.required_min_rx / 1000); json_object_int_add(jo, "remote-transmit-interval", bs->remote_timers.desired_min_tx / 1000); - json_object_int_add(jo, "remote-echo-interval", + json_object_int_add(jo, "remote-echo-receive-interval", bs->remote_timers.required_min_echo / 1000); json_object_int_add(jo, "remote-detect-multiplier", bs->remote_detect_mult); @@ -844,7 +857,8 @@ static int bfd_configure_peer(struct bfd_peer_cfg *bpc, bool mhop, bpc->bpc_detectmultiplier = BPC_DEF_DETECTMULTIPLIER; bpc->bpc_recvinterval = BPC_DEF_RECEIVEINTERVAL; bpc->bpc_txinterval = BPC_DEF_TRANSMITINTERVAL; - bpc->bpc_echointerval = BPC_DEF_ECHOINTERVAL; + bpc->bpc_echorecvinterval = BPC_DEF_ECHORECEIVEINTERVAL; + bpc->bpc_echotxinterval = BPC_DEF_ECHOTRANSMITINTERVAL; bpc->bpc_lastevent = monotime(NULL); /* Safety check: when no error buf is provided len must be zero. */ diff --git a/bfdd/bfddp_packet.h b/bfdd/bfddp_packet.h index 8865baef6..4ece94f57 100644 --- a/bfdd/bfddp_packet.h +++ b/bfdd/bfddp_packet.h @@ -163,6 +163,11 @@ struct bfddp_session { */ uint32_t min_rx; /** + * Minimum desired echo transmission interval (in microseconds) + * without jitter. + */ + uint32_t min_echo_tx; + /** * Required minimum echo receive interval rate (in microseconds) * without jitter. */ diff --git a/bfdd/config.c b/bfdd/config.c index b71670f01..a97caf137 100644 --- a/bfdd/config.c +++ b/bfdd/config.c @@ -135,7 +135,8 @@ static int parse_list(struct json_object *jo, enum peer_list_type plt, bpc.bpc_detectmultiplier = BFD_DEFDETECTMULT; bpc.bpc_recvinterval = BFD_DEFREQUIREDMINRX; bpc.bpc_txinterval = BFD_DEFDESIREDMINTX; - bpc.bpc_echointerval = BFD_DEF_REQ_MIN_ECHO; + bpc.bpc_echorecvinterval = BFD_DEF_REQ_MIN_ECHO_RX; + bpc.bpc_echotxinterval = BFD_DEF_DES_MIN_ECHO_TX; switch (plt) { case PLT_IPV4: @@ -250,11 +251,16 @@ static int parse_peer_config(struct json_object *jo, struct bfd_peer_cfg *bpc) bpc->bpc_has_txinterval = true; zlog_debug(" transmit-interval: %" PRIu64, bpc->bpc_txinterval); - } else if (strcmp(key, "echo-interval") == 0) { - bpc->bpc_echointerval = json_object_get_int64(jo_val); - bpc->bpc_has_echointerval = true; - zlog_debug(" echo-interval: %" PRIu64, - bpc->bpc_echointerval); + } else if (strcmp(key, "echo-receive-interval") == 0) { + bpc->bpc_echorecvinterval = json_object_get_int64(jo_val); + bpc->bpc_has_echorecvinterval = true; + zlog_debug(" echo-receive-interval: %" PRIu64, + bpc->bpc_echorecvinterval); + } else if (strcmp(key, "echo-transmit-interval") == 0) { + bpc->bpc_echotxinterval = json_object_get_int64(jo_val); + bpc->bpc_has_echotxinterval = true; + zlog_debug(" echo-transmit-interval: %" PRIu64, + bpc->bpc_echotxinterval); } else if (strcmp(key, "create-only") == 0) { bpc->bpc_createonly = json_object_get_boolean(jo_val); zlog_debug(" create-only: %s", @@ -463,8 +469,10 @@ char *config_notify_config(const char *op, struct bfd_session *bs) bs->timers.required_min_rx / 1000); json_object_int_add(resp, "transmit-interval", bs->timers.desired_min_tx / 1000); - json_object_int_add(resp, "echo-interval", - bs->timers.required_min_echo / 1000); + json_object_int_add(resp, "echo-receive-interval", + bs->timers.required_min_echo_rx / 1000); + json_object_int_add(resp, "echo-transmit-interval", + bs->timers.desired_min_echo_tx / 1000); json_object_int_add(resp, "remote-detect-multiplier", bs->remote_detect_mult); @@ -472,7 +480,7 @@ char *config_notify_config(const char *op, struct bfd_session *bs) bs->remote_timers.required_min_rx / 1000); json_object_int_add(resp, "remote-transmit-interval", bs->remote_timers.desired_min_tx / 1000); - json_object_int_add(resp, "remote-echo-interval", + json_object_int_add(resp, "remote-echo-receive-interval", bs->remote_timers.required_min_echo / 1000); if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO)) diff --git a/bfdd/dplane.c b/bfdd/dplane.c index 66b79f3b1..9cb0b0ea8 100644 --- a/bfdd/dplane.c +++ b/bfdd/dplane.c @@ -765,7 +765,8 @@ static void _bfd_dplane_session_fill(const struct bfd_session *bs, msg->data.session.lid = htonl(bs->discrs.my_discr); msg->data.session.min_tx = htonl(bs->timers.desired_min_tx); msg->data.session.min_rx = htonl(bs->timers.required_min_rx); - msg->data.session.min_echo_rx = htonl(bs->timers.required_min_echo); + msg->data.session.min_echo_tx = htonl(bs->timers.desired_min_echo_tx); + msg->data.session.min_echo_rx = htonl(bs->timers.required_min_echo_rx); } static int _bfd_dplane_add_session(struct bfd_dplane_ctx *bdc, diff --git a/doc/user/bfd.rst b/doc/user/bfd.rst index b8f749b74..4ee837682 100644 --- a/doc/user/bfd.rst +++ b/doc/user/bfd.rst @@ -166,10 +166,16 @@ BFD peers and profiles share the same BFD session configuration commands. The minimum transmission interval (less jitter) that this system wants to use to send BFD control packets. Defaults to 300ms. -.. clicmd:: echo-interval (10-60000) +.. clicmd:: echo receive-interval <disabled|(10-60000)> - Configures the minimal echo receive transmission interval that this - system is capable of handling. + Configures the minimum interval that this system is capable of + receiving echo packets. Disabled means that this system doesn't want + to receive echo packets. The default value is 50 milliseconds. + +.. clicmd:: echo transmit-interval (10-60000) + + The minimum transmission interval (less jitter) that this system + wants to use to send BFD echo packets. Defaults to 50ms. .. clicmd:: echo-mode @@ -445,12 +451,13 @@ You can inspect the current BFD peer status with the following commands: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms + Echo receive interval: 50ms Echo transmission interval: disabled Remote timers: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms - Echo transmission interval: 50ms + Echo receive interval: 50ms peer 192.168.1.1 label: router3-peer @@ -465,12 +472,13 @@ You can inspect the current BFD peer status with the following commands: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms + Echo receive interval: 50ms Echo transmission interval: disabled Remote timers: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms - Echo transmission interval: 50ms + Echo receive interval: 50ms frr# show bfd peer 192.168.1.1 BFD Peer: @@ -487,15 +495,16 @@ You can inspect the current BFD peer status with the following commands: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms + Echo receive interval: 50ms Echo transmission interval: disabled Remote timers: Detect-multiplier: 3 Receive interval: 300ms Transmission interval: 300ms - Echo transmission interval: 50ms + Echo receive interval: 50ms frr# show bfd peer 192.168.0.1 json - {"multihop":false,"peer":"192.168.0.1","id":1,"remote-id":1,"status":"up","uptime":161,"diagnostic":"ok","remote-diagnostic":"ok","receive-interval":300,"transmit-interval":300,"echo-interval":50,"detect-multiplier":3,"remote-receive-interval":300,"remote-transmit-interval":300,"remote-echo-interval":50,"remote-detect-multiplier":3,"peer-type":"dynamic"} + {"multihop":false,"peer":"192.168.0.1","id":1,"remote-id":1,"status":"up","uptime":161,"diagnostic":"ok","remote-diagnostic":"ok","receive-interval":300,"transmit-interval":300,"echo-receive-interval":50,"echo-transmit-interval":0,"detect-multiplier":3,"remote-receive-interval":300,"remote-transmit-interval":300,"remote-echo-receive-interval":50,"remote-detect-multiplier":3,"peer-type":"dynamic"} You can inspect the current BFD peer status in brief with the following commands: diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r1/peers.json b/tests/topotests/bfd-bgp-cbit-topo3/r1/peers.json index d1927ae49..b436d5562 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r1/peers.json +++ b/tests/topotests/bfd-bgp-cbit-topo3/r1/peers.json @@ -8,9 +8,10 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r1/peers_down.json b/tests/topotests/bfd-bgp-cbit-topo3/r1/peers_down.json index 25b47f18e..c7c7b96ee 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r1/peers_down.json +++ b/tests/topotests/bfd-bgp-cbit-topo3/r1/peers_down.json @@ -6,9 +6,10 @@ "status":"up", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r3/peers.json b/tests/topotests/bfd-bgp-cbit-topo3/r3/peers.json index 5193f2a6e..fc9e14534 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r3/peers.json +++ b/tests/topotests/bfd-bgp-cbit-topo3/r3/peers.json @@ -8,9 +8,10 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r3/peers_down.json b/tests/topotests/bfd-bgp-cbit-topo3/r3/peers_down.json index 9e4bd2633..620c6ddcd 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r3/peers_down.json +++ b/tests/topotests/bfd-bgp-cbit-topo3/r3/peers_down.json @@ -6,9 +6,10 @@ "status":"down", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-profiles-topo1/r1/bfdd.conf b/tests/topotests/bfd-profiles-topo1/r1/bfdd.conf index 4d636ab05..688f2e839 100644 --- a/tests/topotests/bfd-profiles-topo1/r1/bfdd.conf +++ b/tests/topotests/bfd-profiles-topo1/r1/bfdd.conf @@ -6,6 +6,7 @@ bfd profile slowtx receive-interval 800 transmit-interval 800 + echo receive-interval 400 ! peer 172.16.0.1 interface r1-eth0 profile slowtx diff --git a/tests/topotests/bfd-profiles-topo1/r2/bfd-peers-initial.json b/tests/topotests/bfd-profiles-topo1/r2/bfd-peers-initial.json index 3df9ec9c9..503f776ae 100644 --- a/tests/topotests/bfd-profiles-topo1/r2/bfd-peers-initial.json +++ b/tests/topotests/bfd-profiles-topo1/r2/bfd-peers-initial.json @@ -12,6 +12,7 @@ "remote-id": "*", "remote-receive-interval": 800, "remote-transmit-interval": 800, + "remote-echo-receive-interval": 400, "status": "up", "transmit-interval": 800, "uptime": "*", @@ -27,7 +28,7 @@ "receive-interval": 250, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 300, "remote-transmit-interval": 300, diff --git a/tests/topotests/bfd-profiles-topo1/r2/bfdd.conf b/tests/topotests/bfd-profiles-topo1/r2/bfdd.conf index 23a39a6ee..700c46ba1 100644 --- a/tests/topotests/bfd-profiles-topo1/r2/bfdd.conf +++ b/tests/topotests/bfd-profiles-topo1/r2/bfdd.conf @@ -10,6 +10,7 @@ bfd profile fasttx receive-interval 250 transmit-interval 250 + echo receive-interval disabled ! peer 172.16.0.2 interface r2-eth0 profile slowtx diff --git a/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json b/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json index d2d0c601c..d987a0ae7 100644 --- a/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json +++ b/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json @@ -12,6 +12,7 @@ "remote-id": "*", "remote-receive-interval": 250, "remote-transmit-interval": 250, + "remote-echo-receive-interval": 0, "status": "up", "transmit-interval": 300, "uptime": "*", diff --git a/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json b/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json index 2c2e136ab..c73296ac9 100644 --- a/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json +++ b/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json @@ -29,7 +29,7 @@ "receive-interval": 300, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 300, "remote-transmit-interval": 300, diff --git a/tests/topotests/bfd-topo1/r2/peers.json b/tests/topotests/bfd-topo1/r2/peers.json index 5035d643c..267459c7a 100644 --- a/tests/topotests/bfd-topo1/r2/peers.json +++ b/tests/topotests/bfd-topo1/r2/peers.json @@ -4,7 +4,7 @@ "status": "up" }, { - "remote-echo-interval": 100, + "remote-echo-receive-interval": 100, "peer": "192.168.1.1", "status": "up" }, diff --git a/tests/topotests/bfd-topo2/r1/peers.json b/tests/topotests/bfd-topo2/r1/peers.json index b14351cd8..9bce991d0 100644 --- a/tests/topotests/bfd-topo2/r1/peers.json +++ b/tests/topotests/bfd-topo2/r1/peers.json @@ -8,10 +8,11 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 }, { "multihop":false, @@ -21,9 +22,10 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval":50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-topo2/r2/peers.json b/tests/topotests/bfd-topo2/r2/peers.json index 29075fcc8..ec2135ce3 100644 --- a/tests/topotests/bfd-topo2/r2/peers.json +++ b/tests/topotests/bfd-topo2/r2/peers.json @@ -3,39 +3,42 @@ "status": "up", "transmit-interval": 300, "remote-receive-interval": 300, - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "diagnostic": "ok", "multihop": false, "interface": "r2-eth0", "remote-transmit-interval": 300, "receive-interval": 300, - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-diagnostic": "ok" }, { "status": "up", "transmit-interval": 300, "remote-receive-interval": 300, - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "diagnostic": "ok", "multihop": false, "interface": "r2-eth2", "remote-transmit-interval": 300, "receive-interval": 300, - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-diagnostic": "ok" }, { "status": "up", "transmit-interval": 300, "remote-receive-interval": 300, - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "diagnostic": "ok", "multihop": false, "interface": "r2-eth1", "remote-transmit-interval": 300, "receive-interval": 300, - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-diagnostic": "ok", "peer": "10.0.3.1" } diff --git a/tests/topotests/bfd-topo2/r3/peers.json b/tests/topotests/bfd-topo2/r3/peers.json index 6698bff20..c19c98033 100644 --- a/tests/topotests/bfd-topo2/r3/peers.json +++ b/tests/topotests/bfd-topo2/r3/peers.json @@ -3,13 +3,14 @@ "status": "up", "transmit-interval": 300, "remote-receive-interval": 300, - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "diagnostic": "ok", "multihop": false, "interface": "r3-eth0", "remote-transmit-interval": 300, "receive-interval": 300, - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-diagnostic": "ok", "peer": "10.0.3.2" } diff --git a/tests/topotests/bfd-topo2/r4/peers.json b/tests/topotests/bfd-topo2/r4/peers.json index 83101eb47..dd26b9b58 100644 --- a/tests/topotests/bfd-topo2/r4/peers.json +++ b/tests/topotests/bfd-topo2/r4/peers.json @@ -8,10 +8,11 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval": 50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 }, { "multihop":false, @@ -21,9 +22,10 @@ "remote-diagnostic":"ok", "receive-interval":300, "transmit-interval":300, - "echo-interval":0, + "echo-receive-interval": 50, + "echo-transmit-interval":0, "remote-receive-interval":300, "remote-transmit-interval":300, - "remote-echo-interval":50 + "remote-echo-receive-interval":50 } ] diff --git a/tests/topotests/bfd-topo3/r1/bfd-peers.json b/tests/topotests/bfd-topo3/r1/bfd-peers.json index 56205d538..f8a354fc2 100644 --- a/tests/topotests/bfd-topo3/r1/bfd-peers.json +++ b/tests/topotests/bfd-topo3/r1/bfd-peers.json @@ -2,7 +2,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "local": "2001:db8:1::1", "minimum-ttl": 253, @@ -12,7 +13,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, @@ -24,7 +25,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r1-eth0", "local": "2001:db8:1::1", @@ -34,7 +36,7 @@ "receive-interval": 600, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 600, "remote-transmit-interval": 600, @@ -46,7 +48,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "local": "192.168.1.1", "minimum-ttl": 254, @@ -56,7 +59,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, diff --git a/tests/topotests/bfd-topo3/r2/bfd-peers.json b/tests/topotests/bfd-topo3/r2/bfd-peers.json index cb8985b13..786d66dbe 100644 --- a/tests/topotests/bfd-topo3/r2/bfd-peers.json +++ b/tests/topotests/bfd-topo3/r2/bfd-peers.json @@ -2,7 +2,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r2-eth0", "local": "2001:db8:1::2", @@ -12,7 +13,7 @@ "receive-interval": 600, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 600, "remote-transmit-interval": 600, @@ -24,7 +25,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r2-eth1", "local": "2001:db8:2::2", @@ -34,7 +36,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, diff --git a/tests/topotests/bfd-topo3/r3/bfd-peers.json b/tests/topotests/bfd-topo3/r3/bfd-peers.json index 8be35fd08..1f58663a4 100644 --- a/tests/topotests/bfd-topo3/r3/bfd-peers.json +++ b/tests/topotests/bfd-topo3/r3/bfd-peers.json @@ -2,7 +2,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r3-eth1", "local": "2001:db8:3::2", @@ -12,7 +13,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, @@ -24,7 +25,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r3-eth0", "local": "2001:db8:2::1", @@ -34,7 +36,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, @@ -46,7 +48,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "local": "192.168.2.1", "minimum-ttl": 254, @@ -56,7 +59,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, diff --git a/tests/topotests/bfd-topo3/r4/bfd-peers.json b/tests/topotests/bfd-topo3/r4/bfd-peers.json index e2e6722ef..5477f3912 100644 --- a/tests/topotests/bfd-topo3/r4/bfd-peers.json +++ b/tests/topotests/bfd-topo3/r4/bfd-peers.json @@ -2,7 +2,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "local": "2001:db8:3::1", "minimum-ttl": 253, @@ -12,7 +13,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, @@ -24,7 +25,8 @@ { "detect-multiplier": 3, "diagnostic": "ok", - "echo-interval": 0, + "echo-receive-interval": 50, + "echo-transmit-interval": 0, "id": "*", "interface": "r4-eth0", "local": "2001:db8:3::1", @@ -34,7 +36,7 @@ "receive-interval": 2000, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", - "remote-echo-interval": 50, + "remote-echo-receive-interval": 50, "remote-id": "*", "remote-receive-interval": 2000, "remote-transmit-interval": 2000, diff --git a/tests/topotests/bfd-vrf-topo1/r2/peers.json b/tests/topotests/bfd-vrf-topo1/r2/peers.json index 5035d643c..267459c7a 100644 --- a/tests/topotests/bfd-vrf-topo1/r2/peers.json +++ b/tests/topotests/bfd-vrf-topo1/r2/peers.json @@ -4,7 +4,7 @@ "status": "up" }, { - "remote-echo-interval": 100, + "remote-echo-receive-interval": 100, "peer": "192.168.1.1", "status": "up" }, diff --git a/yang/frr-bfdd.yang b/yang/frr-bfdd.yang index 0f090a1b7..d21ff5068 100644 --- a/yang/frr-bfdd.yang +++ b/yang/frr-bfdd.yang @@ -210,7 +210,14 @@ module frr-bfdd { type uint32; units microseconds; default 50000; - description "Minimum desired control packet transmission interval"; + description "Minimum desired echo packet transmission interval"; + } + + leaf required-echo-receive-interval { + type uint32; + units microseconds; + default 50000; + description "Minimum required echo packet receive interval"; } } |