Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b990b58
net/intel: remove unused Tx struct member
bruce-richardson Sep 10, 2025
773cbaf
net/intel: avoid allocating from mempool directly
bruce-richardson Aug 22, 2025
4913131
net/intel: avoid accessing mempool directly on free
bruce-richardson Aug 22, 2025
f26580f
net/intel: add AVX512DQ flag to AVX512 checks
cloftus Sep 17, 2025
ae10df0
net/idpf: use common vector capability function
cloftus Sep 17, 2025
12b1c29
net/idpf: use common Rx path selection infrastructure
cloftus Sep 17, 2025
94cfe51
net/cpfl: use common vector capability function
cloftus Sep 17, 2025
a8225f2
net/cpfl: use common Rx path selection infrastructure
cloftus Sep 17, 2025
62b6b61
doc: fix feature list of ice driver
cloftus Sep 16, 2025
f3878b6
doc: fix feature list of iavf driver
cloftus Sep 16, 2025
9dce205
uapi: fix include guards in VDUSE imported header
david-marchand Sep 19, 2025
afc2c84
drivers: remove unneeded VFIO header inclusion
david-marchand Sep 3, 2025
df77d01
vfio: remove confusing check on VFIO presence
david-marchand Oct 29, 2024
f02cf5f
vfio: assume VFIO is always and only present on Linux
david-marchand Sep 2, 2025
27b39a0
vfio: remove public wrappers
david-marchand Oct 29, 2024
48c503f
eal/linux: remove more internal VFIO macros
david-marchand Oct 28, 2024
b38d3df
eal/linux: remove internal VFIO wrappers for old Linux
david-marchand Sep 2, 2025
f86af39
vfio: stop including Linux header in public and driver API
david-marchand Oct 28, 2024
6201cbc
uapi: import VFIO header
david-marchand Oct 29, 2024
2ffda8c
vfio: use imported uAPI header
david-marchand Oct 28, 2024
0681e15
build: validate libraries returned from meson find function
bruce-richardson Sep 24, 2025
611d08f
baseband/acc: fix exported header
david-marchand Nov 20, 2024
f8e03a6
drivers: drop export of driver headers
david-marchand Jul 8, 2022
faa398f
eventdev: do not include driver header in DMA adapter
david-marchand Nov 19, 2024
bda83ec
gpudev: fix driver header for Windows
david-marchand Sep 24, 2025
cae7430
drivers: fix some exported headers
david-marchand Nov 20, 2024
9b7a162
eal/arm: fix C++ build for 32-bit memcpy
david-marchand Sep 26, 2025
3fabb9c
build: factorize headers installation
david-marchand Sep 26, 2025
9f4fd81
buildtools/chkincs: use a staging directory for headers
david-marchand Sep 23, 2025
76393b9
power: separate public and driver headers
david-marchand Sep 24, 2025
16ebacc
compressdev: support for dictionaries and PDCP checksum
Oct 3, 2025
ee5ada8
compress/zlib: support for dictionaries and PDCP checksum
Oct 3, 2025
9c8bd84
app/compress-perf: support for dictionaries and PDCP checksum
Oct 3, 2025
51270ba
doc: add doc for dictionary option
Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/test-compress-perf/comp_perf_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enum cleanup_st {
ST_TEST_DATA,
ST_COMPDEV,
ST_INPUT_DATA,
ST_DICTIONARY_DATA,
ST_MEMORY_ALLOC,
ST_DURING_TEST
};
Expand Down Expand Up @@ -48,10 +49,13 @@ struct range_list {
struct comp_test_data {
char driver_name[RTE_DEV_NAME_MAX_LEN];
char input_file[PATH_MAX];
char dictionary_file[PATH_MAX];
enum cperf_test_type test;

uint8_t *input_data;
size_t input_data_sz;
uint8_t *dictionary_data;
size_t dictionary_data_sz;
uint16_t nb_qps;
uint16_t seg_sz;
uint16_t out_seg_sz;
Expand Down
15 changes: 15 additions & 0 deletions app/test-compress-perf/comp_perf_options_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define CPERF_LEVEL ("compress-level")
#define CPERF_WINDOW_SIZE ("window-sz")
#define CPERF_EXTERNAL_MBUFS ("external-mbufs")
#define CPERF_DICTIONARY ("dictionary")

/* cyclecount-specific options */
#define CPERF_CYCLECOUNT_DELAY_US ("cc-delay-us")
Expand Down Expand Up @@ -71,6 +72,7 @@ usage(char *progname)
" keeping the data directly in mbuf area\n"
" --cc-delay-us N: delay between enqueue and dequeue operations in microseconds\n"
" valid only for cyclecount perf test (default: 500 us)\n"
" --dictionary NAME: file with dictionary\n"
" -h: prints this help\n",
progname);
}
Expand Down Expand Up @@ -609,6 +611,17 @@ parse_external_mbufs(struct comp_test_data *test_data,
return 0;
}

