| 869 | } |
| 870 | |
| 871 | static int |
| 872 | init_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. */ |
no test coverage detected