From: Stephen Hemminger <stephen@networkplumber.org>
To: Tianhao Zhang <zhang.tianhao2@zte.com.cn>
Cc: wang.junlong1@zte.com.cn, yang.yonggang@zte.com.cn, dev@dpdk.org
Subject: Re: [PATCH v1 0/2] fix bug
Date: Tue, 13 Jan 2026 07:32:58 -0800 [thread overview]
Message-ID: <20260113073258.2d67ed02@phoenix.local> (raw)
In-Reply-To: <20251222102535.401064-1-zhang.tianhao2@zte.com.cn>
On Mon, 22 Dec 2025 18:25:33 +0800
Tianhao Zhang <zhang.tianhao2@zte.com.cn> wrote:
> V1:
> - Add pcie bar channel check after getting dtb space left.
> - Delete np soft resource uninstallation from NP online uninit process.
>
> Tianhao Zhang (2):
> net/zxdh: add pcie bar channel check
> net/zxdh: delete np soft resource uninstallation
>
> drivers/net/zxdh/zxdh_np.c | 11 +++++++----
> drivers/net/zxdh/zxdh_np.h | 2 ++
> 2 files changed, 9 insertions(+), 4 deletions(-)
>
I started using AI to review code in next-net.
It spotted some issues in these patches, please revise and resubmit.
Now let me read the two patches:---
## DPDK Patch Review: ZXDH PMD Patches
### Patch 1: `net/zxdh: add PCIe BAR channel check`
#### Commit Message
| Check | Status | Notes |
|-------|--------|-------|
| Subject ≤60 chars | ✓ Pass | 35 characters |
| Correct prefix | ✓ Pass | `net/zxdh:` is correct |
| Lowercase after colon | ✓ Pass | |
| Imperative mood | ✓ Pass | "add" |
| No trailing period | ✓ Pass | |
| Body ≤75 chars/line | ✓ Pass | |
| Body doesn't start with "It" | ✓ Pass | |
| Signed-off-by present | ✓ Pass | Real name and valid email |
#### Code Review
**Style Issues (Warning)**:
1. **Mixed changes**: The patch combines alignment/whitespace fixes with functional changes. The parameter alignment changes in `zxdh_np_dtb_queue_unused_item_num_get()` could be a separate cleanup patch. This makes the functional change harder to review.
2. **Log message style**: The error message `"pcie bar abnormal."` has a trailing period. While not strictly forbidden, DPDK log messages typically omit trailing periods for consistency.
**Code Quality (Info)**:
```c
if ((*p_item_num & ZXDH_DTB_SPACE_LEFT_MASK) == ZXDH_DTB_SPACE_LEFT_MASK) {
```
- The comparison is explicit (good) ✓
- Uses named constant (good) ✓
- Consider: what condition does `0x3F` represent? A brief comment explaining why this specific bit pattern indicates a BAR abnormality would aid maintainability.
**Commit Message Content (Warning)**:
The body text:
> After obtaining the DTB element register;
> check if the PCIe link is abnormal.
The semicolon makes this read awkwardly as two sentence fragments. Suggested rewrite:
> Add a check after obtaining the DTB element register to detect
> abnormal PCIe link conditions.
#### Verdict: **Acceptable with minor suggestions**
---
### Patch 2: `net/zxdh: optimize the procedure for NP online uninit`
#### Commit Message
| Check | Status | Notes |
|-------|--------|-------|
| Subject ≤60 chars | ✓ Pass | 52 characters |
| Correct prefix | ✓ Pass | `net/zxdh:` |
| Lowercase after colon | ✓ Pass | |
| Imperative mood | ✓ Pass | "optimize" |
| No trailing period | ✓ Pass | |
| Body ≤75 chars/line | ✓ Pass | All lines under 75 |
| Body doesn't start with "It" | ✓ Pass | Starts with "Remove" |
| Signed-off-by present | ✓ Pass | |
#### Issues Identified
**Warning - Misleading subject line**:
The subject says "optimize" which implies performance improvement, but the body describes removing code to "avoid duplicate resource release." This is actually a **bug fix** (preventing double-free or duplicate cleanup), not an optimization.
Suggested subject alternatives:
- `net/zxdh: fix duplicate resource release in NP online uninit`
- `net/zxdh: remove redundant resource uninstall from online uninit`
**Warning - Potentially missing `Fixes:` tag**:
If this corrects a bug where resources were being released twice, a `Fixes:` tag should reference the commit that introduced the duplicate release. The AGENTS.md guidelines state:
> `Fixes:` tag present for bug fixes with 12-char SHA and exact subject
**Info - Incomplete context**:
The commit message says the uninstallation "should be called separately within NP uninit" but doesn't specify where that happens. A reference to the function or location where `zxdh_np_soft_res_uninstall()` is properly called would help reviewers verify correctness.
#### Code Review
The code change itself is clean - a straightforward removal of 4 lines. No style issues.
#### Verdict: **Needs revision**
---
## Summary
| Patch | Status | Required Actions |
|-------|--------|------------------|
| 0007 (BAR check) | **Acceptable** | Consider separating alignment fixes; improve commit message clarity |
| 0008 (uninit optimize) | **Needs revision** | Fix subject line ("fix" not "optimize"); add `Fixes:` tag if applicable; clarify where resource uninstall is now called |
prev parent reply other threads:[~2026-01-13 15:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 2:16 [PATCH v1] net/zxdh: add pcie bar channel check Tianhao Zhang
2025-12-22 10:25 ` [PATCH v1 0/2] fix bug Tianhao Zhang
2025-12-22 10:25 ` [PATCH v1 1/2] net/zxdh: add pcie bar channel check Tianhao Zhang
2025-12-22 18:37 ` Stephen Hemminger
2025-12-30 8:11 ` [PATCH v2 0/2] fix npsdk bug Tianhao Zhang
2025-12-30 8:11 ` [PATCH v2 1/2] net/zxdh: add pcie bar channel check Tianhao Zhang
2025-12-30 18:29 ` Stephen Hemminger
2026-02-03 7:17 ` [PATCH v3 0/2] net/zxdh: fix npsdk bug Tianhao Zhang
2026-02-03 7:17 ` [PATCH v3 1/2] net/zxdh: add pcie bar channel check Tianhao Zhang
2026-02-03 14:35 ` Stephen Hemminger
2026-02-03 7:17 ` [PATCH v3 2/2] net/zxdh: optimize the procedure for NP online uninit Tianhao Zhang
2026-02-03 14:35 ` Stephen Hemminger
2026-02-05 22:11 ` [PATCH v3 0/2] net/zxdh: fix npsdk bug Stephen Hemminger
2025-12-30 8:11 ` [PATCH v2 2/2] net/zxdh: optimize the procedure for NP online uninit Tianhao Zhang
2025-12-22 10:25 ` [PATCH v1 2/2] net/zxdh: delete np soft resource uninstallation Tianhao Zhang
2025-12-22 18:38 ` Stephen Hemminger
2026-01-13 15:32 ` Stephen Hemminger [this message]
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=20260113073258.2d67ed02@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=wang.junlong1@zte.com.cn \
--cc=yang.yonggang@zte.com.cn \
--cc=zhang.tianhao2@zte.com.cn \
/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.