Folks,
We've accumulated quite a number of periodic processes which start whether or
not the related feature will [ever] be used. See below. It's quite easy to
switch to on-demand process creation. See https://gerrit.fd.io/r/#/c/19878 for
a complete example.
Here's a sketch of how to start a plugin periodic process on demand:
* Add one or more process node indices to the plugin main_t in
<plugin-name>.h
* Add a function prototype for <plugin-name>_start_periodic
(<plugin-name>_main_t *mp) to <plugin-name>.h
* In binary API / debug CLI enable/disable paths, call
<plugin-name>_start_periodic
* Remove instances of VLIB_REGISTER_NODE (<plugin>_xxx_process_node)
* Replace with <plugin-name>_start_periodic (...), shown below
void
<plugin-name>_start_periodic (<plugin-name>_main_t * mmp)
{
/* Already created the process node? */
if (mp->cdp_process_node_index > 0)
return;
/* No, create it now and make a note of the node index */
mp->xxx_process_node_index = vlib_process_create
(mp->vlib_main, "<name-of-process>",
<xxx>_process_fn, 16 /* log2_n_stack_bytes */ );
}
Several processes are almost always used, so let's leave them alone. Others,
such as bfd-process, dns-resolver-process, etc. are almost never used and
should be cleaned up when convenient.
Thanks.... Dave
vpp# sh ru
Time 6.3, average vectors/node 0.00, last 128 main loops 0.00 per node 0.00
vector rates in 0.0000e0, out 0.0000e0, drop 0.0000e0, punt 0.0000e0
Name State Calls Vectors
Suspends Clocks Vectors/Call
acl-plugin-fa-cleaner-process event wait 0 0
1 2.33e4 0.00
api-rx-from-ring any wait 0 0
1 2.05e6 0.00
avf-process event wait 0 0
1 6.12e3 0.00
bfd-process event wait 0 0
1 6.21e3 0.00
bond-process event wait 0 0
1 1.34e3 0.00
dhcp-client-process any wait 0 0
1 9.00e2 0.00
dhcp6-client-cp-process any wait 0 0
1 8.44e2 0.00
dhcp6-pd-client-cp-process any wait 0 0
1 9.10e2 0.00
dhcp6-pd-reply-publisher-proce event wait 0 0
1 9.04e2 0.00
dhcp6-reply-publisher-process event wait 0 0
1 1.05e3 0.00
dns-resolver-process any wait 0 0
1 1.42e3 0.00
fib-walk any wait 0 0
4 2.31e4 0.00
flow-report-process any wait 0 0
1 1.30e3 0.00
flowprobe-timer-process any wait 0 0
1 4.44e3 0.00
gbp-scanner event wait 0 0
1 5.28e3 0.00
igmp-timer-process event wait 0 0
1 4.99e3 0.00
ikev2-manager-process any wait 0 0
7 1.85e4 0.00
ioam-export-process any wait 0 0
1 1.65e3 0.00
ip-neighbor-scan-process any wait 0 0
1 1.14e3 0.00
ip-route-resolver-process any wait 0 0
1 1.19e3 0.00
ip4-reassembly-expire-walk any wait 0 0
1 1.48e3 0.00
ip6-icmp-neighbor-discovery-ev any wait 0 0
7 1.14e4 0.00
ip6-reassembly-expire-walk any wait 0 0
1 1.62e3 0.00
l2fib-mac-age-scanner-process event wait 0 0
1 2.36e3 0.00
lacp-process event wait 0 0
1 1.08e5 0.00
lisp-retry-service any wait 0 0
4 2.16e4 0.00
lldp-process event wait 0 0
1 6.29e4 0.00
memif-process event wait 0 0
1 8.52e3 0.00
nat-det-expire-walk done 1 0
0 1.52e3 0.00
nat-ha-process event wait 0 0
1 7.04e3 0.00
nat64-expire-walk event wait 0 0
1 3.07e3 0.00
nsh-md2-ioam-export-process any wait 0 0
1 1.13e4 0.00
perfmon-periodic-process event wait 0 0
1 1.15e8 0.00
rd-cp-process any wait 0 0
1 9.40e2 0.00
send-dhcp6-client-message-proc any wait 0 0
1 8.82e2 0.00
send-dhcp6-pd-client-message-p any wait 0 0
1 8.14e2 0.00
send-rs-process any wait 0 0
1 1.06e3 0.00
startup-config-process done 1 0
1 9.15e3 0.00
statseg-collector-process time wait 0 0
1 7.29e3 0.00
udp-ping-process any wait 0 0
1 5.42e3 0.00
unix-cli-stdin active 0 0
2 2.08e9 0.00
unix-epoll-input polling 985 0
0 2.32e7 0.00
vhost-user-process any wait 0 0
1 2.90e3 0.00
vhost-user-send-interrupt-proc any wait 0 0
1 1.16e3 0.00
vpe-link-state-process event wait 0 0
1 8.44e2 0.00
vxlan-gpe-ioam-export-process any wait 0 0
1 1.78e3 0.00
wildcard-ip4-arp-publisher-pro event wait 0 0
1 2.23e3 0.00
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13176): https://lists.fd.io/g/vpp-dev/message/13176
Mute This Topic: https://lists.fd.io/mt/31834455/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-