|SUCCESS| [v2, 5/5] test/fib6: reproduce table overwrite on address wraparound
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 27 16:35:04 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172180
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-27
# DPDK Patch Review
## Patch 1/5: rib: fix undefined behavior in bit test
### Errors
None.
### Warnings
None.
### Info
None.
---
## Patch 2/5: fib: fix full table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## Patch 3/5: fib6: fix full table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## Patch 4/5: test/fib: reproduce table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## Patch 5/5: test/fib6: reproduce table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## Summary
This patch series addresses three correctness bugs in the RIB and FIB libraries:
**Patch 1** fixes undefined behavior where `1 << 31` on a signed `int` is undefined when testing bit 31 in IPv4 routing table operations. The fix changes all four bit tests to use `1U` (unsigned constant).
**Patches 2 and 3** fix a silent table corruption bug where operations on prefixes ending at the top of the address space (255.255.255.255 for IPv4, ffff:...:ffff for IPv6) can cause integer wraparound in the loop counter, leading to the entire FIB being overwritten. Both patches add wraparound checks to the equal-edges branch, matching the protection already present in the other branch.
**Patches 4 and 5** add comprehensive test cases that reproduce the wraparound corruption before the fixes, covering both the deletion and addition scenarios in IPv4 and IPv6.
All fixes:
- Target actual correctness bugs (UB in patch 1, silent data corruption in patches 2-3)
- Include appropriate `Fixes:` tags and `Cc: stable at dpdk.org`
- Add test coverage (patches 4-5) that would have caught these issues
- Use TEST_ASSERT macros correctly in the new tests
- Apply the same fix pattern consistently (patch 2 references the earlier partial fix in commit ab1b927cd73e, patches 2 and 3 both add the same wraparound check)
The code changes are minimal, targeted, and follow existing patterns. The test additions properly use the functional test infrastructure with TEST_CASE registration and unit_test_suite_runner.
Review-Result: CLEAN
More information about the test-report
mailing list