session: remove ho with fifos support 85/26485/2
authorFlorin Coras <fcoras@cisco.com>
Mon, 13 Apr 2020 16:48:04 +0000 (16:48 +0000)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 13 Apr 2020 16:58:11 +0000 (16:58 +0000)
Type: refactor

UDPC (removed) was the only consumer.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2812bf58d3c68fe021ec73acaa1bd00ef3172846

src/vnet/session/session.c
src/vnet/session/transport.c
src/vnet/session/transport.h
src/vnet/session/transport_types.h

index 1274408..ed940d5 100644 (file)
@@ -734,10 +734,9 @@ session_main_flush_all_enqueue_events (u8 transport_proto)
   return errors;
 }
 
-static inline int
-session_stream_connect_notify_inline (transport_connection_t * tc,
-                                     session_error_t err,
-                                     session_state_t opened_state)
+int
+session_stream_connect_notify (transport_connection_t * tc,
+                              session_error_t err)
 {
   u32 opaque = 0, new_ti, new_si;
   app_worker_t *app_wrk;
@@ -781,7 +780,7 @@ session_stream_connect_notify_inline (transport_connection_t * tc,
     }
 
   s = session_get (new_si, new_ti);
-  s->session_state = opened_state;
+  s->session_state = SESSION_STATE_READY;
   session_lookup_add_connection (tc, session_handle (s));
 
   if (app_worker_connect_notify (app_wrk, s, SESSION_E_NONE, opaque))
@@ -794,20 +793,6 @@ session_stream_connect_notify_inline (transport_connection_t * tc,
   return 0;
 }
 
-int
-session_stream_connect_notify (transport_connection_t * tc,
-                              session_error_t err)
-{
-  return session_stream_connect_notify_inline (tc, err, SESSION_STATE_READY);
-}
-
-int
-session_ho_stream_connect_notify (transport_connection_t * tc,
-                                 session_error_t err)
-{
-  return session_stream_connect_notify_inline (tc, err, SESSION_STATE_OPENED);
-}
-
 static void
 session_switch_pool_reply (void *arg)
 {
@@ -1225,8 +1210,7 @@ session_open_vc (u32 app_wrk_index, session_endpoint_t * rmt, u32 opaque)
    * thing but better than allocating a separate half-open pool.
    */
   tc->s_index = opaque;
-  if (transport_half_open_has_fifos (rmt->transport_proto))
-    return session_ho_stream_connect_notify (tc, 0 /* is_fail */ );
+
   return 0;
 }
 
index ba62200..d2c6594 100644 (file)
@@ -285,12 +285,6 @@ transport_protocol_get_vft (transport_proto_t transport_proto)
   return &tp_vfts[transport_proto];
 }
 
-u8
-transport_half_open_has_fifos (transport_proto_t tp)
-{
-  return tp_vfts[tp].transport_options.half_open_has_fifos;
-}
-
 transport_service_type_t
 transport_protocol_service_type (transport_proto_t tp)
 {
index 5592601..954db49 100644 (file)
@@ -32,7 +32,6 @@ typedef struct _transport_options_t
   char *short_name;
   transport_tx_fn_type_t tx_type;
   transport_service_type_t service_type;
-  u8 half_open_has_fifos;
 } transport_options_t;
 
 typedef enum transport_snd_flags_
index 2c4863a..28043b5 100644 (file)
@@ -227,7 +227,6 @@ transport_endpoint_fib_proto (transport_endpoint_t * tep)
 }
 
 u8 transport_protocol_is_cl (transport_proto_t tp);
-u8 transport_half_open_has_fifos (transport_proto_t tp);
 transport_service_type_t transport_protocol_service_type (transport_proto_t);
 transport_tx_fn_type_t transport_protocol_tx_fn_type (transport_proto_t tp);