value = bpf_map_lookup_elem(&map, (void *)&key); if (!value) return0;
bpf_timer_init(&value->timer, &map, CLOCK_MONOTONIC);
bpf_timer_set_callback(&value->timer, timer_cb); /* Hope 100us will be enough to wake-up and run the overwrite thread */
bpf_timer_start(&value->timer, 100000, BPF_F_TIMER_CPU_PIN);
return0;
}
staticint overwrite_cb(int key)
{ struct map_value zero = {};
/* Free the timer which may run on other CPU */
bpf_map_update_elem(&map, (void *)&key, &zero, BPF_ANY);
return0;
}
SEC("syscall") int BPF_PROG(start_timer)
{
bpf_loop(MAX_ENTRIES, start_cb, NULL, 0); return0;
}
SEC("syscall") int BPF_PROG(overwrite_timer)
{
bpf_loop(MAX_ENTRIES, overwrite_cb, NULL, 0); return0;
}
char _license[] SEC("license") = "GPL";
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.