|SUCCESS| [v2] net/bnxt/tf_core: fix SRAM block allocation failure handling
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 20 11:14:09 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/171726
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-20
# DPDK Patch Review
## Errors
None.
## Warnings
None.
## Info
### 1. Hardcoded `unlikely()` usage pattern
**Line 713:**
```c
if (unlikely(!block)) {
```
While `unlikely()` is appropriate for error paths, the pattern here follows the existing codebase style shown at line 705-708 where a similar allocation failure (the non-sequential case) does not use `unlikely()`. For consistency within the function, consider matching the existing style, or add `unlikely()` to both branches. This is a minor style observation and not incorrect.
### 2. Error path structure follows existing pattern
The error cleanup correctly mirrors the existing pattern at lines 705-708 where both RM indices are released when the blocks are not sequential. The new code properly initializes `fparms` for both `tf_rm_free()` calls and returns `-ENOMEM`, which is consistent with the function's error handling convention.
### 3. Good adherence to correctness requirements
The patch correctly addresses:
- The resource leak (RM indices left allocated)
- The NULL pointer dereference (`block->block_id` access would have crashed)
- Proper error propagation (returns `-ENOMEM`)
- Both resources are cleaned up on the error path
---
Review-Result: CLEAN
More information about the test-report
mailing list