Update lisp map record default ttl to 24h
[vpp.git] / src / vnet / session / node.c
index 07eeae8..b24f5fd 100644 (file)
@@ -171,7 +171,10 @@ 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;
+    {
+      svm_fifo_unset_event (s0->server_tx_fifo);
+      return 0;
+    }
 
   /* Ensure we're not writing more than transport window allows */
   if (max_dequeue0 < snd_space0)
@@ -245,6 +248,11 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
          ASSERT (bi0);
          _vec_len (smm->tx_buffers[thread_index]) = n_bufs;
 
+         /* usual speculation, or the enqueue_x1 macro will barf */
+         to_next[0] = bi0;
+         to_next += 1;
+         n_left_to_next -= 1;
+
          b0 = vlib_get_buffer (vm, bi0);
          b0->error = 0;
          b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID
@@ -252,10 +260,6 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
          b0->current_data = 0;
          b0->total_length_not_including_first_buffer = 0;
 
-         /* RX on the local interface. tx in default fib */
-         vnet_buffer (b0)->sw_if_index[VLIB_RX] = 0;
-         vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
-
          len_to_deq0 = clib_min (left_to_snd0, deq_per_buf);
 
          data0 = vlib_buffer_make_headroom (b0, MAX_HDRS_LEN);
@@ -304,10 +308,6 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
          }));
          /* *INDENT-ON* */
 
-         /* usual speculation, or the enqueue_x1 macro will barf */
-         to_next[0] = bi0;
-         to_next += 1;
-         n_left_to_next -= 1;
 
          VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
          if (PREDICT_FALSE (n_trace > 0))
@@ -393,7 +393,7 @@ session_event_get_session (session_fifo_event_t * e0, u8 thread_index)
 
   s0 = stream_session_get_if_valid (session_index0, thread_index);
 
-  ASSERT (s0->thread_index == thread_index);
+  ASSERT (s0 == 0 || s0->thread_index == thread_index);
 
   return s0;
 }