static int
parse_dictionary_file(struct comp_test_data *test_data, const char *arg)
{
if (strlen(arg) > (sizeof(test_data->dictionary_file) - 1))
return -1;

strlcpy(test_data->dictionary_file, arg, sizeof(test_data->dictionary_file));

return 0;
}

static int
parse_cyclecount_delay_us(struct comp_test_data *test_data,
const char *arg)
Expand Down Expand Up @@ -647,6 +660,7 @@ static struct option lgopts[] = {
{ CPERF_LEVEL, required_argument, 0, 0 },
{ CPERF_WINDOW_SIZE, required_argument, 0, 0 },
{ CPERF_EXTERNAL_MBUFS, 0, 0, 0 },
{ CPERF_DICTIONARY, required_argument, 0, 0 },
{ CPERF_CYCLECOUNT_DELAY_US, required_argument, 0, 0 },
{ NULL, 0, 0, 0 }
};
Expand All @@ -671,6 +685,7 @@ comp_perf_opts_parse_long(int opt_idx, struct comp_test_data *test_data)
{ CPERF_LEVEL, parse_level },
{ CPERF_WINDOW_SIZE, parse_window_sz },
{ CPERF_EXTERNAL_MBUFS, parse_external_mbufs },
{ CPERF_DICTIONARY, parse_dictionary_file },
{ CPERF_CYCLECOUNT_DELAY_US, parse_cyclecount_delay_us },
};
unsigned int i;
Expand Down
41 changes: 36 additions & 5 deletions app/test-compress-perf/comp_perf_test_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,29 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
int res = 0;
int allocated = 0;
uint32_t out_seg_sz;
uint8_t dict[DEFLATE_MAX_WINDOW_SIZE] = {0};
uint16_t window_size = (1ULL << test_data->window_sz);

if (test_data == NULL || !test_data->burst_sz) {
RTE_LOG(ERR, USER1,
"Unknown burst size\n");
return -1;
}

if (test_data->dictionary_data) {
if (test_data->dictionary_data_sz >= window_size) {
memcpy(dict,
test_data->dictionary_data
+ (test_data->dictionary_data_sz - window_size),
window_size);
} else if (test_data->dictionary_data_sz < window_size) {
memcpy(dict + (window_size - test_data->dictionary_data_sz),
test_data->dictionary_data,
test_data->dictionary_data_sz);
}
}


