hi all:
Incidentally, we have also another question.
Is there a common and high-performance way to deliver some control-plane
packets from worker thread to the main thread?
We found vl_api_rpc_call_main_thread can handle it, and it is already used in
BFD bfd_rpc_update_session.
But there is a Mutex lock and one copy in vl_api_rpc_call_main_thread with API
, maybe it won't work efficiently.
Any suggestions ? Thanks.
王辉 wanghui
IT开发工程师 IT Development
Engineer
虚拟化南京四部/无线研究院/无线产品经营部 NIV Nanjing Dept. IV/Wireless Product R&D
Institute/Wireless Product Operation Division
原始邮件
发件人: <[email protected]>
收件人: <[email protected]>
抄送人:潘凤艳00024606 <[email protected]>
日 期 :2017年03月08日 07:00
主 题 :Re: [vpp-dev] Signal events between graph nodes within different threads
Hi Keith and Dave,
Thank you for your detailed advice. We will take your suggestions into
consideration carefully.
By the way, It is not used for NSH_SFC. It is VPP specifics.
Thanks a lot,
Hongjun
At 2017-03-08 06:21:20, "Keith Burns" <[email protected]> wrote:
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)" <[email protected]> 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:[email protected]]
Sent: Monday, March 6, 2017 9:05 PM
To: Dave Barach (dbarach) <[email protected]> '[email protected]'
<[email protected]>
Cc: [email protected] Zhou, Danny <[email protected]> Hu, Xuekun
<[email protected]>
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
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev