summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-01 13:00:58 -0800
committerDave Barach <openvpp@barachs.net>2019-03-02 23:40:04 +0000
commit31c9955a4e83578422b3328ef0d7b2b248536644 (patch)
tree51dbc9de2cac22ca190ec394d6bf29e4ebb72d54 /src/vnet/tcp
parentf6c4313b6aa7746fe97afd398ce68c2efbef0600 (diff)
session: cleanup/rename functions
- remove unused functions - rename old "stream" functions Change-Id: Icbb03daa9f9f1c58b5be5c38aa8a9cbcf9159b47 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp.c4
-rw-r--r--src/vnet/tcp/tcp.h2
-rw-r--r--src/vnet/tcp/tcp_input.c27
-rw-r--r--src/vnet/tcp/tcp_output.c25
4 files changed, 30 insertions, 28 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 8969f7bc980..7b28dd3b70c 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -350,7 +350,7 @@ tcp_connection_close (tcp_connection_t * tc)
tcp_timer_update (tc, TCP_TIMER_WAITCLOSE, TCP_FINWAIT1_TIME);
break;
case TCP_STATE_ESTABLISHED:
- if (!session_tx_fifo_max_dequeue (&tc->connection))
+ if (!transport_max_tx_dequeue (&tc->connection))
tcp_send_fin (tc);
else
tc->flags |= TCP_CONN_FINPNDG;
@@ -361,7 +361,7 @@ tcp_connection_close (tcp_connection_t * tc)
tcp_timer_set (tc, TCP_TIMER_WAITCLOSE, TCP_FINWAIT1_TIME);
break;
case TCP_STATE_CLOSE_WAIT:
- if (!session_tx_fifo_max_dequeue (&tc->connection))
+ if (!transport_max_tx_dequeue (&tc->connection))
{
tcp_send_fin (tc);
tcp_connection_timers_reset (tc);
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 65182c493b6..7ab7ee681c5 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -934,7 +934,7 @@ tcp_timer_is_active (tcp_connection_t * tc, tcp_timers_e timer)
#define tcp_validate_txf_size(_tc, _a) \
ASSERT(_tc->state != TCP_STATE_ESTABLISHED \
- || session_tx_fifo_max_dequeue (&_tc->connection) >= _a)
+ || transport_max_tx_dequeue (&_tc->connection) >= _a)
void tcp_rcv_sacks (tcp_connection_t * tc, u32 ack);
u8 *tcp_scoreboard_replay (u8 * s, tcp_connection_t * tc, u8 verbose);
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 88bd7a5d858..e31fbac1bb0 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -564,7 +564,7 @@ tcp_handle_postponed_dequeues (tcp_worker_ctx_t * wrk)
continue;
/* Dequeue the newly ACKed bytes */
- session_dequeue_drop (&tc->connection, tc->burst_acked);
+ session_tx_fifo_dequeue_drop (&tc->connection, tc->burst_acked);
tc->burst_acked = 0;
tcp_validate_txf_size (tc, tc->snd_una_max - tc->snd_una);
@@ -2192,8 +2192,8 @@ tcp46_established_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
tcp_inc_err_counter (err_counters, error0, 1);
}
- errors = session_manager_flush_enqueue_events (TRANSPORT_PROTO_TCP,
- thread_index);
+ errors = session_main_flush_enqueue_events (TRANSPORT_PROTO_TCP,
+ thread_index);
err_counters[TCP_ERROR_MSG_QUEUE_FULL] = errors;
tcp_store_err_counters (established, err_counters);
tcp_handle_postponed_dequeues (wrk);
@@ -2589,8 +2589,8 @@ tcp46_syn_sent_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
}
- errors = session_manager_flush_enqueue_events (TRANSPORT_PROTO_TCP,
- my_thread_index);
+ errors = session_main_flush_enqueue_events (TRANSPORT_PROTO_TCP,
+ my_thread_index);
tcp_inc_counter (syn_sent, TCP_ERROR_MSG_QUEUE_FULL, errors);
vlib_buffer_free (vm, first_buffer, from_frame->n_vectors);
@@ -2795,7 +2795,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tc0->flags & TCP_CONN_FINPNDG)
{
/* TX fifo finally drained */
- max_dequeue = session_tx_fifo_max_dequeue (&tc0->connection);
+ max_dequeue = transport_max_tx_dequeue (&tc0->connection);
if (max_dequeue <= tc0->burst_acked)
tcp_send_fin (tc0);
}
@@ -2812,7 +2812,8 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
/* Don't try to deq the FIN acked */
if (tc0->burst_acked > 1)
- session_dequeue_drop (&tc0->connection, tc0->burst_acked - 1);
+ session_tx_fifo_dequeue_drop (&tc0->connection,
+ tc0->burst_acked - 1);
tc0->burst_acked = 0;
}
break;
@@ -2832,7 +2833,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tc0->flags & TCP_CONN_FINPNDG)
{
/* TX fifo finally drained */
- if (!session_tx_fifo_max_dequeue (&tc0->connection))
+ if (!transport_max_tx_dequeue (&tc0->connection))
{
tcp_send_fin (tc0);
tcp_connection_timers_reset (tc0);
@@ -2958,9 +2959,9 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tc0->flags & TCP_CONN_FINPNDG)
{
/* Drop all outstanding tx data. */
- session_dequeue_drop (&tc0->connection,
- transport_max_tx_dequeue
- (&tc0->connection));
+ session_tx_fifo_dequeue_drop (&tc0->connection,
+ transport_max_tx_dequeue
+ (&tc0->connection));
tcp_send_fin (tc0);
}
else
@@ -2995,8 +2996,8 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
}
- errors = session_manager_flush_enqueue_events (TRANSPORT_PROTO_TCP,
- thread_index);
+ errors = session_main_flush_enqueue_events (TRANSPORT_PROTO_TCP,
+ thread_index);
tcp_inc_counter (rcv_process, TCP_ERROR_MSG_QUEUE_FULL, errors);
tcp_handle_postponed_dequeues (wrk);
vlib_buffer_free (vm, first_buffer, from_frame->n_vectors);
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 4de479c344b..2e9fc58cefb 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1340,8 +1340,8 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
return 0;
*b = vlib_get_buffer (vm, bi);
data = tcp_init_buffer (vm, *b);
- n_bytes = stream_session_peek_bytes (&tc->connection, data, offset,
- max_deq_bytes);
+ n_bytes = session_tx_fifo_peek_bytes (&tc->connection, data, offset,
+ max_deq_bytes);
ASSERT (n_bytes == max_deq_bytes);
b[0]->current_length = n_bytes;
tcp_push_hdr_i (tc, *b, tc->state, /* compute opts */ 0, /* burst */ 0);
@@ -1370,9 +1370,9 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
*b = vlib_get_buffer (vm, wrk->tx_buffers[--n_bufs]);
data = tcp_init_buffer (vm, *b);
- n_bytes = stream_session_peek_bytes (&tc->connection, data, offset,
- bytes_per_buffer -
- TRANSPORT_MAX_HDRS_LEN);
+ n_bytes = session_tx_fifo_peek_bytes (&tc->connection, data, offset,
+ bytes_per_buffer -
+ TRANSPORT_MAX_HDRS_LEN);
b[0]->current_length = n_bytes;
b[0]->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
b[0]->total_length_not_including_first_buffer = 0;
@@ -1387,8 +1387,9 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
chain_b = vlib_get_buffer (vm, chain_bi);
chain_b->current_data = 0;
data = vlib_buffer_get_current (chain_b);
- n_peeked = stream_session_peek_bytes (&tc->connection, data,
- offset + n_bytes, len_to_deq);
+ n_peeked = session_tx_fifo_peek_bytes (&tc->connection, data,
+ offset + n_bytes,
+ len_to_deq);
ASSERT (n_peeked == len_to_deq);
n_bytes += n_peeked;
chain_b->current_length = n_peeked;
@@ -1439,7 +1440,7 @@ tcp_prepare_retransmit_segment (tcp_worker_ctx_t * wrk,
/*
* Make sure we can retransmit something
*/
- available_bytes = session_tx_fifo_max_dequeue (&tc->connection);
+ available_bytes = transport_max_tx_dequeue (&tc->connection);
ASSERT (available_bytes >= offset);
available_bytes -= offset;
if (!available_bytes)
@@ -1716,7 +1717,7 @@ tcp_timer_persist_handler (u32 index)
|| tc->snd_wnd > tc->snd_mss)
return;
- available_bytes = session_tx_fifo_max_dequeue (&tc->connection);
+ available_bytes = transport_max_tx_dequeue (&tc->connection);
offset = tc->snd_una_max - tc->snd_una;
/* Reprogram persist if no new bytes available to send. We may have data
@@ -1753,7 +1754,7 @@ tcp_timer_persist_handler (u32 index)
max_snd_bytes =
clib_min (tc->snd_mss, tm->bytes_per_buffer - TRANSPORT_MAX_HDRS_LEN);
n_bytes =
- stream_session_peek_bytes (&tc->connection, data, offset, max_snd_bytes);
+ session_tx_fifo_peek_bytes (&tc->connection, data, offset, max_snd_bytes);
b->current_length = n_bytes;
ASSERT (n_bytes != 0 && (tcp_timer_is_active (tc, TCP_TIMER_RETRANSMIT)
|| tc->snd_nxt == tc->snd_una_max
@@ -1855,7 +1856,7 @@ tcp_fast_retransmit_sack (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
sb = &tc->sack_sb;
hole = scoreboard_get_hole (sb, sb->cur_rxt_hole);
- max_deq = session_tx_fifo_max_dequeue (&tc->connection);
+ max_deq = transport_max_tx_dequeue (&tc->connection);
max_deq -= tc->snd_una_max - tc->snd_una;
while (snd_space > 0 && n_segs < burst_size)
@@ -1982,7 +1983,7 @@ send_unsent:
if (snd_space < tc->snd_mss || tc->snd_mss == 0)
goto done;
- max_deq = session_tx_fifo_max_dequeue (&tc->connection);
+ max_deq = transport_max_tx_dequeue (&tc->connection);
max_deq -= tc->snd_una_max - tc->snd_una;
if (max_deq)
{