session: use teps in accept/connect notifications
[vpp.git] / src / tests / vnet / session / tcp_echo.c
index 3531a53..3fcc285 100644 (file)
@@ -507,7 +507,7 @@ recv_data_chunk (echo_main_t * em, echo_session_t * s, u8 * rx_buf)
 {
   int n_to_read, n_read;
 
-  n_to_read = svm_fifo_max_dequeue (s->rx_fifo);
+  n_to_read = svm_fifo_max_dequeue_cons (s->rx_fifo);
   if (!n_to_read)
     return;
 
@@ -655,9 +655,9 @@ session_accepted_handler (session_accepted_msg_t * mp)
   if (start_time == 0.0)
     start_time = clib_time_now (&em->clib_time);
 
-  ip_str = format (0, "%U", format_ip46_address, &mp->ip, mp->is_ip4);
+  ip_str = format (0, "%U", format_ip46_address, &mp->rmt.ip, mp->rmt.is_ip4);
   clib_warning ("Accepted session from: %s:%d", ip_str,
-               clib_net_to_host_u16 (mp->port));
+               clib_net_to_host_u16 (mp->rmt.port));
 
   /* Allocate local session and set it up */
   pool_get (em->sessions, session);
@@ -755,8 +755,8 @@ session_connected_handler (session_connected_msg_t * mp)
 
   em->n_clients_connected += 1;
   clib_warning ("session %u (0x%llx) connected with local ip %U port %d",
-               session_index, mp->handle, format_ip46_address, mp->lcl_ip,
-               mp->is_ip4, clib_net_to_host_u16 (mp->lcl_port));
+               session_index, mp->handle, format_ip46_address, &mp->lcl.ip,
+               mp->lcl.is_ip4, clib_net_to_host_u16 (mp->lcl.port));
 }
 
 static void
@@ -916,7 +916,7 @@ clients_run (echo_main_t * em)
            continue;
          }
        e = svm_msg_q_msg_data (em->our_event_queue, &msg);
-       if (e->event_type != FIFO_EVENT_APP_RX)
+       if (e->event_type != SESSION_IO_EVT_RX)
          handle_mq_event (e);
        svm_msg_q_free_msg (em->our_event_queue, &msg);
       }
@@ -1063,7 +1063,7 @@ server_handle_rx (echo_main_t * em, session_event_t * e)
    * message queue */
   svm_fifo_unset_event (s->rx_fifo);
 
-  max_dequeue = svm_fifo_max_dequeue (s->rx_fifo);
+  max_dequeue = svm_fifo_max_dequeue_cons (s->rx_fifo);
   if (PREDICT_FALSE (!max_dequeue))
     return;