From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260603-tcpdm-large-niovs-v1-3-f37a4ac6726c@meta.com> References: <20260603-tcpdm-large-niovs-v1-0-f37a4ac6726c@meta.com> <20260603-tcpdm-large-niovs-v1-3-f37a4ac6726c@meta.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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 `` 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