|WARNING| net/axgbe: retry transient SFP I2C read failures

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Nov 19 12:35:46 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 cost bound in the comment is not enforced by the code**

The new comment says the extra retry 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". The code does not implement that limit. The retry test is applied unconditionally on every call to `axgbe_phy_i2c_read()`, in both phases:

```
+		if (axgbe_i2c_retryable(ret) && retry--) {
+			rte_delay_ms(AXGBE_I2C_RETRY_DELAY_MS);
...
+	if (axgbe_i2c_retryable(ret) && retry--) {
+		rte_delay_ms(AXGBE_I2C_RETRY_DELAY_MS);
```

Nothing tracks whether this is the port's first access after `axgbe_phy_init()`. On a persistent fault, every later read retries -ENOTCONN and -ETIMEDOUT. On the -ETIMEDOUT path, each retry adds another full 1-second `axgbe_i2c_xfer()` timeout plus the 2 ms delay, per phase.

Per the comment, that time is spent holding `axgbe_i2c_mdio_bus_mutex`. So a sustained fault now stalls link polling and other ports' bus access on every poll, not just once at bring-up.

Suggested fix, either of:
- Gate the extended retry set on a per-port flag that is set in `axgbe_phy_init()` and cleared after the first successful transaction. Keep the original `-EAGAIN`-only retry for later calls.
- Or drop the "one-time" claim from the comment and commit message, and justify the recurring cost instead.

**Info: the code comment carries changelog and validation text**

The 30-line block above `axgbe_i2c_retryable()` repeats the commit message. That includes test-hardware names ("AMD CRB V3C48 and Advantech FWA-1081"), iteration counts, and references to another patch's fix. This history belongs in the commit log, not in source, where it will go stale.

Reduce the comment to a short statement of why -ENOTCONN and -ETIMEDOUT are retried with a settle delay.

Review-Result: WARNING


More information about the test-report mailing list