Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions nodescraper/plugins/inband/pcie/pcie_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,20 @@ def get_cap_cfg(
for cap_id, cap_addr in cap_data.items():
if cap_id == 0:
continue
if cap_addr >= 0x100:
cap_enum: Enum = ExtendedCapabilityEnum(cap_id)
else:
cap_enum = CapabilityEnum(cap_id)
cap_type = ExtendedCapabilityEnum if cap_addr >= 0x100 else CapabilityEnum
try:
cap_enum: Enum = cap_type(cap_id)
except ValueError:
# Unknown / not-yet-modeled capability id. Skip it instead of
# aborting the whole collection so one new cap id can't take
# down the entire PCIe plugin.
self.logger.warning(
"Skipping unknown %s id 0x%X at offset 0x%X",
cap_type.__name__,
cap_id,
cap_addr,
)
continue
cap_cls = self.get_cap_struct(cap_enum)
if cap_cls is None:
continue
Expand Down
1 change: 1 addition & 0 deletions nodescraper/plugins/inband/pcie/pcie_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class ExtendedCapabilityEnum(Enum):
ALT_PROTOCOL = 0x002B # Alternate Protocol Extended Capability
SFI = 0x002C # System Firmware Intermediary (SFI)Extended Capability
DOE = 0x2E # 0x2e Data Object Exchange
IDE = 0x2F # 0x2f Integrity and Data Encryption (IDE)
INT_DOE = 0x30 # 0x30 Integrity and Data Encryption


Expand Down
Loading