aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd/bfd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bfd/bfd_main.c')
-rw-r--r--src/vnet/bfd/bfd_main.c62
1 files changed, 39 insertions, 23 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c
index 1423da91158..4ad0a16830f 100644
--- a/src/vnet/bfd/bfd_main.c
+++ b/src/vnet/bfd/bfd_main.c
@@ -30,6 +30,20 @@
#include <vlib/log.h>
#include <vnet/crypto/crypto.h>
+const char *
+bfd_hop_type_string (bfd_hop_type_e hoptype)
+{
+ switch (hoptype)
+ {
+#define F(x) \
+ case BFD_HOP_TYPE_##x: \
+ return "BFD_HOP_TYPE_" #x;
+ foreach_bfd_hop (F)
+#undef F
+ }
+ return "UNKNOWN";
+}
+
static void
bfd_validate_counters (bfd_main_t *bm)
{
@@ -1353,6 +1367,8 @@ VLIB_REGISTER_NODE (bfd_process_node, static) =
[BFD_TX_IP6_REWRITE] = "ip6-rewrite",
[BFD_TX_IP4_MIDCHAIN] = "ip4-midchain",
[BFD_TX_IP6_MIDCHAIN] = "ip6-midchain",
+ [BFD_TX_IP4_LOOKUP] = "ip4-lookup",
+ [BFD_TX_IP6_LOOKUP] = "ip6-lookup",
}
};
// clang-format on
@@ -2049,29 +2065,29 @@ u8 *
format_bfd_session (u8 * s, va_list * args)
{
const bfd_session_t *bs = va_arg (*args, bfd_session_t *);
- s = format (s, "bs_idx=%u local-state=%s remote-state=%s\n"
- "local-discriminator=%u remote-discriminator=%u\n"
- "local-diag=%s echo-active=%s\n"
- "desired-min-tx=%u required-min-rx=%u\n"
- "required-min-echo-rx=%u detect-mult=%u\n"
- "remote-min-rx=%u remote-min-echo-rx=%u\n"
- "remote-demand=%s poll-state=%s\n"
- "auth: local-seq-num=%u remote-seq-num=%u\n"
- " is-delayed=%s\n"
- " curr-key=%U\n"
- " next-key=%U",
- bs->bs_idx, bfd_state_string (bs->local_state),
- bfd_state_string (bs->remote_state), bs->local_discr,
- bs->remote_discr, bfd_diag_code_string (bs->local_diag),
- (bs->echo ? "yes" : "no"), bs->config_desired_min_tx_usec,
- bs->config_required_min_rx_usec, 1, bs->local_detect_mult,
- bs->remote_min_rx_usec, bs->remote_min_echo_rx_usec,
- (bs->remote_demand ? "yes" : "no"),
- bfd_poll_state_string (bs->poll_state),
- bs->auth.local_seq_number, bs->auth.remote_seq_number,
- (bs->auth.is_delayed ? "yes" : "no"),
- format_bfd_auth_key, bs->auth.curr_key, format_bfd_auth_key,
- bs->auth.next_key);
+ s = format (
+ s,
+ "bs_idx=%u hop-type=%s local-state=%s remote-state=%s\n"
+ "local-discriminator=%u remote-discriminator=%u\n"
+ "local-diag=%s echo-active=%s\n"
+ "desired-min-tx=%u required-min-rx=%u\n"
+ "required-min-echo-rx=%u detect-mult=%u\n"
+ "remote-min-rx=%u remote-min-echo-rx=%u\n"
+ "remote-demand=%s poll-state=%s\n"
+ "auth: local-seq-num=%u remote-seq-num=%u\n"
+ " is-delayed=%s\n"
+ " curr-key=%U\n"
+ " next-key=%U",
+ bs->bs_idx, bfd_hop_type_string (bs->hop_type),
+ bfd_state_string (bs->local_state), bfd_state_string (bs->remote_state),
+ bs->local_discr, bs->remote_discr, bfd_diag_code_string (bs->local_diag),
+ (bs->echo ? "yes" : "no"), bs->config_desired_min_tx_usec,
+ bs->config_required_min_rx_usec, 1, bs->local_detect_mult,
+ bs->remote_min_rx_usec, bs->remote_min_echo_rx_usec,
+ (bs->remote_demand ? "yes" : "no"), bfd_poll_state_string (bs->poll_state),
+ bs->auth.local_seq_number, bs->auth.remote_seq_number,
+ (bs->auth.is_delayed ? "yes" : "no"), format_bfd_auth_key,
+ bs->auth.curr_key, format_bfd_auth_key, bs->auth.next_key);
return s;
}