summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-03-30 02:54:28 -0700
committerDave Barach <openvpp@barachs.net>2017-04-02 14:02:30 +0000
commit3e350af5d3e9744a4529a28dd293b2d4601442f7 (patch)
treee4b489ddd509fc96382d49592cfc5bafc412a216 /src/vnet/session/node.c
parent799e26d5bdf6b74ab615644e0cd291de6e352989 (diff)
TCP cc/window management fixes and debugging
- added persist timer - update rcv_las whenever sending an ack - moved fifo size to its own cache line - improved session and builtin client debugging Change-Id: Ia649cf942cf0c061a713e8b67f0eb6974a6cd55b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/session/node.c')
-rw-r--r--src/vnet/session/node.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/vnet/session/node.c b/src/vnet/session/node.c
index 8681105c284..b86e87d9bac 100644
--- a/src/vnet/session/node.c
+++ b/src/vnet/session/node.c
@@ -119,15 +119,20 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
/* Nothing to read return */
if (max_dequeue0 == 0)
- {
- return 0;
- }
+ return 0;
/* Ensure we're not writing more than transport window allows */
- max_len_to_snd0 = clib_min (max_dequeue0, snd_space0);
-
- /* TODO check if transport is willing to send len_to_snd0
- * bytes (Nagle) */
+ if (max_dequeue0 < snd_space0)
+ {
+ /* Constrained by tx queue. Try to send only fully formed segments */
+ max_len_to_snd0 = (max_dequeue0 > snd_mss0) ?
+ max_dequeue0 - max_dequeue0 % snd_mss0 : max_dequeue0;
+ /* TODO Nagle ? */
+ }
+ else
+ {
+ max_len_to_snd0 = snd_space0;
+ }
n_frame_bytes = snd_mss0 * VLIB_FRAME_SIZE;
n_frames_per_evt = ceil ((double) max_len_to_snd0 / n_frame_bytes);
@@ -308,11 +313,14 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
int n_tx_packets = 0;
u32 my_thread_index = vm->cpu_index;
int i, rv;
+ f64 now = vlib_time_now (vm);
+
+ SESSION_EVT_DBG (SESSION_EVT_POLL_GAP_TRACK, smm, my_thread_index);
/*
* Update TCP time
*/
- tcp_update_time (vlib_time_now (vm), my_thread_index);
+ tcp_update_time (now, my_thread_index);
/*
* Get vpp queue events