aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-14 11:28:43 -0800
committerDamjan Marion <dmarion@me.com>2018-12-17 08:47:39 +0000
commit3c7d4f9e1f54ec6627795b64525f182e2cda7490 (patch)
tree8d9ca4efe66a2f8f7cf56a3fe9c9d3b92561b26f /src/vcl/vcl_private.h
parent7bb27caf62f5fa942be68015aeb0543566d22371 (diff)
vcl/session: handle reset/disconnect before app accept
Also further improves reset handling. Change-Id: I6e517632f700f181761726b965134e0c217eb06d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r--src/vcl/vcl_private.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 44c6520703e..3d6c85ea6f7 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -67,13 +67,13 @@ typedef enum
STATE_CONNECT = 0x02,
STATE_LISTEN = 0x04,
STATE_ACCEPT = 0x08,
- STATE_CLOSE_ON_EMPTY = 0x10,
+ STATE_VPP_CLOSING = 0x10,
STATE_DISCONNECT = 0x20,
STATE_FAILED = 0x40
} session_state_t;
-#define SERVER_STATE_OPEN (STATE_ACCEPT|STATE_CLOSE_ON_EMPTY)
-#define CLIENT_STATE_OPEN (STATE_CONNECT|STATE_CLOSE_ON_EMPTY)
+#define SERVER_STATE_OPEN (STATE_ACCEPT|STATE_VPP_CLOSING)
+#define CLIENT_STATE_OPEN (STATE_CONNECT|STATE_VPP_CLOSING)
#define STATE_OPEN (SERVER_STATE_OPEN | CLIENT_STATE_OPEN)
typedef struct epoll_event vppcom_epoll_event_t;
@@ -95,6 +95,9 @@ typedef struct
ip46_address_t ip46;
} vppcom_ip46_t;
+#define VCL_ACCEPTED_F_CLOSED (1 << 0)
+#define VCL_ACCEPTED_F_RESET (1 << 1)
+
typedef struct vcl_session_msg
{
u32 next;
@@ -102,6 +105,7 @@ typedef struct vcl_session_msg
{
session_accepted_msg_t accepted_msg;
};
+ u32 flags;
} vcl_session_msg_t;
enum
@@ -155,6 +159,7 @@ typedef struct
u32 sm_seg_index;
u32 client_context;
u64 vpp_handle;
+ u32 vpp_thread_index;
/* Socket configuration state */
u8 is_vep;