Debian Codegraph @

tests/workloads/README.md

raw symbols SCIP
1 # RTC-Testbench Workload Integration Guide
2
3 This document describes the requirements for implementing a workload that can be dynamically loaded into the RTC-Testbench framework.
4
5 ## Requirements
6
7 To be compatible with RTC-Testbench, a workload must:
8
9 1. Be compiled as a shared object with position independent code (using the `-fPIC` GCC compiler flag).
10 2. Implement a runtime function to be called each cycle after completion of the network RX routine.
11 3. (Optional) Implement a setup function to perform initialization tasks, such as memory allocation, to avoid doing them
12 in the time critical path.
13
14 ## Specifying a workload
15
16 The following options are used to configure a TsnHigh RX workload:
17
18 | Configuration Option | Description | Type |
19 | --------------------------------- | ------------------------------------------------------------------------------------------ | ------- |
20 | `TsnHighRxWorkloadEnabled` | Enable/disable workload execution for TSN High traffic class | Boolean |
21 | `TsnHighRxWorkloadFile` | Path to the shared library containing the workload | String |
22 | `TsnHighRxWorkloadSetupFunction` | Name of the setup function to call during initialization | String |
23 | `TsnHighRxWorkloadSetupArguments` | Arguments passed to the setup function (space-separated string) | String |
24 | `TsnHighRxWorkloadFunction` | Name of the runtime function called each cycle | String |
25 | `TsnHighRxWorkloadArguments` | Arguments passed to the runtime function | String |
26 | `TsnHighRxWorkloadPrewarm` | Execute workload immediately when threads spawn (true) or wait for network traffic (false) | Boolean |
27 | `TsnHighRxWorkloadSkipCount` | Skip min/max statistics updates for the first N workload iterations | Integer |
28 | `TsnHighRxWorkloadThreadCpu` | CPU core number to pin the workload thread to | Integer |
29 | `TsnHighRxWorkloadThreadPriority` | Real-time thread priority (1-99, higher values = higher priority) | Integer |
30
31 ## Examples
32
33 The `pointer_chasing` example workload has been provided and can be found in `tests/workloads/pointer_chasing`. A test that uses
34 the pointer_chasing workload can be found in `tests/busypolling_1ms_rtworkload`.
35
36 ## Copyright
37
38 Copyright (C) 2025 Intel Corporation
39
40 ## License
41
42 BSD-2 Clause and Dual BSD/GPL for all eBPF programs