From cdaf0d8c884ae0f337ef94b0ceb7449c991a3e6c Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 14 Feb 2022 20:20:22 +0000 Subject: bfd: add per session counters Add udp total session counts - as stat segment entries: /bfd/udp4/sessions /bfd/udp6/sessions and per session packet/byte counters: /bfd/rx-session-counters /bfd/rx-session-echo-counters /bfd/tx-session-counters /bfd/tx-session-echo-counters These counters are per-thread and per-session id. Adjust tests to verify proper function. Type: refactor Signed-off-by: Klement Sekera Change-Id: Ie597928022b6ac74c2220019b9e8e1714295f170 --- src/vnet/bfd/bfd_udp.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/vnet/bfd/bfd_udp.h') diff --git a/src/vnet/bfd/bfd_udp.h b/src/vnet/bfd/bfd_udp.h index 87868104f98..866b5868b00 100644 --- a/src/vnet/bfd/bfd_udp.h +++ b/src/vnet/bfd/bfd_udp.h @@ -24,7 +24,6 @@ #include #include -/* *INDENT-OFF* */ /** identifier of BFD session based on UDP transport only */ typedef CLIB_PACKED (struct { union { @@ -38,7 +37,6 @@ typedef CLIB_PACKED (struct { /** peer address */ ip46_address_t peer_addr; }) bfd_udp_key_t; -/* *INDENT-ON* */ /** UDP transport specific data embedded in bfd_session's union */ typedef struct @@ -82,22 +80,18 @@ int bfd_add_udp6_transport (vlib_main_t * vm, u32 bi, /** * @brief transport packet over udpv4 * - * @param is_echo 1 if this is echo packet, 0 if control frame - * * @return 1 on success, 0 on failure */ -int bfd_transport_udp4 (vlib_main_t * vm, u32 bi, - const struct bfd_session_s *bs); +int bfd_transport_udp4 (vlib_main_t *vm, u32 bi, + const struct bfd_session_s *bs, int is_echo); /** * @brief transport packet over udpv6 * - * @param is_echo 1 if this is echo packet, 0 if control frame - * * @return 1 on success, 0 on failure */ -int bfd_transport_udp6 (vlib_main_t * vm, u32 bi, - const struct bfd_session_s *bs); +int bfd_transport_udp6 (vlib_main_t *vm, u32 bi, + const struct bfd_session_s *bs, int is_echo); /** * @brief check if the bfd udp layer is echo-capable at this time -- cgit 1.2.3-korg