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

Function nfp_net_beat_timer

dpdk/drivers/net/nfp/nfp_ethdev.c:253–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253static void
254nfp_net_beat_timer(void *arg)
255{
256 uint64_t cur_sec;
257 struct nfp_multi_pf *multi_pf = arg;
258
259 cur_sec = rte_rdtsc();
260 nn_writeq(cur_sec, multi_pf->beat_addr + NFP_BEAT_OFFSET(multi_pf->function_id));
261
262 /* Beat once per second. */
263 if (rte_eal_alarm_set(1000 * 1000, nfp_net_beat_timer,
264 (void *)multi_pf) < 0) {
265 PMD_DRV_LOG(ERR, "Error setting alarm");
266 }
267}
268
269static int
270nfp_net_keepalive_init(struct nfp_cpp *cpp,

Callers

nothing calls this directly

Calls 3

nn_writeqFunction · 0.85
rte_rdtscFunction · 0.50
rte_eal_alarm_setFunction · 0.50

Tested by

no test coverage detected