Skip to content

Return ENA when submitting an ereport#2438

Merged
mkeeter merged 3 commits intomasterfrom
mkeeter/return-ereport-ena
Mar 18, 2026
Merged

Return ENA when submitting an ereport#2438
mkeeter merged 3 commits intomasterfrom
mkeeter/return-ereport-ena

Conversation

@mkeeter
Copy link
Collaborator

@mkeeter mkeeter commented Mar 17, 2026

This will make it easier for ereports to refer to each other!

The ereport_messages::Ena type isn't directly encodable using microcbor, but it's easy enough to extract the inner u64.

The max stack size for packrat went from 1344 to 1352, which isn't surprising (we're passing an extra u64 around), so I bumped it up to the next round number.

@mkeeter mkeeter requested a review from hawkw March 17, 2026 20:38
@mkeeter mkeeter force-pushed the mkeeter/return-ereport-ena branch 3 times, most recently from c2fef13 to c9148e1 Compare March 17, 2026 20:54
);
match eresult {
Ok(len) => ringbuf_entry!(Trace::EreportSent(len)),
Ok((len, _ena)) => ringbuf_entry!(Trace::EreportSent(len)),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@hawkw Is there a reason Sidecar's not using the helper macro?

Copy link
Member

Choose a reason for hiding this comment

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

i forgor

Copy link
Member

Choose a reason for hiding this comment

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

to be precise: i had just forgotten that the sidecar sequencer even had ereports in it now, because i didn't remember adding them. which, it turns out, did not actually mean "no one added them", it meant "cliff added them".

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

nice --- i had some smallish notes

);
match eresult {
Ok(len) => ringbuf_entry!(Trace::EreportSent(len)),
Ok((len, _ena)) => ringbuf_entry!(Trace::EreportSent(len)),
Copy link
Member

Choose a reason for hiding this comment

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

to be precise: i had just forgotten that the sidecar sequencer even had ereports in it now, because i didn't remember adding them. which, it turns out, did not actually mean "no one added them", it meant "cliff added them".

@hawkw hawkw added the fault-management Everything related to the Oxide's Fault Management architecture implementation label Mar 17, 2026
@mkeeter mkeeter force-pushed the mkeeter/return-ereport-ena branch 2 times, most recently from 73186f9 to 8b7452e Compare March 17, 2026 21:28
@mkeeter mkeeter force-pushed the mkeeter/return-ereport-ena branch from 8b7452e to 0359c6f Compare March 18, 2026 14:13
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

I like the changes you've made here, I think the new result type makes sense. I had some nitpicks about the documentation and naming and stuff, but once those are addressed I like this change a lot.

/// ereport failed). It elides the details of each failure mode, which are
/// preserved in the ringbuf and are not as relevant to the caller.
#[derive(Copy, Clone)]
pub enum EreportDeliverError {
Copy link
Member

Choose a reason for hiding this comment

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

turbo nitpick, sorry: I feel like this feels slightly more grammatically correct as

Suggested change
pub enum EreportDeliverError {
pub enum EreportDeliveryError {

};
}

/// Lightweight error returned from the generated `deliver_ereport` function
Copy link
Member

Choose a reason for hiding this comment

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

turbo nitpick, sorry: perhaps this should link to what generates the function?

Suggested change
/// Lightweight error returned from the generated `deliver_ereport` function
/// Lightweight error returned from the `deliver_ereport` method
/// generated by the [`declare_ereporter!`] macro.

@mkeeter
Copy link
Collaborator Author

mkeeter commented Mar 18, 2026

I'm done with the last round of changes and queuing up automerge!

@mkeeter mkeeter enabled auto-merge (squash) March 18, 2026 20:05
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

lovely, thanks matt!

@mkeeter mkeeter merged commit c927493 into master Mar 18, 2026
180 checks passed
@mkeeter mkeeter deleted the mkeeter/return-ereport-ena branch March 18, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fault-management Everything related to the Oxide's Fault Management architecture implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants