public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: selftests/net: ncdevmem: add -b option to set rx-buf-size on bind
Date: Fri, 05 Jun 2026 06:49:29 +1000	[thread overview]
Message-ID: <review-patch3-20260603-tcpdm-large-niovs-v1-3-f37a4ac6726c@meta.com> (raw)
In-Reply-To: <20260603-tcpdm-large-niovs-v1-3-f37a4ac6726c@meta.com>

Patch Review

The selftest C changes are clean and well-validated.

**Observations:**

1. **Good input validation** -- power-of-2, >= PAGE_SIZE, <= 2MB. The 2MB cap matches the MFD_HUGETLB + MFD_HUGE_2MB semantics and is well-documented in the commit message.

2. **Hugepage fallback message is helpful:**

```c
pr_err("[skip,no-memfd%s]",
       (memfd_flags & MFD_HUGETLB) ? " (need hugepages)" : "");
```

Good UX for CI environments without hugepages allocated.

3. **Size rounding only for hugetlb:**

```c
if (memfd_flags & MFD_HUGETLB) {
    size = roundup(size, MB(2));
    ctx->size = size;
}
```

This correctly updates `ctx->size` after rounding. The `roundup` macro comes from `<sys/param.h>` which was added. Note that `roundup` is a BSD extension -- this is fine for selftests but wouldn't be appropriate in kernel code.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-06-04 20:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  0:42 [PATCH net-next 0/4] net: devmem: allow rx-buf-size > PAGE_SIZE per binding Bobby Eshleman
2026-06-04  0:42 ` [PATCH net-next 1/4] net: devmem: allow rx-buf-size > PAGE_SIZE per dmabuf binding Bobby Eshleman
2026-06-04 20:49   ` Claude review: " Claude Code Review Bot
2026-06-04  0:42 ` [PATCH net-next 2/4] udmabuf: emit one sg entry per pinned folio Bobby Eshleman
2026-06-04 20:49   ` Claude review: " Claude Code Review Bot
2026-06-04  0:43 ` [PATCH net-next 3/4] selftests/net: ncdevmem: add -b option to set rx-buf-size on bind Bobby Eshleman
2026-06-04 20:49   ` Claude Code Review Bot [this message]
2026-06-04  0:43 ` [PATCH net-next 4/4] selftests/net: devmem.py: add check_rx_large_niov Bobby Eshleman
2026-06-04 20:49   ` Claude review: " Claude Code Review Bot
2026-06-04 20:49 ` Claude review: net: devmem: allow rx-buf-size > PAGE_SIZE per binding Claude Code Review Bot

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=review-patch3-20260603-tcpdm-large-niovs-v1-3-f37a4ac6726c@meta.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox