From: Florin Coras Date: Fri, 6 Nov 2020 03:01:44 +0000 (-0800) Subject: tcp: push last buffered sequence X-Git-Tag: v21.06-rc0~190 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=fb9d37402020c5d341e0a5a9e9a937ce06fe6171;p=vpp.git tcp: push last buffered sequence Type: improvement Signed-off-by: Florin Coras Change-Id: Iba914ac69585e89f174f09e74ae716df1b080c59 --- diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 912b193bf94..0a3d31588ee 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -582,12 +582,6 @@ tcp_handle_postponed_dequeues (tcp_worker_ctx_t * wrk) session_tx_fifo_dequeue_drop (&tc->connection, tc->burst_acked); tcp_validate_txf_size (tc, tc->snd_nxt - tc->snd_una); - if (PREDICT_FALSE (tc->flags & TCP_CONN_PSH_PENDING)) - { - if (seq_leq (tc->psh_seq, tc->snd_una)) - tc->flags &= ~TCP_CONN_PSH_PENDING; - } - if (tcp_is_descheduled (tc)) tcp_reschedule (tc); diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 13432283677..e2c2b231985 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -323,6 +323,13 @@ tcp_update_burst_snd_vars (tcp_connection_t * tc) tcp_cc_event (tc, TCP_CC_EVT_START_TX); tcp_connection_tx_pacer_reset (tc, tc->cwnd, TRANSPORT_PACER_MIN_BURST); } + + if (tc->flags & TCP_CONN_PSH_PENDING) + { + u32 max_deq = transport_max_tx_dequeue (&tc->connection); + /* Last byte marked for push */ + tc->psh_seq = tc->snd_una + max_deq - 1; + } } #endif /* CLIB_MARCH_VARIANT */