|SUCCESS| [v1] net/ice: fix read clock to use PHC hardware time

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Oct 30 16:15:11 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172289

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

None identified.

## WARNINGS

None identified.

## INFO

### Explicit Cast Unnecessary

**File:** drivers/net/intel/ice/ice_ethdev.c  
**Line:** `*clock = (uint64_t)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;`

The explicit `(uint64_t)` cast before `ts.tv_sec` is unnecessary.
`ts.tv_sec` is `time_t` which is a signed integer type (typically `long` or `int64_t`),
and the multiplication with `NSEC_PER_SEC` (a macro typically defined as `1000000000UL` or `1000000000ULL`)
already promotes the result to `uint64_t` through implicit conversion.

The cast does no harm and may improve clarity, but is not required by the C standard
or DPDK coding conventions. This is purely a style observation.

**Suggested simplification (optional):**
```c
*clock = ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
```

This matches the original pattern in the replaced code (line removed by the patch).

---

## Summary

The patch correctly addresses the functional bug described in the commit message:
replacing the system clock read (`clock_gettime()`) with the PHC hardware time read
(`ice_timesync_read_time()`). This ensures `ice_read_clock()` returns the actual
hardware PHC value rather than system time, fixing txtime scheduling.

The implementation is straightforward:
- Removes the `__rte_unused` attribute from `dev` parameter (now used)
- Calls `ice_timesync_read_time(dev, &ts)` and propagates errors
- Converts the returned `struct timespec` to nanoseconds

No resource leaks, use-after-free, or other correctness issues identified.
The error path is correct (early return on failure).
No new API, no ABI changes, no documentation updates required for this fix.

Review-Result: CLEAN


More information about the test-report mailing list