summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-05-22 11:39:59 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-05-23 13:57:07 +0000
commitd2aab838ea7875d7f58246b80285e299b137fbf1 (patch)
treeba2bdc5c87dc0efbd5ef9068c8b0e0766fa182fe /src/vnet/session
parentb5236cb975c766154a36d0d59731850683635ea4 (diff)
tcp: cc improvements and fixes
Change-Id: I6615bb612bcc3f795b5f822ea55209bb30ef35b5 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index b24e22923f1..6908a568a0f 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -450,20 +450,27 @@ session_get_from_handle_safe (u64 handle)
}
always_inline u32
-stream_session_max_rx_enqueue (transport_connection_t * tc)
+transport_max_rx_enqueue (transport_connection_t * tc)
{
stream_session_t *s = session_get (tc->s_index, tc->thread_index);
return svm_fifo_max_enqueue (s->server_rx_fifo);
}
always_inline u32
-stream_session_rx_fifo_size (transport_connection_t * tc)
+transport_rx_fifo_size (transport_connection_t * tc)
{
stream_session_t *s = session_get (tc->s_index, tc->thread_index);
return s->server_rx_fifo->nitems;
}
always_inline u32
+transport_tx_fifo_size (transport_connection_t * tc)
+{
+ stream_session_t *s = session_get (tc->s_index, tc->thread_index);
+ return s->server_tx_fifo->nitems;
+}
+
+always_inline u32
session_get_index (stream_session_t * s)
{
return (s - session_manager_main.sessions[s->thread_index]);