Hongjun,

We replicate the graph across all threads. 


The question is what do you want the node to do when it sees this event?


If for instance a packet triggered an event that another node needs to know 
about in order to subsequently process THAT packet, ignoring the fact it's 
going to stay in the one thread, we use buffer metadata for in band state 
management. 


If on the other hand, the arrival of that packet triggers the need for a 
different forwarding behaviour for OTHER packets, what you are talking about is 
in the control plane realm. Ie a non-VPP process could listen to events/API 
messages triggered by the event packet, and make config changes that impact the 
behaviour of other nodes, regardless of their thread. 


Yet another approach is to set up a next_node for that event packet that 
subsequently sets an alternate next_node for subsequent packets in the node the 
event packet was noticed. That's bordering on inband control plane which to 
date we have eschewed, but I think it's doable. 


So I think there are better options than trying to manage inter-thread side 
band control plane. 


If this is an NSH specific thing, let's discuss the use case on that mailer and 
if there's any VPP specifics after that we can bring it back here, if that's OK 
with you. 

On Mar 8, 2017 12:15 AM, "Dave Barach (dbarach)" <dbar...@cisco.com> wrote:

What are you trying to do? 

 

Your description is abstract to the point where I won’t try to answer, aside 
from writing that vlib_process_signal_event(...) is not your friend. 

 

Thanks… Dave

 

From: Ni, Hongjun [mailto:hongjun...@intel.com] 
Sent: Monday, March 6, 2017 9:05 PM
To: Dave Barach (dbarach) <dbar...@cisco.com>; 'vpp-dev@lists.fd.io' 
<vpp-dev@lists.fd.io>
Cc: pan.feng...@zte.com.cn; Zhou, Danny <danny.z...@intel.com>; Hu, Xuekun 
<xuekun...@intel.com>
Subject: Signal events between graph nodes within different threads

 

Hey all,

 

We have a question about signal events between graph nodes within different 
threads.

 

Here is the scenario of use case:

We have two threads: thread 1 and thread2, which run on different VPP programs.

Thread 1 has one graph node a, 

Thread 2 has another graph node b.

 

Now we want to signal an event from thread 1’s node a to thread 2’s node b.

Can vlib_process_signal_event achieve this? 

It appears that vlib_process_signal_event can signal an event between two graph 
nodes within the same thread.

 

If not, is there any other way to address above use case?

 

Thanks a lot,

Hongjun

 

 

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to