Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Overall tcp performance improvements (VPP-846)
[vpp.git]
/
src
/
vnet
/
session
/
session.c
diff --git
a/src/vnet/session/session.c
b/src/vnet/session/session.c
index
534598d
..
fe19804
100644
(file)
--- a/
src/vnet/session/session.c
+++ b/
src/vnet/session/session.c
@@
-700,7
+700,7
@@
stream_session_init_fifos_pointers (transport_connection_t * tc,
svm_fifo_init_pointers (s->server_tx_fifo, tx_pointer);
}
svm_fifo_init_pointers (s->server_tx_fifo, tx_pointer);
}
-void
+int
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
u8 is_fail)
{
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
u8 is_fail)
{
@@
-709,6
+709,7
@@
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
stream_session_t *new_s = 0;
u64 handle;
u32 api_context = 0;
stream_session_t *new_s = 0;
u64 handle;
u32 api_context = 0;
+ int error = 0;
handle = stream_session_half_open_lookup (smm, &tc->lcl_ip, &tc->rmt_ip,
tc->lcl_port, tc->rmt_port,
handle = stream_session_half_open_lookup (smm, &tc->lcl_ip, &tc->rmt_ip,
tc->lcl_port, tc->rmt_port,
@@
-716,7
+717,7
@@
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
if (handle == HALF_OPEN_LOOKUP_INVALID_VALUE)
{
clib_warning ("This can't be good!");
if (handle == HALF_OPEN_LOOKUP_INVALID_VALUE)
{
clib_warning ("This can't be good!");
- return;
+ return
-1
;
}
/* Get the app's index from the handle we stored when opening connection */
}
/* Get the app's index from the handle we stored when opening connection */
@@
-730,9
+731,12
@@
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
/* Create new session (svm segments are allocated if needed) */
if (stream_session_create_i (sm, tc, &new_s))
/* Create new session (svm segments are allocated if needed) */
if (stream_session_create_i (sm, tc, &new_s))
- return;
-
- new_s->app_index = app->index;
+ {
+ is_fail = 1;
+ error = -1;
+ }
+ else
+ new_s->app_index = app->index;
}
/* Notify client */
}
/* Notify client */
@@
-741,6
+745,8
@@
stream_session_connect_notify (transport_connection_t * tc, u8 sst,
/* Cleanup session lookup */
stream_session_half_open_table_del (smm, sst, tc);
/* Cleanup session lookup */
stream_session_half_open_table_del (smm, sst, tc);
+
+ return error;
}
void
}
void
@@
-981,8
+987,13
@@
session_send_session_evt_to_thread (u64 session_handle,
/* Based on request block (or not) for lack of space */
if (PREDICT_TRUE (q->cursize < q->maxsize))
/* Based on request block (or not) for lack of space */
if (PREDICT_TRUE (q->cursize < q->maxsize))
- unix_shared_memory_queue_add (q, (u8 *) & evt,
- 0 /* do wait for mutex */ );
+ {
+ if (unix_shared_memory_queue_add (q, (u8 *) & evt,
+ 1 /* do wait for mutex */ ))
+ {
+ clib_warning ("failed to enqueue evt");
+ }
+ }
else
{
clib_warning ("queue full");
else
{
clib_warning ("queue full");