Try setting the node state to VLIB_NODE_STATE_DISABLED on the main thread:

Vlib_node_state_state (vlib_mains[0] or &vlib_global_main, ...):


/** \brief Set node dispatch state.
 @param vm vlib_main_t pointer, varies by thread
 @param node_index index of the node
 @param new_state new state for node, see vlib_node_state_t
*/
void vlib_node_set_state (vlib_main_t * vm, u32 node_index, vlib_node_state_t 
new_state)

-----Original Message-----
From: Prashant Upadhyaya <praupadhy...@gmail.com> 
Sent: Thursday, November 22, 2018 8:53 AM
To: Dave Barach (dbarach) <dbar...@cisco.com>
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Difference between PRE_INPUT and INPUT nodes

Thanks Dave.
I used the VLIB_NODE_TYPE_INPUT, but I now observe that, in presence of worker 
threads, my main thread is going to 100 % cpu utilization as well.
Without my new node, the main thread does not go to 100 % cpu utilization.
I want the polling to happen only in worker threads (or the main thread if 
there are no workers) Can I do something at the runtime to achieve that ?

Regards
-Prashant

On Thu, Nov 22, 2018 at 7:02 PM Dave Barach (dbarach) <dbar...@cisco.com> wrote:
>
> Use VLIB_NODE_TYPE_INPUT. Pre-input nodes - of which there is one - exist to 
> make sure that a certain epoll(...) call happens at the top of the loop.
>
> D.
>
> -----Original Message-----
> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Prashant 
> Upadhyaya
> Sent: Thursday, November 22, 2018 7:41 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Difference between PRE_INPUT and INPUT nodes
>
> Hi,
>
> What is the difference between --
> .type = VLIB_NODE_TYPE_PRE_INPUT
> and
> .type = VLIB_NODE_TYPE_INPUT
>
> when the --
> .state = VLIB_NODE_STATE_POLLING
>
> Typically when should the PRE_INPUT be used and when the INPUT, would 
> appreciate any advice on this. My usecase needs to do a high speed polling.
>
> Regards
> -Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11368): https://lists.fd.io/g/vpp-dev/message/11368
Mute This Topic: https://lists.fd.io/mt/28286049/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to