> On 29 Dec 2018, at 07:26, david.leitch....@gmail.com wrote:
> 
> Hi ...
>  
> I know that we need handoff mechanism when running multithread because 
> traffic for specific inside network user must be processed always on same 
> thread in both directions and We can not remove handoff node from NAT nodes 
> ,because handoff is faster than locking mechanism.
>  
> So the problem is potential dead lock when two workers waiting for each 
> other!!  for example Worker A and B, A is going to handoff to B but 
> unfortunately at the same time B has the same thing to do to A, then they are 
> both waiting forever. your solution In VPP 19.01 (or 18.10) is dropping 
> packets when the queue is full (congestion drop)
> 
> first question is how you can detect congestion on queue ?
> and What happen if we have separate CPUs for Handoff node and nat processing 
> node and do not the same job handoff nad natting on single CPU core.
> for example CPU core A nodes are ( dpdk-input -> ... -> NAT handoff ) and CPU 
> core B nodes are ( nat44-in2out -> ... -> ip4-lookup -> interface-output) , 
> in this situation worker A wait for worker B but worker B never wait for 
> worker A.
> Is it true to say we never have potential dead lock if we have seprate CPUs ?

yes

> If yes, why you use a same single CPU for both nat and handoff ?

It is harder to have proper balance between input and worker threads, specially 
in smaller deployments.

> The separate CPUs can not solve the deadlock ?

they can, with dedicated input threads, deadlock will not happen...


Current handoff code can do either drop or wait. Changing that is as simple as 
changing last parameter of vlib_buffer_enqueue_to_thread(...) from 0 to 1.

You need to be aware that at the moment when queue is congested, input thread 
will spend more and more time in spinlock which can result with drops again,
but this time they will happen on hardware side (rx queue full)....

-- 
Damjan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11801): https://lists.fd.io/g/vpp-dev/message/11801
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