diff options
author | Florin Coras <fcoras@cisco.com> | 2020-04-16 04:30:22 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-04-17 14:58:23 +0000 |
commit | d50ff7fba167035b10def282b5ec166fa7899948 (patch) | |
tree | c228e4e1abf11118730c568643134c887dac3d71 /src/vnet/session/session_types.h | |
parent | ce815deb72fd3941b000aecec931131afc9d6c34 (diff) |
session tcp: track half open in app wrk
Type: improvement
Do extra checks when establishing an active connect and cleanup pending
connects if application detaches.
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe9349db57b313ba2aa5ea3960ef5cf755f5098a
Diffstat (limited to 'src/vnet/session/session_types.h')
-rw-r--r-- | src/vnet/session/session_types.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h index cdaaad04ca1..784312d9182 100644 --- a/src/vnet/session/session_types.h +++ b/src/vnet/session/session_types.h @@ -309,9 +309,21 @@ session_parse_handle (session_handle_t handle, u32 * index, } static inline session_handle_t -session_make_handle (u32 session_index, u32 thread_index) +session_make_handle (u32 session_index, u32 data) { - return (((u64) thread_index << 32) | (u64) session_index); + return (((u64) data << 32) | (u64) session_index); +} + +always_inline u32 +session_handle_index (session_handle_t ho_handle) +{ + return (ho_handle & 0xffffffff); +} + +always_inline u32 +session_handle_data (session_handle_t ho_handle) +{ + return (ho_handle >> 32); } typedef enum |