hi Damjan,vppsb router plugin used routing table manipulation APIs. is it 
needed to do lock in this operations?this functions called when netlink message 
arrived.
used APIs:        fib_table_entry_delete        fib_table_entry_path_remove2    
     fib_table_entry_update        fib_table_entry_path_add2

is there any documents for safe manipulation of fib tables from plugins?
thanks.

    On Wednesday, October 3, 2018, 12:04:31 PM GMT+3:30, Damjan Marion via 
Lists.Fd.Io <[email protected]> wrote:  
 
 

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 workerthreads 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/1239119
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-  
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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