ops = rte_zmalloc_socket(NULL,
2 * mem->total_bufs * sizeof(struct rte_comp_op *),
0, rte_socket_id());
Expand All @@ -91,12 +107,14 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
.level = test_data->level,
.window_size = test_data->window_sz,
.chksum = RTE_COMP_CHECKSUM_NONE,
.hash_algo = RTE_COMP_HASH_ALGO_NONE
.hash_algo = RTE_COMP_HASH_ALGO_NONE,
}
};
if (test_data->test_algo == RTE_COMP_ALGO_DEFLATE)
if (test_data->test_algo == RTE_COMP_ALGO_DEFLATE) {
xform.compress.deflate.huffman = test_data->huffman_enc;
else if (test_data->test_algo == RTE_COMP_ALGO_LZ4)
xform.compress.deflate.dictionary = dict;
xform.compress.deflate.dictionary_len = window_size;
} else if (test_data->test_algo == RTE_COMP_ALGO_LZ4)
xform.compress.lz4.flags = test_data->lz4_flags;
output_data_ptr = ctx->mem.compressed_data;
output_data_sz = &ctx->comp_data_sz;
Expand All @@ -113,7 +131,10 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
.hash_algo = RTE_COMP_HASH_ALGO_NONE
}
};
if (test_data->test_algo == RTE_COMP_ALGO_LZ4)
if (test_data->test_algo == RTE_COMP_ALGO_DEFLATE) {
xform.decompress.inflate.dictionary = dict;
xform.decompress.inflate.dictionary_len = window_size;
} else if (test_data->test_algo == RTE_COMP_ALGO_LZ4)
xform.decompress.lz4.flags = test_data->lz4_flags;
output_data_ptr = ctx->mem.decompressed_data;
output_data_sz = &ctx->decomp_data_sz;
Expand Down Expand Up @@ -194,7 +215,17 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
rte_pktmbuf_pkt_len(input_bufs[buf_id]);
ops[op_id]->dst.offset = 0;
ops[op_id]->flush_flag = RTE_COMP_FLUSH_FINAL;
ops[op_id]->input_chksum = buf_id;
if ((xform.type == RTE_COMP_DECOMPRESS) &&
(xform.decompress.chksum
== RTE_COMP_CHECKSUM_3GPP_PDCP_UDC)) {
uint8_t *udc_header
= rte_pktmbuf_mtod(ops[op_id]->m_src, uint8_t *);
ops[op_id]->input_chksum = *udc_header & 0xf;
ops[op_id]->src.offset = 1;
} else {
ops[op_id]->input_chksum = buf_id;
ops[op_id]->src.offset = 0;
}
ops[op_id]->private_xform = priv_xform;
}

Expand Down
93 changes: 93 additions & 0 deletions app/test-compress-perf/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,89 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
return ret;
}

