tcp: Enable TCP timewait port use
[vpp.git] / src / vnet / tcp / tcp.h
index e9247eb..52cc308 100644 (file)
@@ -82,7 +82,7 @@ typedef enum _tcp_timers
   TCP_N_TIMERS
 } tcp_timers_e;
 
-typedef void (timer_expiration_handler) (u32 index);
+typedef void (timer_expiration_handler) (u32 index, u32 thread_index);
 
 extern timer_expiration_handler tcp_timer_delack_handler;
 extern timer_expiration_handler tcp_timer_retransmit_handler;
@@ -558,6 +558,9 @@ typedef struct tcp_configuration_
   /** Allow use of TSO whenever available */
   u8 allow_tso;
 
+  /** Set if csum offloading is enabled */
+  u8 csum_offload;
+
   /** Default congestion control algorithm type */
   tcp_cc_algorithm_type_e cc_algo;
 
@@ -762,7 +765,10 @@ u8 *format_tcp_connection (u8 * s, va_list * args);
 always_inline tcp_connection_t *
 tcp_listener_get (u32 tli)
 {
-  return pool_elt_at_index (tcp_main.listener_pool, tli);
+  tcp_connection_t *tc = 0;
+  if (!pool_is_free_index (tcp_main.listener_pool, tli))
+    tc = pool_elt_at_index (tcp_main.listener_pool, tli);
+  return tc;
 }
 
 always_inline tcp_connection_t *