|WARNING| hash: fix GFNI helpers for building with -O0

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Sep 30 11:09:39 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/170359

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-30

# DPDK Patch Review

## Summary

This patch removes `__rte_internal` annotations from static inline helper functions in `rte_thash_x86_gfni.h` to fix build failures at -O0 optimization level. The functions are internal implementation details of public inline helpers and should not have been marked with `__rte_internal`.

## Review Findings

### **Errors: None**

### **Warnings: None**

### **Info**

**1. Removal of `#include <rte_compat.h>` may be unnecessary (Info)**

The patch removes:
```c
#include <rte_compat.h>
```

This include was presumably only needed for the `__rte_internal` macro definition. However, verify that no other code in this header depends on symbols from `rte_compat.h`. If the header still compiles without it (which appears likely given the build context), this removal is fine. If build issues arise, the include may need to be retained.

**Context:** This is a minor point - the removal is likely correct since `__rte_internal` was the only user, but worth verifying during testing.

---

**2. Pattern consistency with prior fix (Info)**

The patch description references commit da31ef54c865 which fixed a similar issue with "GFNI stubs export." This suggests the project has encountered this pattern before - static inline helpers in installed headers being incorrectly marked `__rte_internal`.

**Observation:** The fix is consistent with established practice. Consider whether other headers might have similar issues (though this is outside the scope of reviewing this specific patch).

---

## Conclusion

The patch is **correct**. The `__rte_internal` tag is only valid for symbols with external linkage in `.c` files. These are `static inline` functions in a header - they have no external symbol and the tag is both incorrect and breaks -O0 builds where the compiler cannot inline them.

The fix properly addresses the issue by removing the incorrect annotations, allowing the functions to be used by the public inline API they support.


More information about the test-report mailing list