All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>
Subject: FW: |SUCCESS| [v4] eal/x86: fix memcpy alignment mask definition
Date: Fri, 4 Sep 2026 17:02:24 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65A33@smartserver.smartshare.dk> (raw)

The simple AI in our CI managed - for the first time ever - to not emit any garbage at all, when reviewing one of my patches!

Maybe I should stick to simple patches that don't really change anything; then it doesn't get confused. ;-)


Venlig hilsen / Kind regards,
-Morten Brørup


-----Original Message-----
From: dpdklab@iol.unh.edu [mailto:dpdklab@iol.unh.edu] 
Sent: Friday, 4 September 2026 16.23
To: test-report@dpdk.org
Cc: Morten Brørup
Subject: |SUCCESS| [v4] eal/x86: fix memcpy alignment mask definition

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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-04

# DPDK Patch Review

## Patch Summary
The patch addresses a potential symbol name collision by prefixing `ALIGNMENT_MASK` with `RTE_MEMCPY_`, moves function documentation, and fixes a coding style issue with implicit comparison.

---

## Errors

None.

---

## Warnings

None.

---

## Info

### 1. Documentation placement improvement

The patch moves the Doxygen comment from the forward declaration (removed at line 32) to the actual function definition (line 661). This improves source code browser results and follows good practice of documenting at the definition rather than the declaration when a function is static inline in a header.

**Observation:** This is a positive change. The forward declaration was unnecessary for a static inline function in a header file.

### 2. Symbol naming fix

The patch renames `ALIGNMENT_MASK` to `RTE_MEMCPY_ALIGNMENT_MASK` at lines 175, 321, 432, 709, and 715. This prevents potential name collisions since the macro is defined in an installed header file.

**Observation:** This correctly follows the guideline that all external symbols must have `RTE_` or `rte_` prefix. While `ALIGNMENT_MASK` is `#undef`'d at the end of the file, it is still exposed during inclusion and could collide with user code that defines the same name before including this header.

### 3. Coding style fix

The patch changes line 709 from:
```c
if (!(((uintptr_t)dst | (uintptr_t)src) & ALIGNMENT_MASK))
```
to:
```c
if ((((uintptr_t)dst | (uintptr_t)src) & RTE_MEMCPY_ALIGNMENT_MASK) == 0)
```

**Observation:** This correctly changes an implicit truthiness test to an explicit comparison against 0, following DPDK coding style which requires explicit comparisons for integer values.

---

## Summary

The patch is correct and improves code quality in three ways:
1. Prevents potential symbol name collisions by adding proper `RTE_` prefix
2. Improves documentation discoverability by placing Doxygen comments at the definition
3. Conforms to DPDK coding style for explicit comparisons

No issues found. The patch follows DPDK guidelines and makes beneficial improvements to the codebase.

             reply	other threads:[~2026-09-04 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 15:02 Morten Brørup [this message]
2026-09-04 16:25 ` |SUCCESS| [v4] eal/x86: fix memcpy alignment mask definition Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35F65A33@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.