From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: rust: pci: add {enable,disable}_sriov(), to control SR-IOV capability
Date: Wed, 04 Mar 2026 08:40:15 +1000 [thread overview]
Message-ID: <review-patch3-20260303-rust-pci-sriov-v3-3-4443c35f0c88@redhat.com> (raw)
In-Reply-To: <20260303-rust-pci-sriov-v3-3-4443c35f0c88@redhat.com>
Patch Review
Setting `managed_sriov = true` unconditionally for all Rust PCI drivers is the right call. For non-SR-IOV devices, `pci_iov_disable()` returns immediately on `!dev->is_physfn`, so there's no overhead.
The methods are correctly placed on `Device<device::Core>` and gated with `#[cfg(CONFIG_PCI_IOV)]`.
```rust
+ pub fn enable_sriov(&self, nr_virtfn: i32) -> Result {
```
**Minor**: `nr_virtfn` as `i32` matches the C API, but semantically VF counts are non-negative. A `u16` would be more idiomatic since SR-IOV is limited to 16 bits in the PCIe spec. However, matching the C signature avoids conversion overhead and is consistent with the rest of the Rust PCI bindings.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-03 22:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 21:15 [PATCH v3 00/10] rust: pci: add abstractions for SR-IOV capability Peter Colberg
2026-03-03 21:15 ` [PATCH v3 01/10] PCI: add driver flag to opt into disabling SR-IOV on remove() Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 02/10] fpga: dfl-pci: set driver flag to disable " Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 03/10] rust: pci: add {enable,disable}_sriov(), to control SR-IOV capability Peter Colberg
2026-03-03 22:40 ` Claude Code Review Bot [this message]
2026-03-03 21:15 ` [PATCH v3 04/10] rust: pci: add vtable attribute to pci::Driver trait Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 05/10] rust: pci: add bus callback sriov_configure(), to control SR-IOV from sysfs Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 06/10] rust: pci: add is_virtfn(), to check for VFs Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 07/10] rust: pci: add is_physfn(), to check for PFs Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 08/10] rust: pci: add num_vf(), to return number of VFs Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 09/10] rust: pci: add physfn(), to return PF device for VF device Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 21:15 ` [PATCH v3 10/10] samples: rust: add SR-IOV driver sample Peter Colberg
2026-03-03 22:40 ` Claude review: " Claude Code Review Bot
2026-03-03 22:40 ` Claude review: rust: pci: add abstractions for SR-IOV capability 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-20260303-rust-pci-sriov-v3-3-4443c35f0c88@redhat.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