static int
comp_perf_dump_dictionary_data(struct comp_test_data *test_data)
{
FILE *f = fopen(test_data->dictionary_file, "r");
int ret = -1;

if (f == NULL) {
RTE_LOG(ERR, USER1, "Dictionary file not specified\n");
test_data->dictionary_data_sz = 0;
test_data->dictionary_data = NULL;
ret = 0;
goto end;
}

if (fseek(f, 0, SEEK_END) != 0) {
RTE_LOG(ERR, USER1, "Size of input could not be calculated\n");
goto end;
}
size_t actual_file_sz = ftell(f);
/* If extended input data size has not been set,
* input data size = file size
*/

if (test_data->dictionary_data_sz == 0)
test_data->dictionary_data_sz = actual_file_sz;

if (test_data->dictionary_data_sz <= 0 || actual_file_sz <= 0 ||
fseek(f, 0, SEEK_SET) != 0) {
RTE_LOG(ERR, USER1, "Size of input could not be calculated\n");
goto end;
}

test_data->dictionary_data = rte_zmalloc_socket(NULL,
test_data->dictionary_data_sz, 0, rte_socket_id());

if (test_data->dictionary_data == NULL) {
RTE_LOG(ERR, USER1, "Memory to hold the data from the dictionary "
"file could not be allocated\n");
goto end;
}

size_t remaining_data = test_data->dictionary_data_sz;
uint8_t *data = test_data->dictionary_data;

while (remaining_data > 0) {
size_t data_to_read = RTE_MIN(remaining_data, actual_file_sz);

if (fread(data, data_to_read, 1, f) != 1) {
RTE_LOG(ERR, USER1, "Input file could not be read\n");
goto end;
}
if (fseek(f, 0, SEEK_SET) != 0) {
RTE_LOG(ERR, USER1,
"Size of input could not be calculated\n");
goto end;
}
remaining_data -= data_to_read;
data += data_to_read;
}

printf("\n");
if (test_data->dictionary_data_sz > actual_file_sz)
RTE_LOG(INFO, USER1,
"%zu bytes read from file %s, extending the file %.2f times\n",
test_data->dictionary_data_sz, test_data->dictionary_file,
(double)test_data->dictionary_data_sz/actual_file_sz);
else
RTE_LOG(INFO, USER1,
"%zu bytes read from file %s\n",
test_data->dictionary_data_sz, test_data->dictionary_file);

ret = 0;

end:
if (f)
fclose(f);

if (test_data->dictionary_data)
rte_free(test_data->dictionary_data);

Comment on lines +415 to +417
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Prevent double-free of dictionary buffer

Line 415 frees dictionary_data even on the success path, so the pointer is deallocated before being consumed and then freed again during cleanup (case ST_DICTIONARY_DATA), triggering a double free. Please free this buffer only on the error path and clear the fields when doing so.

-	if (test_data->dictionary_data)
-		rte_free(test_data->dictionary_data);
+	if (ret != 0) {
+		rte_free(test_data->dictionary_data);
+		test_data->dictionary_data = NULL;
+		test_data->dictionary_data_sz = 0;
+	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (test_data->dictionary_data)
rte_free(test_data->dictionary_data);
if (ret != 0) {
rte_free(test_data->dictionary_data);
test_data->dictionary_data = NULL;
test_data->dictionary_data_sz = 0;
}
🤖 Prompt for AI Agents
In app/test-compress-perf/main.c around lines 415 to 417, the code frees
test_data->dictionary_data unconditionally which causes a double-free when the
success path later hands that buffer to the ST_DICTIONARY_DATA case; change the
logic so the dictionary buffer is freed only on error paths (not on the
success/consume path), and when you free it set test_data->dictionary_data to
NULL and clear any related length/flags fields to avoid later cleanup attempting
to free it again; remove the unconditional free on the success path and add the
guarded free+clear only where error handling occurs.

return ret;
}

static void
comp_perf_cleanup_on_signal(int signalNumber __rte_unused)
{
Expand Down Expand Up @@ -407,6 +490,13 @@ main(int argc, char **argv)
}

test_data->cleanup = ST_INPUT_DATA;
if (comp_perf_dump_dictionary_data(test_data) < 0) {
ret = EXIT_FAILURE;
goto end;
}

test_data->cleanup = ST_DICTIONARY_DATA;


if (test_data->level_lst.inc != 0)
test_data->level = test_data->level_lst.min;
Expand Down Expand Up @@ -496,6 +586,9 @@ main(int argc, char **argv)
i++;
}
/* fallthrough */
case ST_DICTIONARY_DATA:
rte_free(test_data->dictionary_data);
/* fallthrough */
case ST_INPUT_DATA:
rte_free(test_data->input_data);
/* fallthrough */
Expand Down
68 changes: 55 additions & 13 deletions buildtools/chkincs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ if not get_option('check_includes')
subdir_done()
endif

includes = [config_inc]
deps = []
includes_drivers = []
deps_drivers = []

subdir('staging')

gen_c_file_for_header = find_program('gen_c_file_for_header.py')
gen_c_files = generator(gen_c_file_for_header,
output: '@BASENAME@.c',
arguments: ['@INPUT@', '@OUTPUT@'])

cflags = machine_args
if cc.has_argument('-Wno-missing-field-initializers')
cflags += '-Wno-missing-field-initializers'
endif
cflags += no_wvla_cflag

sources = files('main.c')
sources += gen_c_files.process(dpdk_chkinc_headers)

