[pcied] Honour PCIE_DETACH_INFO on platforms that are not smartswitches - #899
Open
gordon-nexthop wants to merge 1 commit into
Open
gordon-nexthop wants to merge 1 commit into
gordon-nexthop wants to merge 1 commit into
Conversation
Signed-off-by: gordon-nexthop <gordon@nexthop.ai>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
gordon-nexthop
marked this pull request as ready for review
September 21, 2026 23:16
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #900
Drop the
is_smartswitch()gate onPCIE_DETACH_INFOhandling, read a genericdevice_statefield (falling back todpu_state) to allow nonsmartswitchplatformsto report when a pcie device has been intentionally brought down.
Motivation and Context
A PCIe device can be powered off/cycled, not just a smartswitch, so its endpoints
stop answering and pcied reports them missing for the duration of a the power off it
was asked to perform.
The support for this already exists in the case of DPUs on smartswitches #546
The table is already device-shaped rather than DPU-shaped — it is keyed by BDF,
ModuleBase.handle_pci_removal()already fans one module out to a list ofbuses, and the value
detachingsays nothing about DPUs. Only thedpu_statefield name carried the DPU assumption, and writing that field on a pizzabox
would describe nothing. Reading
device_statefirst keepsModuleBase.pci_entry_state_db()working unchanged.How Has This Been Tested?
Extended
test_is_device_in_detaching_modeto cover both field names, and addedtest_detaching_is_honoured_on_a_non_smartswitch— a claimed BDF is no longerwarned about on a non-smartswitch platform (the behaviour this PR adds).
Additional Information (Optional)