|WARNING| net/axgbe: retry transient SFP I2C read failures
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 19 12:19:02 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173047
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-19
**Warning: the retry is not limited to first access as the comment and commit log claim**
```
+ if (axgbe_i2c_retryable(ret) && retry--) {
+ rte_delay_ms(AXGBE_I2C_RETRY_DELAY_MS);
goto again1;
```
The comment says the extra cost is "bounded to each port's first post-init access -- a one-time bring-up cost, not a recurring one paid on every subsequent link_update() poll". Nothing in the patch enforces that. `axgbe_i2c_retryable()` is applied to every call of `axgbe_phy_i2c_read()`, and there is no "first access since phy_init" state.
So any later read that hits a persistent `-ENOTCONN` or `-ETIMEDOUT` pays the retry cost every time:
- the 2 ms delays, and
- on the `-ETIMEDOUT` path, an additional full 1-second internal timeout per phase.
All of this runs while the shared bus mutex is held, as the comment itself notes, so other ports wait too.
Fix one of two ways:
- Gate the extended retry set on a per-port "first access after phy_init" flag, keeping only `-EAGAIN` retryable afterwards.
- Or correct the comment and commit log to say the extra latency applies to every failing read.
**Info: the code comment carries commit-log material**
The block comment above `axgbe_i2c_retryable()` repeats most of the commit message. That includes test-hardware names, iteration counts, and the reference to another patch. Validation history belongs in the commit log, not the source.
Reduce the comment to the rationale only:
- which error codes are retried, and
- why a settle delay is used.
Review-Result: WARNING
More information about the test-report
mailing list