Skip to content

Conversation

@davepacheco
Copy link
Collaborator

Depends on #8398 and takes the next step of change the SpIdentifier slot to a u16 instead of a u32. In some discussions, including with @rmustacc, we decided that it would be very surprising to ever have more than u16::MAX slots in a single rack, but conceivable that we could exceed u8::MAX in some future device. (In practice, we have ways to evolve all these APIs so this doesn't really foreclose on anything and we probably could get away with u8::MAX.

I did do this mechanically but the changes weren't all as straightforward as with #8398. For example, there's a separate SpIdentifier that used a usize, and it was previously converted from a location map that was loaded in via serde. I figured serde would barf if the u16 was out of range so we could just make the structure contain a u16 directly. I also removed two error cases in code paths that already wanted to store slots as u16s (and changed one that already assumed it was a u8!).

@davepacheco davepacheco requested a review from jgallagher July 1, 2025 04:05
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird way to describe it, but: this was a very satisfying PR to review. 👍

Base automatically changed from dap/bp-u16 to main July 1, 2025 16:38
@davepacheco davepacheco merged commit 46f8b06 into main Jul 1, 2025
17 checks passed
@davepacheco davepacheco deleted the dap/mgs-u16 branch July 1, 2025 20:26
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.

3 participants