vcl: refactor vls to minimize lock usage
[vpp.git] / src / vcl / vcl_private.h
index f1c15ba..3866563 100644 (file)
@@ -108,7 +108,6 @@ typedef struct
 
 typedef struct vcl_session_msg
 {
-  u32 next;
   union
   {
     session_accepted_msg_t accepted_msg;
@@ -375,7 +374,8 @@ vcl_session_alloc (vcl_worker_t * wrk)
 static inline void
 vcl_session_free (vcl_worker_t * wrk, vcl_session_t * s)
 {
-  VDBG (0, "session %u [0x%llx] removed", s->session_index, s->vpp_handle);
+  /* Debug level set to 1 to avoid debug messages while ldp is cleaning up */
+  VDBG (1, "session %u [0x%llx] removed", s->session_index, s->vpp_handle);
   pool_put (wrk->sessions, s);
 }
 
@@ -544,8 +544,8 @@ vcl_session_is_closing (vcl_session_t * s)
 static inline int
 vcl_session_closing_error (vcl_session_t * s)
 {
-  return s->session_state == STATE_DISCONNECT
-    ? VPPCOM_ECONNRESET : VPPCOM_ECONNABORTED;
+  /* Return 0 on closing sockets */
+  return s->session_state == STATE_DISCONNECT ? VPPCOM_ECONNRESET : 0;
 }
 
 static inline int