Skip to content

test-bbdev: add configurable duration for throughput and latency tests#1

Open
bodushka wants to merge 1 commit into
touchstone-master-25-11-2from
dpdk-25-11-2-custom-test-duration-EPOL-27
Open

test-bbdev: add configurable duration for throughput and latency tests#1
bodushka wants to merge 1 commit into
touchstone-master-25-11-2from
dpdk-25-11-2-custom-test-duration-EPOL-27

Conversation

@bodushka

Copy link
Copy Markdown
Collaborator

Add -d/--duration seconds CLI option to dpdk-test-bbdev to allow throughput and latency tests to run for a user-specified duration instead of the hardcoded TEST_REPETITIONS (100 iterations, ~108ms).

Without -d the behavior is unchanged.

Changes:

  • main.h: declare get_duration_sec() getter
  • main.c: add duration_sec field to test_params struct, implement get_duration_sec(), register --duration/-d option in getopt_long, parse and store the value
  • test_bbdev_perf.c: add g_test_tsc_end global and SHOULD_CONTINUE(n) macro; replace TEST_REPETITIONS loop conditions in all 6 interrupt and 6 PMD throughput functions; add num_reps field to struct thread_params to record actual iteration count; set g_test_tsc_end before releasing workers via SYNC_START; fix interrupt-mode averaging divisor to use RTE_MAX(1U, num_reps) instead of constant TEST_REPETITIONS; wrap validation_latency_test op dispatch in a do-while loop controlled by the same TSC deadline

Add -d/--duration SECONDS CLI option to dpdk-test-bbdev to allow
throughput and latency tests to run for a user-specified duration
instead of the hardcoded TEST_REPETITIONS (100 iterations, ~108ms).

Without -d the behavior is unchanged.

Changes:
- main.h: declare get_duration_sec() getter
- main.c: add duration_sec field to test_params struct,
  implement get_duration_sec(), register --duration/-d option
  in getopt_long, parse and store the value
- test_bbdev_perf.c: add g_test_tsc_end global and SHOULD_CONTINUE(n)
  macro; replace TEST_REPETITIONS loop conditions in all 6 interrupt
  and 6 PMD throughput functions; add num_reps field to
  struct thread_params to record actual iteration count; set
  g_test_tsc_end before releasing workers via SYNC_START; fix
  interrupt-mode averaging divisor to use RTE_MAX(1U, num_reps)
  instead of constant TEST_REPETITIONS; wrap validation_latency_test
  op dispatch in a do-while loop controlled by the same TSC deadline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant