fix(System Devices) only show igpu SRIOV if plugin installed.#2643
fix(System Devices) only show igpu SRIOV if plugin installed.#2643SimonFair wants to merge 2 commits into
Conversation
WalkthroughThe PR refactors SR-IOV sysfs file handling in the helper module and adjusts device UI logic to gate SR-IOV VF options for Intel i915 GPUs using a cached plugin-detection check. Two files are updated with focused, low-impact changes. ChangesSR-IOV Functionality Refinement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@emhttp/plugins/dynamix/include/SysDevs.php`:
- Around line 390-400: The current if uses $showI915SriovOptions to gate all
SR-IOV controls, which hides VF controls for non-i915 devices; update the
condition in the block containing $showI915SriovOptions/$isI915SriovPci to allow
SR-IOV UI when the device is in $sriov and its class_id is allowed even if
$showI915SriovOptions is false — e.g. change the if to check
($showI915SriovOptions || (array_key_exists($pciaddress,$sriov) &&
in_array(substr($sriov[$pciaddress]['class_id'],0,4),$allowedPCIClass))) so
i915-specific plugin gating only affects i915 paths while regular NIC SR-IOV
devices still show VF controls.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 911ea63b-a0c9-41fb-98df-d97982b6a9e7
📒 Files selected for processing (2)
emhttp/plugins/dynamix/include/SriovHelpers.phpemhttp/plugins/dynamix/include/SysDevs.php
Only show available SR-IOV VFs for the igpu at 00:02.0 if the SR-IOV plugin is installed.
The VFs show currently but the VFs are not selectable without the plugin. This change hides the SR-IOV options if not installed.
Summary by CodeRabbit
OS-195