vcl: refactor vls to minimize lock usage
[vpp.git] / src / vcl / vcl_private.h
index faab1c2..3866563 100644 (file)
@@ -374,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);
 }
 
@@ -543,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