Lines Matching refs:t

36 static void bpf_test_timer_enter(struct bpf_test_timer *t)  in bpf_test_timer_enter()  argument
40 if (t->mode == NO_PREEMPT) in bpf_test_timer_enter()
45 t->time_start = ktime_get_ns(); in bpf_test_timer_enter()
48 static void bpf_test_timer_leave(struct bpf_test_timer *t) in bpf_test_timer_leave() argument
51 t->time_start = 0; in bpf_test_timer_leave()
53 if (t->mode == NO_PREEMPT) in bpf_test_timer_leave()
60 static bool bpf_test_timer_continue(struct bpf_test_timer *t, int iterations, in bpf_test_timer_continue() argument
64 t->i += iterations; in bpf_test_timer_continue()
65 if (t->i >= repeat) { in bpf_test_timer_continue()
67 t->time_spent += ktime_get_ns() - t->time_start; in bpf_test_timer_continue()
68 do_div(t->time_spent, t->i); in bpf_test_timer_continue()
69 *duration = t->time_spent > U32_MAX ? U32_MAX : (u32)t->time_spent; in bpf_test_timer_continue()
82 t->time_spent += ktime_get_ns() - t->time_start; in bpf_test_timer_continue()
83 bpf_test_timer_leave(t); in bpf_test_timer_continue()
85 bpf_test_timer_enter(t); in bpf_test_timer_continue()
92 t->i = 0; in bpf_test_timer_continue()
370 struct bpf_test_timer t = { .mode = NO_MIGRATE }; in bpf_test_run_xdp_live() local
380 bpf_test_timer_enter(&t); in bpf_test_run_xdp_live()
383 ret = xdp_test_run_batch(&xdp, prog, repeat - t.i); in bpf_test_run_xdp_live()
386 } while (bpf_test_timer_continue(&t, xdp.frame_cnt, repeat, &ret, time)); in bpf_test_run_xdp_live()
387 bpf_test_timer_leave(&t); in bpf_test_run_xdp_live()
399 struct bpf_test_timer t = { NO_MIGRATE }; in bpf_test_run() local
416 bpf_test_timer_enter(&t); in bpf_test_run()
426 } while (bpf_test_timer_continue(&t, 1, repeat, &ret, time)); in bpf_test_run()
428 bpf_test_timer_leave(&t); in bpf_test_run()
1311 struct bpf_test_timer t = { NO_PREEMPT }; in bpf_prog_test_run_flow_dissector() local
1354 bpf_test_timer_enter(&t); in bpf_prog_test_run_flow_dissector()
1358 } while (bpf_test_timer_continue(&t, 1, repeat, &ret, &duration)); in bpf_prog_test_run_flow_dissector()
1359 bpf_test_timer_leave(&t); in bpf_prog_test_run_flow_dissector()
1379 struct bpf_test_timer t = { NO_PREEMPT }; in bpf_prog_test_run_sk_lookup() local
1446 bpf_test_timer_enter(&t); in bpf_prog_test_run_sk_lookup()
1450 } while (bpf_test_timer_continue(&t, 1, repeat, &ret, &duration)); in bpf_prog_test_run_sk_lookup()
1451 bpf_test_timer_leave(&t); in bpf_prog_test_run_sk_lookup()