diff options
| author | lynnemorrison <lynne.morrison@ibm.com> | 2022-07-25 19:02:46 -0400 |
|---|---|---|
| committer | lynnemorrison <lynne.morrison@ibm.com> | 2022-08-02 10:09:01 -0400 |
| commit | 618a06fe11720ae776c28037684812476f6647e6 (patch) | |
| tree | ece08b7a0c3aa881079f59475362a73f6ea378ec /bfdd/bfd.h | |
| parent | b6754b74ef4e16b5e2c6e0c1ff139ecee485f949 (diff) | |
BFDD: Add RTT to BFD IPV4 Echo packet processing
Add a send time into the BFD Echo packet. When the BFD Echo
packet is received back store time it took in usec. When
user issues a show bfd peer(s) command calculate and display
minimum, average, and max time it took for the BFD Echo packet
to be looped back.
Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
Diffstat (limited to 'bfdd/bfd.h')
| -rw-r--r-- | bfdd/bfd.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bfdd/bfd.h b/bfdd/bfd.h index 48a1e0bc31..a5881cddb0 100644 --- a/bfdd/bfd.h +++ b/bfdd/bfd.h @@ -86,7 +86,8 @@ struct bfd_echo_pkt { }; }; uint32_t my_discr; - uint8_t pad[16]; + uint64_t time_sent_sec; + uint64_t time_sent_usec; }; @@ -249,6 +250,8 @@ struct bfd_config_timers { uint32_t required_min_echo_rx; }; +#define BFD_RTT_SAMPLE 8 + /* * Session state information */ @@ -311,6 +314,10 @@ struct bfd_session { struct bfd_timers remote_timers; uint64_t refcount; /* number of pointers referencing this. */ + + uint8_t rtt_valid; /* number of valid samples */ + uint8_t rtt_index; /* last index added */ + uint64_t rtt[BFD_RTT_SAMPLE]; /* RRT in usec for echo to be looped */ }; struct peer_label { @@ -635,6 +642,7 @@ const struct bfd_session *bfd_session_next(const struct bfd_session *bs, bool mhop); void bfd_sessions_remove_manual(void); void bfd_profiles_remove(void); +void bfd_rtt_init(struct bfd_session *bfd); /** * Set the BFD session echo state. |
