Hi Hui,

I think the SNAT example maybe meet what you want:

snat_in2out_node_fn_inline: (in worker thread)
     slow_path
        snat_ipfix_logging_nat44_ses_create
            vl_api_rpc_call_main_thread

Regards,
Hongjun

From: wang.hu...@zte.com.cn [mailto:wang.hu...@zte.com.cn]
Sent: Wednesday, March 8, 2017 2:58 PM
To: alaga...@gmail.com
Cc: dbar...@cisco.com; Ni, Hongjun <hongjun...@intel.com>; 
zhao.zhig...@zte.com.cn; gu.ji...@zte.com.cn; pan.feng...@zte.com.cn; 
vpp-dev@lists.fd.io
Subject: 答复: Re: [vpp-dev] 答复: Re: Signal events between graph nodes within 
different threads


Maybe if you could expand on what it is you are trying to achieve?

//when starting worker thread ,  the main thread can't receive packet from IO, 
so we want to transfer some packet to main thread to continue processing.



Is it specifically to do with DHCP (and proxy) or is that just the code you 
found that looks like the kind of functionality you believe you need for your 
use-case?

// that just looks like our use-case. vlib_process_signal_event called in 
worker thread, and signal an event to the dhcp proccess node in main thread.

can  vlib_process_signal_event  do this?









王辉 wanghui



IT开发工程师 IT Development Engineer
虚拟化南京四部/无线研究院/无线产品经营部 NIV Nanjing Dept. IV/Wireless Product R&D 
Institute/Wireless Product Operation Division
原始邮件
发件人: <alaga...@gmail.com>;
收件人:王辉10067165; <dbar...@cisco.com>; <hongjun...@intel.com>;
抄送人:赵志刚10017628;顾剑10036178;潘凤艳00024606; <vpp-dev@lists.fd.io>;
日 期 :2017年03月08日 13:04
主 题 :Re: [vpp-dev] 答复: Re: Signal events between graph nodes within different 
threads



On Wed, Mar 8, 2017 at 2:29 PM 
<wang.hu...@zte.com.cn<mailto:wang.hu...@zte.com.cn>> wrote:

hi Dave and hongjun:



We also got  confused with below code. Dos it works correctly?

Maybe the dhcp_proxy_to_client_input  fuction runs in the worker thread,  and 
it will call vlib_process_signal_event function to trigger dhcp-proccess node 
in the main thread.

If it works, maybe the question of mail title could be solved. But We can't 
find any other use like this until now.


Maybe if you could expand on what it is you are trying to achieve?

Is it specifically to do with DHCP (and proxy) or is that just the code you 
found that looks like the kind of functionality you believe you need for your 
use-case?





dhcp_proxy_to_client_input

    dhcp_client_for_us

        vlib_process_signal_event (vm, dhcp_client_process_node.index,

                                 EVENT_DHCP_CLIENT_WAKEUP, c - dcm->clients);











王辉 wanghui



IT开发工程师 IT Development Engineer
虚拟化南京四部/无线研究院/无线产品经营部 NIV Nanjing Dept. IV/Wireless Product R&D 
Institute/Wireless Product Operation Division
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to