make sure the very first fragment triggers an rx_callback 67/9767/3
authorAndreas Schultz <aschultz@warp10.net>
Fri, 8 Dec 2017 14:12:36 +0000 (15:12 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Sun, 10 Dec 2017 02:48:38 +0000 (02:48 +0000)
On the first session server, the first payload packet gets queued
but the Rx callback will only be invoked when the second packet
is received.

By initializing enqueue_epoch in the session, we can make sure that
the RX callback will be invoked for the first packet as well.

Change-Id: I60e2cf8d4d2ca71d461ca003d459c8e6e6956a4d
Signed-off-by: Andreas Schultz <aschultz@warp10.net>
src/vnet/session/session.c

index b1bd7a7..616bfc9 100644 (file)
@@ -147,6 +147,7 @@ session_alloc_for_connection (transport_connection_t * tc)
   s = session_alloc (thread_index);
   s->session_type = session_type_from_proto_and_ip (tc->proto, tc->is_ip4);
   s->session_state = SESSION_STATE_CONNECTING;
+  s->enqueue_epoch = ~0;
 
   /* Attach transport to session and vice versa */
   s->connection_index = tc->c_index;