X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvcl_private.c;h=4af79e9ebb0096ef4cd3824e62c9387060a5dcee;hb=878a9f57061ec6313dc8ad8ef4f1eb55e32665e7;hp=589380d27aa1cb34da761867801354ba675b723b;hpb=d04ea4443ffedcb3f07bb0accfdbf2da2b8911f4;p=vpp.git diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c index 589380d27aa..4af79e9ebb0 100644 --- a/src/vcl/vcl_private.c +++ b/src/vcl/vcl_private.c @@ -341,7 +341,8 @@ vcl_session_read_ready (vcl_session_t * s) if (ph.data_length + SESSION_CONN_HDR_LEN > max_deq) return 0; - return ph.data_length; + /* Allow zero legth datagrams */ + return ph.data_length ? ph.data_length : 1; } return svm_fifo_max_dequeue_cons (s->rx_fifo); @@ -435,6 +436,7 @@ vcl_segment_attach (u64 segment_handle, char *name, ssvm_segment_type_t type, if ((rv = fifo_segment_attach (&vcm->segment_main, a))) { clib_warning ("svm_fifo_segment_attach ('%s') failed", name); + clib_rwlock_writer_unlock (&vcm->segment_table_lock); return rv; } hash_set (vcm->segment_table, segment_handle, a->new_segment_indices[0]); @@ -478,7 +480,7 @@ vcl_segment_detach (u64 segment_handle) clib_rwlock_writer_unlock (&vcm->segment_table_lock); - VDBG (0, "detached segment %u handle %u", segment_index, segment_handle); + VDBG (0, "detached segment %u handle %lx", segment_index, segment_handle); } void