summaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd/bfd_udp.h
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-02-14 20:20:22 +0000
committerKlement Sekera <klement.sekera@gmail.com>2022-02-14 20:21:01 +0000
commitcdaf0d8c884ae0f337ef94b0ceb7449c991a3e6c (patch)
tree0a72992ae6f8a9e3868c01c0237bed100342e9d7 /src/vnet/bfd/bfd_udp.h
parentb59f63b0e71c879331280b721ec72ff0b4699540 (diff)
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 <klement.sekera@gmail.com> Change-Id: Ie597928022b6ac74c2220019b9e8e1714295f170
Diffstat (limited to 'src/vnet/bfd/bfd_udp.h')
-rw-r--r--src/vnet/bfd/bfd_udp.h14
1 files changed, 4 insertions, 10 deletions
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 <vnet/ip/ip6_packet.h>
#include <vnet/bfd/bfd_api.h>
-/* *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