session tcp udp: consolidate transport snd apis
[vpp.git] / src / vnet / session / transport_types.h
index ac2177c..323d261 100644 (file)
@@ -20,7 +20,8 @@
 #include <vnet/ip/ip.h>
 #include <vnet/tcp/tcp_debug.h>
 
-#define TRANSPORT_MAX_HDRS_LEN    100  /* Max number of bytes for headers */
+#define TRANSPORT_MAX_HDRS_LEN    140  /* Max number of bytes for headers */
+
 
 typedef enum transport_dequeue_type_
 {
@@ -42,16 +43,24 @@ typedef enum transport_service_type_
 typedef enum transport_connection_flags_
 {
   TRANSPORT_CONNECTION_F_IS_TX_PACED = 1 << 0,
-  TRANSPORT_CONNECTION_F_NO_LOOKUP = 1 << 1, /**< Don't register connection in lookup
-                                                 Does not apply to local apps and
-                                                 transports using the network layer (udp/tcp) */
+  /**
+   * Don't register connection in lookup. Does not apply to local apps
+   * and transports using the network layer (udp/tcp)
+   */
+  TRANSPORT_CONNECTION_F_NO_LOOKUP = 1 << 1,
+  /**
+   * Connection descheduled by the session layer.
+   */
+  TRANSPORT_CONNECTION_F_DESCHED = 1 << 2,
 } transport_connection_flags_t;
 
 typedef struct _spacer
 {
+  u64 bytes_per_sec;
   u64 bucket;
-  u64 last_update;
+  clib_us_time_t last_update;
   f32 tokens_per_period;
+  u32 idle_timeout_us;
 } spacer_t;
 
 #define TRANSPORT_CONN_ID_LEN  44
@@ -181,6 +190,7 @@ typedef struct transport_endpoint_
 #define foreach_transport_endpoint_cfg_fields                          \
   foreach_transport_endpoint_fields                                    \
   _(transport_endpoint_t, peer)                                                \
+  _(u16, mss)                                                          \
 
 typedef struct transport_endpoint_pair_
 {