diff options
author | Florin Coras <fcoras@cisco.com> | 2018-05-23 21:01:30 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-26 18:56:43 +0000 |
commit | ca1c8f3e782dc68a51aa2792771d9b4aac696ddd (patch) | |
tree | 890c7250af97dd65357363242e2c7272a199feca /src/vnet/session | |
parent | a34c08c8c5a505e55178a9a8ef5391224d5460a5 (diff) |
tcp: loss recovery improvements/fixes
- fix newreno cwnd computation
- reset snd_una_max on entering recovery
- accept acks beyond snd_nxt but less than snd_congestion when in
recovery
- avoid entering fast recovery multiple times when using sacks
- avoid as much as possible sending small segments when doing fast
retransmit
- more event logging
Change-Id: I19dd151d7704e39d4eae06de3a26f5e124875366
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r-- | src/vnet/session/session.c | 2 | ||||
-rw-r--r-- | src/vnet/session/session_node.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 2697c26381e..c0163255fb6 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -774,7 +774,7 @@ stream_session_reset_notify (transport_connection_t * tc) stream_session_t *s; application_t *app; s = session_get (tc->s_index, tc->thread_index); - + s->session_state = SESSION_STATE_CLOSED; app = application_get (s->app_index); app->cb_fns.session_reset_callback (s); } diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 46fc4dc8745..e046efba81f 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -260,6 +260,8 @@ session_tx_not_ready (stream_session_t * s, u8 peek_data) * session is not ready or closed */ if (s->session_state < SESSION_STATE_READY) return 1; + if (s->session_state == SESSION_STATE_CLOSED) + return 2; } return 0; } @@ -364,11 +366,12 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node, session_tx_context_t *ctx = &smm->ctx[thread_index]; transport_proto_t tp; vlib_buffer_t *pb; - u16 n_bufs; + u16 n_bufs, rv; - if (PREDICT_FALSE (session_tx_not_ready (s, peek_data))) + if (PREDICT_FALSE ((rv = session_tx_not_ready (s, peek_data)))) { - vec_add1 (smm->pending_event_vector[thread_index], *e); + if (rv < 2) + vec_add1 (smm->pending_event_vector[thread_index], *e); return 0; } |