MCPcopy Create free account
hub / github.com/F-Stack/f-stack / init_clock

Function init_clock

lib/ff_dpdk_if.c:871–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869}
870
871static int
872init_clock(void)
873{
874 rte_timer_subsystem_init();
875 uint64_t hz = rte_get_timer_hz();
876 uint64_t intrs = US_PER_S / ff_global_cfg.freebsd.hz;
877 uint64_t tsc = (hz + US_PER_S - 1) / US_PER_S * intrs;
878
879 rte_timer_init(&freebsd_clock);
880 rte_timer_reset(&freebsd_clock, tsc, PERIODICAL,
881 rte_lcore_id(), &ff_hardclock_job, NULL);
882
883 ff_update_current_ts();
884
885 return 0;
886}
887
888#if defined(FF_FLOW_ISOLATE) || defined(FF_FDIR)
889/** Print a message out of a flow error. */

Callers 1

ff_dpdk_initFunction · 0.85

Calls 5

rte_timer_subsystem_initFunction · 0.85
rte_timer_initFunction · 0.85
rte_timer_resetFunction · 0.85
rte_lcore_idFunction · 0.85
ff_update_current_tsFunction · 0.85

Tested by

no test coverage detected