Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tcp: improve waitclose in closing states
[vpp.git]
/
src
/
vnet
/
session
/
session.h
diff --git
a/src/vnet/session/session.h
b/src/vnet/session/session.h
index
35c8fb4
..
3b72923
100644
(file)
--- a/
src/vnet/session/session.h
+++ b/
src/vnet/session/session.h
@@
-36,6
+36,7
@@
typedef enum
SESSION_IO_EVT_CT_RX,
FIFO_EVENT_APP_TX,
SESSION_IO_EVT_CT_TX,
SESSION_IO_EVT_CT_RX,
FIFO_EVENT_APP_TX,
SESSION_IO_EVT_CT_TX,
+ SESSION_IO_EVT_TX_FLUSH,
FIFO_EVENT_DISCONNECT,
FIFO_EVENT_BUILTIN_RX,
FIFO_EVENT_BUILTIN_TX,
FIFO_EVENT_DISCONNECT,
FIFO_EVENT_BUILTIN_RX,
FIFO_EVENT_BUILTIN_TX,
@@
-441,6
+442,14
@@
session_type_from_proto_and_ip (transport_proto_t proto, u8 is_ip4)
return (proto << 1 | is_ip4);
}
return (proto << 1 | is_ip4);
}
+always_inline u64
+session_segment_handle (stream_session_t * s)
+{
+ svm_fifo_t *f = s->server_rx_fifo;
+ return segment_manager_make_segment_handle (f->segment_manager,
+ f->segment_index);
+}
+
always_inline u8
session_has_transport (stream_session_t * s)
{
always_inline u8
session_has_transport (stream_session_t * s)
{
@@
-510,6
+519,13
@@
transport_max_rx_enqueue (transport_connection_t * tc)
return svm_fifo_max_enqueue (s->server_rx_fifo);
}
return svm_fifo_max_enqueue (s->server_rx_fifo);
}
+always_inline u32
+transport_max_tx_dequeue (transport_connection_t * tc)
+{
+ stream_session_t *s = session_get (tc->s_index, tc->thread_index);
+ return svm_fifo_max_dequeue (s->server_tx_fifo);
+}
+
always_inline u32
transport_rx_fifo_size (transport_connection_t * tc)
{
always_inline u32
transport_rx_fifo_size (transport_connection_t * tc)
{
@@
-563,7
+579,7
@@
session_clone_safe (u32 session_index, u32 thread_index)
session_pool_add_peeker (thread_index);
new_s = session_alloc (current_thread_index);
old_s = session_manager_main.wrk[thread_index].sessions + session_index;
session_pool_add_peeker (thread_index);
new_s = session_alloc (current_thread_index);
old_s = session_manager_main.wrk[thread_index].sessions + session_index;
- clib_memcpy (new_s, old_s, sizeof (*new_s));
+ clib_memcpy
_fast
(new_s, old_s, sizeof (*new_s));
session_pool_remove_peeker (thread_index);
new_s->thread_index = current_thread_index;
new_s->session_index = session_get_index (new_s);
session_pool_remove_peeker (thread_index);
new_s->thread_index = current_thread_index;
new_s->session_index = session_get_index (new_s);
@@
-594,9
+610,10
@@
int session_dequeue_notify (stream_session_t * s);
void stream_session_init_fifos_pointers (transport_connection_t * tc,
u32 rx_pointer, u32 tx_pointer);
void stream_session_init_fifos_pointers (transport_connection_t * tc,
u32 rx_pointer, u32 tx_pointer);
-
void
stream_session_accept_notify (transport_connection_t * tc);
+
int
stream_session_accept_notify (transport_connection_t * tc);
void stream_session_disconnect_notify (transport_connection_t * tc);
void stream_session_delete_notify (transport_connection_t * tc);
void stream_session_disconnect_notify (transport_connection_t * tc);
void stream_session_delete_notify (transport_connection_t * tc);
+void session_stream_close_notify (transport_connection_t * tc);
void stream_session_reset_notify (transport_connection_t * tc);
int stream_session_accept (transport_connection_t * tc, u32 listener_index,
u8 notify);
void stream_session_reset_notify (transport_connection_t * tc);
int stream_session_accept (transport_connection_t * tc, u32 listener_index,
u8 notify);