diff options
author | Steven Luong <sluong@cisco.com> | 2022-10-25 13:09:11 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-10-26 18:03:30 +0000 |
commit | d810a6e218e9af3c3bccd58c9a2d925a7f12242e (patch) | |
tree | 66ee520bbe6c31be2c893a9dc1d0717204dfbe79 /src/vnet/session/session.h | |
parent | 5efc0cdf48e45ff457c5ddead157165b725e78f3 (diff) |
session: add session event log for session state
To aid sesipon debug, add session event log in SM debug to track
the session state.
Type: improvement
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I6909cf969cd5b6a3ea5a06d08ae32c2f1d48f686
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r-- | src/vnet/session/session.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index 4fa9194077e..54740e64cf0 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -527,6 +527,13 @@ int session_tx_fifo_peek_bytes (transport_connection_t * tc, u8 * buffer, u32 offset, u32 max_bytes); u32 session_tx_fifo_dequeue_drop (transport_connection_t * tc, u32 max_bytes); +always_inline void +session_set_state (session_t *s, session_state_t session_state) +{ + s->session_state = session_state; + SESSION_EVT (SESSION_EVT_STATE_CHANGE, s); +} + always_inline u32 transport_max_rx_enqueue (transport_connection_t * tc) { |