*Hi Damjan*
*Thnaks for your answer,*

*I think it is possible (I encountered this problem) to have deadlock even when 
I use separate CPU for handoff and NAT processing, Or same CPU with congestion 
drop mechanism.*

*I studied the code and separate the CPUs of handoff and NAT processing, in 
this situation I think just in one case deadlock for handoff may be happen*
*suppose if worker A wants to dequeue but elt->valid value is zero so 
vlib_frame_queue_dequeue function return and do not dequeue, as result fq->head 
will never increase:*
 
int vlib_frame_queue_dequeue (vlib_main_t *vm, vlib_frame_queue_main_t *fqm)
{
 ....
 while (1)
    {
       if (fq->head == fq->tail)
              return processed;
      
      elt = fq->elts + ((fq->head + 1) & (fq->nelts - 1));
 
     *if (!elt->valid)*
        {
            fq->head_hint = fq->head;
            return processed;
        }
 ....
}

*and on the other side , worker B ( on handoff node) wants to enqueue but ring 
is full so wait :*

static inline vlib_frame_queue_elt_t *
vlib_get_frame_queue_elt (u32 frame_queue_index, u32 index)
{
   ...
   new_tail = __sync_add_and_fetch (&fq->tail, 1);
 
  /* Wait until a ring slot is available */
 while (new_tail >= fq->head_hint + fq->nelts)
      vlib_worker_thread_barrier_check ();
     ....
}

*therefore worker B never exit from while loop* , *do you think it is possible 
?*
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11803): https://lists.fd.io/g/vpp-dev/message/11803
Mute This Topic: https://lists.fd.io/mt/28878687/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to