# some driver SDK headers depend on these two buses, which are mandatory in build
# so we always include them in deps list
deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
if dpdk_conf.has('RTE_BUS_VMBUS')
deps += get_variable('shared_rte_bus_vmbus')
endif
# add the rest of the libs to the dependencies
foreach l:dpdk_libs_enabled
deps += get_variable('shared_rte_' + l)
endforeach
sources += gen_c_files.process(dpdk_arch_headers + dpdk_headers)

executable('chkincs', sources,
c_args: cflags,
Expand All @@ -46,6 +45,27 @@ executable('chkincs-all', sources,
dependencies: deps,
install: false)

sources_drivers = files('main.c')
sources_drivers += gen_c_files.process(dpdk_drivers_headers)

executable('chkincs-drv', sources_drivers,
c_args: cflags,
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)

executable('chkincs-drv-exp', sources_drivers,
c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)

executable('chkincs-drv-all', sources_drivers,
c_args: [cflags, '-DALLOW_EXPERIMENTAL_API', '-DALLOW_INTERNAL_API'],
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)

# run tests for c++ builds also
if not add_languages('cpp', required: false)
subdir_done()
Expand All @@ -56,7 +76,7 @@ gen_cpp_files = generator(gen_c_file_for_header,
arguments: ['@INPUT@', '@OUTPUT@'])

cpp_sources = files('main.cpp')
cpp_sources += gen_cpp_files.process(dpdk_chkinc_headers)
cpp_sources += gen_cpp_files.process(dpdk_arch_headers + dpdk_headers)

executable('chkincs-cpp', cpp_sources,
cpp_args: ['-include', 'rte_config.h', cflags],
Expand All @@ -76,3 +96,25 @@ executable('chkincs-cpp-all', cpp_sources,
include_directories: includes,
dependencies: deps,
install: false)

cpp_sources_drivers = files('main.cpp')
cpp_sources_drivers += gen_cpp_files.process(dpdk_drivers_headers)

executable('chkincs-drv-cpp', cpp_sources_drivers,
cpp_args: ['-include', 'rte_config.h', cflags],
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)

executable('chkincs-drv-cpp-exp', cpp_sources_drivers,
cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API'],
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)

executable('chkincs-drv-cpp-all', cpp_sources_drivers,
cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API',
'-DALLOW_INTERNAL_API'],
include_directories: includes + includes_drivers,
dependencies: deps + deps_drivers,
install: false)
13 changes: 13 additions & 0 deletions buildtools/chkincs/staging/drivers/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2025 Red Hat, Inc.

includes_drivers += include_directories('.')
deps_drivers += declare_dependency(sources:
custom_target('drivers_headers_staging',
output: 'drivers_headers_staging.stamp',
depends: cleanup_target,
command: [stage_headers_cmd, meson.current_build_dir(), '@OUTPUT@',
dpdk_drivers_headers],
install: false,
Comment on lines +5 to +11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix the staged headers command invocation

stage_headers_cmd is already a list; wrapping it in another list hands Meson a nested array and the target fails to configure (“Invalid type list for argument command”). Flatten the command by concatenating the arguments instead.

-    custom_target('drivers_headers_staging',
-            output: 'drivers_headers_staging.stamp',
-            depends: cleanup_target,
-            command: [stage_headers_cmd, meson.current_build_dir(), '@OUTPUT@',
-                dpdk_drivers_headers],
+    custom_target('drivers_headers_staging',
+            output: 'drivers_headers_staging.stamp',
+            depends: cleanup_target,
+            command: stage_headers_cmd + [meson.current_build_dir(), '@OUTPUT@',
+                dpdk_drivers_headers],
             install: false,
     )
🤖 Prompt for AI Agents
In buildtools/chkincs/staging/drivers/meson.build around lines 5 to 11, the
custom_target command uses stage_headers_cmd wrapped as an element inside the
command list which creates a nested list and causes Meson to error; replace that
nested-list invocation by flattening/concatenating stage_headers_cmd with the
rest of the command arguments (meson.current_build_dir(), '@OUTPUT@',
dpdk_drivers_headers, etc.) so command is a single flat list of strings rather
than a list containing a list.

)
)
Loading