- rv = pthread_create (&utm->cut_through_thread_handle,
- NULL /*attr */ , cut_through_thread_fn, 0);
- if (rv)
- {
- clib_warning ("pthread_create returned %d", rv);
- rv = VNET_API_ERROR_SYSCALL_ERROR_1;
- }
- utm->do_echo = 1;
- }
- else
- {
- rx_fifo->client_session_index = session_index;
- tx_fifo->client_session_index = session_index;
- session->rx_fifo = rx_fifo;
- session->tx_fifo = tx_fifo;
- clib_memcpy (&session->transport.rmt_ip, mp->ip,
- sizeof (ip46_address_t));
- session->transport.is_ip4 = mp->is_ip4;
- session->transport.rmt_port = mp->port;
- }
-
- hash_set (utm->session_index_by_vpp_handles, mp->handle, session_index);
- if (pool_elts (utm->sessions) && (pool_elts (utm->sessions) % 20000) == 0)
- {
- f64 now = clib_time_now (&utm->clib_time);
- fformat (stdout, "%d active sessions in %.2f seconds, %.2f/sec...\n",
- pool_elts (utm->sessions), now - start_time,
- (f64) pool_elts (utm->sessions) / (now - start_time));