STRUCT MHI_EVENT_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mhi_event_config β€” the event ring config glow-up πŸ’–

okay so this is from the Kernel API Manual (section 9, bestie, the kernel section), and it's literally the blueprint for a controller's event ring. it's giving "settings page for one very specific ring" and honestly? iconic. let's get into it πŸŽ€


✨ NAME ✨

struct mhi_event_config β€” the event ring configuration structure for controller πŸ¦‹

like, this whole struct is the vibe check for how an event ring behaves. num_elements, irqs, priorities, the works. no cap, every field matters.


🌸 SYNOPSIS 🌸

struct mhi_event_config {
    u32 num_elements;
    u32 irq_moderation_ms;
    u32 irq;
    u32 channel;
    u32 priority;
    enum mhi_db_brst_mode mode;
    enum mhi_er_data_type data_type;
    bool hardware_event;
    bool client_managed;
    bool offload_channel;
 };

look at her. ten fields. every single one of them copy-pasted exactly, because we do not mess with kernel structs πŸ’…


🫢 Members 🫢

the big four (numbers & irqs)

  • num_elements β€” literally how many elements can be queued to this ring. that's the capacity, bestie. that's how much room she has to hold stuff πŸ“¦
  • irq_moderation_ms β€” delays the irq so extra events can get aggregated together. yes, it's a delay, it's on purpose, it's batching 🧚 this is a "wait a sec, let more of them pile up" situation.
  • irq β€” the IRQ that's associated with this ring. the actual interrupt line, fr fr ⚑
  • channel β€” the dedicated channel number. and here's the fun part: U32_MAX means it's a non-dedicated ring. so if you see U32_MAX chilling there, she's not tied to any one channel πŸ’€
  • priority β€” priority of this ring. and the manpage literally says "Use 1 for now" 😭 so yeah, just put 1. it's giving placeholder-that-became-canon.

the enum girlies

  • mode β€” the doorbell mode. that's enum mhi_db_brst_mode territory, iykyk πŸ””
  • data_type β€” the type of data this ring will process. that's enum mhi_er_data_type. she's picky about what she handles 🌈

the three bool besties (all bool, all lowercase, all important)

  • hardware_event β€” this ring is associated with hardware channels. so: yes she is a hardware event ring, or no she isn't πŸ–₯️
  • client_managed β€” this ring is client managed. the client's got the aux, she's running her own show πŸ‘‘
  • offload_channel β€” this ring is associated with an offloaded channel. omg offload, we love a delegating queen πŸ“
lowkey the whole point: you fill out this struct so the controller knows exactly what kind of event ring it's dealing with. flags on, flags off, numbers in the right slots. that's the gig 🫑

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, no one left out 🫢 the source of truth here is Kernel file ./include/linux/mhi.h, and here's literally all of it:


k that's the page!! πŸ’… this came out of ./include/linux, dated October 2026 β€” so yes, future-dated manpage energy, we stan a timeless icon ⭐ go configure your event rings responsibly bestie, and remember: priority stays at 1 for now. periodt. πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from