|SUCCESS| eal: silence unreachable code warning

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Nov 17 19:10:18 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172995

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-17

Info

1. Pre-existing, not introduced by this patch: `rte_version()` lazily fills a function-static buffer with no synchronization.

   ```c
   static char version[32];
   if (version[0] != 0)
   	return version;
   ```

   Two threads calling `rte_version()` for the first time at the same moment can both run `snprintf()` into `version` while the other is reading it. This is a data race, even though both write the same content.

   Since every input is a compile-time constant, a follow-up patch could remove the runtime formatting entirely. For example, build the string with preprocessor stringification, or use a `static const char[]` initializer. That would also remove the `strlen()` branch, so the parenthesis workaround would no longer be needed.

Review-Result: CLEAN


More information about the test-report mailing list