c0749f7096
Currently, the timer library uses a per-process table of structures to manage skiplists of timers presumably because timers contain arbitrary function pointers whose value may not resolve properly in other processes. However, if the same callback is used handle all timers, and that callback is only invoked in one process, then it woud be safe to allow the data structures to be allocated in shared memory, and to allow secondary processes to modify the timer lists. This would let timers be used in more multi-process scenarios. The library's global variables are wrapped with a struct, and an array of these structures is created in shared memory. The original APIs are updated to reference the zeroth entry in the array. This maintains the original behavior for both primary and secondary processes since the set intersection of their coremasks should be empty [1]. New APIs are introduced to enable the allocation/deallocation of other entries in the array. New variants of the APIs used to start and stop timers are introduced; they allow a caller to specify which array entry should be used to locate the timer list to insert into or delete from. Finally, a new variant of rte_timer_manage() is introduced, which allows a caller to specify which array entry should be used to locate the timer lists to process; it can also process multiple timer lists per invocation. [1] https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html#multi-process-limitations Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> |
||
---|---|---|
.. | ||
librte_acl | ||
librte_bbdev | ||
librte_bitratestats | ||
librte_bpf | ||
librte_cfgfile | ||
librte_cmdline | ||
librte_compressdev | ||
librte_cryptodev | ||
librte_distributor | ||
librte_eal | ||
librte_efd | ||
librte_ethdev | ||
librte_eventdev | ||
librte_flow_classify | ||
librte_gro | ||
librte_gso | ||
librte_hash | ||
librte_ip_frag | ||
librte_ipsec | ||
librte_jobstats | ||
librte_kni | ||
librte_kvargs | ||
librte_latencystats | ||
librte_lpm | ||
librte_mbuf | ||
librte_member | ||
librte_mempool | ||
librte_meter | ||
librte_metrics | ||
librte_net | ||
librte_pci | ||
librte_pdump | ||
librte_pipeline | ||
librte_port | ||
librte_power | ||
librte_rawdev | ||
librte_reorder | ||
librte_ring | ||
librte_sched | ||
librte_security | ||
librte_stack | ||
librte_table | ||
librte_telemetry | ||
librte_timer | ||
librte_vhost | ||
Makefile | ||
meson.build |