Skip to content

Conversation

@zeeshanlakhani
Copy link
Contributor

This PR adds lotnum (4-character lot number) to SwitchIdentifiers and exposes ASIC details via swadm (and the dpd-client API). The full lot identifier combines fab, lot, and lotnum (e.g., FTCAK7 instead of just T).

We do keep the current fields separated however, but update the view for the combination.

Adds v1::SwitchIdentifiers for API versions 1-4 (without lotnum), with the latest version (v5+) including the new field.

Fixes #200: Want swadm command to print Tofino ASIC details
Fixes #202: Not reporting full lot numbers in oximeter statistics

@zeeshanlakhani zeeshanlakhani force-pushed the zl/asic-details branch 2 times, most recently from 052eccd to af321a1 Compare January 28, 2026 23:28
This PR adds lotnum (4-character lot number) to SwitchIdentifiers and exposes
ASIC details via swadm (and the dpd-client API). The full lot identifier combines
fab, lot, and lotnum (e.g., FTCAK7 instead of just T).

We do keep the current fields separated however, but update the view
for the combination.

Adds v1::SwitchIdentifiers for API versions 1-4 (without lotnum), with the
latest version (v5+) including the new field.

Fixes #200: Want swadm command to print Tofino ASIC details
Fixes #202: Not reporting full lot numbers in oximeter statistics
@zeeshanlakhani
Copy link
Contributor Author

@bnaecker Took on this from the issues.

@rcgoodfellow
Copy link
Contributor

Can we also include

Or maybe just all the fuse data?

The two above are combined to determine the chip rev, e.g.

 fn identifiers() -> anyhow::Result<()> {
     let pci =
         tofino::pci::Pci::new("/dev/tofino/1", tofino::REGISTER_SIZE).unwrap();
     let fuse = tofino::fuse::Fuse::read(&pci).unwrap();
     let chip_id: tofino::fuse::ChipId = fuse.chip_id.into();
     println!(
         "device id: {}",
         match fuse.device_id {
             0x0100 => "A0".to_owned(),
             0x0110 => match fuse.rev_num {
                 0 => "B0".to_owned(),
                 2 => "B1".to_owned(),
                 _ => format!("{:016x}", fuse.device_id),
             },
             _ => format!("{:016x}", fuse.device_id),
         }
     );
     println!("device rev: {}", fuse.rev_num);
     println!("chip id: {:016x}", fuse.chip_id);
     println!("{}", chip_id);
     Ok(())
 }

@zeeshanlakhani
Copy link
Contributor Author

@rcgoodfellow I added the fuse info. I'll work on getting that piped through to oximeter when I update the schema in omicron next.

@bnaecker
Copy link
Contributor

bnaecker commented Feb 1, 2026

I don't think we'll realistically be able to update the schema for switch stats right now. The update mechanism we built predates the online update system we have now. That means there's never a period when at least one switch isn't producing data, and so no window in which the old data and schema can be updated reliably to make way for the new.

What I would do here is put this more complete value into the existing lot field, for the time being. When we can get back to solving actual schema update here in the context of reconfigurator, then we can migrate the schema and data as needed.

@zeeshanlakhani
Copy link
Contributor Author

@bnaecker done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not reporting full lot numbers in oximeter statistics Want swadm command to print Tofino ASIC details

5 participants