> On 3 Oct 2018, at 09:30, Alok Makhariya <[email protected]> wrote:
> 
> Hi
>  
> In one of our VPP plugin,  we have CLI’s which is used to display some info 
> and this is time consuming.
> Thus the main thread, which is busy doing the above, cannot interact with the 
> control plane which interacts with the main thread over the shared memory 
> interface for this duration.
> Does VPP support offloading the CLI handling to a thread other than the main 
> thread ?


Easiest way to address this is to periodically suspend your calculation by 
using vlib_process_suspend()
that will give chance to other process nodes to do some work.

Also, please note that all debug CLIs by default are considered thread unsafe, 
which means that worker
threads are stopped during their execution and that typically happens for few 
hundred microseconds.
After making your CLI handler thread safe, you can specify:

VLIB_CLI_COMMAND (foo_cli_command, static) = {
[snip]
 .is_mp_safe = 1;
};

Similar applies to API handlers...

-- 
Damjan


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

View/Reply Online (#10738): https://lists.fd.io/g/vpp-dev/message/10738
Mute This Topic: https://lists.fd.io/mt/26715943/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to