aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_types.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-07 19:39:43 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-05-10 20:53:32 +0000
commitea72764204dac0a1ab6412bc27b758faead2ca10 (patch)
treed22e849e0e0a84b11c42373c1b97fb6b715d3098 /src/vnet/session/session_types.h
parente2272ac27c31b8cf7ecf0ff8d4244f90034a09f4 (diff)
session: use half-open sessions for vc establishment
Use half-open sessions to track virtual circuit connection establishment. These sesssions can only be allocated and freed by the thread that allocates half-open connections (main). Consequently, they can only be freed on half-open cleanup notifications from transports. Goal is to simplify state tracking within the session layer but it's also a first step towards allowing builtin apps to track and cleanup outstanding connects. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8a535906d13eb7f8966deb82333839de80f8049f
Diffstat (limited to 'src/vnet/session/session_types.h')
-rw-r--r--src/vnet/session/session_types.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h
index c8b1d2eb001..2c3db5f18b5 100644
--- a/src/vnet/session/session_types.h
+++ b/src/vnet/session/session_types.h
@@ -148,13 +148,14 @@ typedef enum
SESSION_N_STATES,
} session_state_t;
-#define foreach_session_flag \
- _(RX_EVT, "rx-event") \
- _(PROXY, "proxy") \
- _(CUSTOM_TX, "custom-tx") \
- _(IS_MIGRATING, "migrating") \
- _(UNIDIRECTIONAL, "unidirectional") \
- _(CUSTOM_FIFO_TUNING, "custom-fifo-tuning") \
+#define foreach_session_flag \
+ _ (RX_EVT, "rx-event") \
+ _ (PROXY, "proxy") \
+ _ (CUSTOM_TX, "custom-tx") \
+ _ (IS_MIGRATING, "migrating") \
+ _ (UNIDIRECTIONAL, "unidirectional") \
+ _ (CUSTOM_FIFO_TUNING, "custom-fifo-tuning") \
+ _ (HALF_OPEN, "half-open")
typedef enum session_flags_bits_
{
@@ -208,6 +209,9 @@ typedef struct session_
/** App listener index in app's listener pool if a listener */
u32 al_index;
+
+ /** Index in app worker's half-open table if a half-open */
+ u32 ho_index;
};
/** Opaque, for general use */