-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new Platform APIs and modified APIs for supporting reboot on a SmartSwitch #501
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,8 @@ class ModuleBase(device_base.DeviceBase): | |
MODULE_REBOOT_CPU_COMPLEX = "CPU" | ||
# Module reboot type to reboot FPGA complex | ||
MODULE_REBOOT_FPGA_COMPLEX = "FPGA" | ||
# Module reboot type to reboot DPU | ||
MODULE_REBOOT_DPU = "DPU" | ||
|
||
def __init__(self): | ||
# List of ComponentBase-derived objects representing all components | ||
|
@@ -166,7 +168,9 @@ def reboot(self, reboot_type): | |
Args: | ||
reboot_type: A string, the type of reboot requested from one of the | ||
predefined reboot types: MODULE_REBOOT_DEFAULT, MODULE_REBOOT_CPU_COMPLEX, | ||
or MODULE_REBOOT_FPGA_COMPLEX | ||
MODULE_REBOOT_FPGA_COMPLEX or MODULE_REBOOT_DPU | ||
|
||
MODULE_REBOOT_DPU is only applicable for smartswitch chassis. | ||
|
||
Returns: | ||
bool: True if the request has been issued successfully, False if not | ||
|
@@ -258,6 +262,31 @@ def get_state_info(self): | |
""" | ||
raise NotImplementedError | ||
|
||
def get_bus_info(self, module_name): | ||
""" | ||
Retrieves the bus information for the specified by "module_name" on a SmartSwitch. | ||
|
||
Returns: | ||
Returns the PCI bus information in BDF format like "[DDDD:]BB:SS:F" | ||
""" | ||
raise NotImplementedError | ||
|
||
def pci_detach(self, module_name): | ||
""" | ||
Detaches the DPU PCI device specified by "module_name" on a SmartSwitch. | ||
|
||
Returns: True once the PCI is successfully detached. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also call out the negative case? Also, mention how the platform is informed to recover form this. |
||
""" | ||
raise NotImplementedError | ||
|
||
def pci_reattach(self, module_name): | ||
""" | ||
Rescans and reconnects the DPU PCI device specified by "module_name" on a SmartSwitch. | ||
|
||
Returns: True once the PCI is successfully reconnected. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also call out the negative case? Also, mention how the platform is informed to recover form this |
||
""" | ||
raise NotImplementedError | ||
|
||
############################################## | ||
# Component methods | ||
############################################## | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you intended to say "Retrieves the bus information for the module specified"