|SUCCESS| ethdev: replace rte_memcpy with assignment
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Sep 29 20:55:06 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/170260
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-29
# DPDK Patch Review
## Patch Summary
This patch replaces a `rte_memcpy()` call with structure assignment in `rte_eth_dev_owner_get()` and removes the now-unused `<rte_memcpy.h>` include.
---
## Review Findings
### **Correctness: PASS**
No correctness issues identified. The change is semantically equivalent:
- `rte_memcpy(owner, ðdev->data->owner, sizeof(*owner))` becomes `*owner = ethdev->data->owner`
- Both copy the entire `struct rte_eth_dev_owner` structure
- The spinlock provides necessary synchronization for reading `ethdev->data->owner`
- Error handling remains unchanged
### **Style and Patterns: PASS**
Appropriate use of assignment over `rte_memcpy()`:
As documented in AGENTS.md, `rte_memcpy()` is intended for bulk data transfer in fast paths.
For control path structure copies, standard `memcpy()` or structure assignment is preferred.
This change correctly uses structure assignment.
Include removal is appropriate:
After removing the only use of `rte_memcpy()` in this file, removing `<rte_memcpy.h>` is correct.
Code style is correct:
- Proper indentation maintained
- No trailing whitespace introduced
- Structure assignment follows DPDK conventions
### **Documentation and Testing: INFO**
**Info**: This is a minor optimization/cleanup change that:
- Does not change behavior
- Does not affect API or ABI
- Does not require release notes (internal implementation detail)
- Does not require new tests (existing tests cover `rte_eth_dev_owner_get()`)
The patch correctly omits release notes updates, as this is an internal implementation change with no user-visible effects.
---
## Verdict
**APPROVED** - No issues found.
This is a clean refactoring that improves code clarity by using idiomatic C structure assignment instead of an explicit copy function. The change aligns with DPDK guidelines for appropriate use of `rte_memcpy()`.
More information about the test-report
mailing list