Skip to content

Commit

Permalink
doe: Print version information from discovery request header
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Francis <[email protected]>
  • Loading branch information
alistair23 committed Dec 17, 2024
1 parent f2a206c commit 8da3a7c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/doe_pci_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ const DOE_REQUEST_PROTOCOL_MASK: u32 = 0x00FF_0000;
const DOE_REQUEST_LEN_MASK: u32 = 0x0001_FFFF;

const DOE_VERSION: u8 = 2;
const DOE_REQUEST_VERSION_MASK: u32 = 0x0000_FF00;
const DOE_REQUEST_VERSION_SHIFT: u32 = 8;

// Shifts for Discovery Request
Expand Down Expand Up @@ -545,8 +546,9 @@ impl fmt::Display for DoeDiscoveryPacket {
)?;
writeln!(
f,
"\tDISC_REQ: [RSVD, INDEX:{}]",
self.dw0 & DOE_REQUEST_INDEX
"\tDISC_REQ: [RSVD, VERSION: {}, INDEX:{}]",
(self.dw0 & DOE_REQUEST_VERSION_MASK) >> DOE_REQUEST_VERSION_SHIFT,
self.dw0 & DOE_REQUEST_INDEX,
)?;
writeln!(f, "}}")
}
Expand Down

0 comments on commit 8da3a7c

Please sign in to comment.