STRUCT RIO_SWITCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct rio_switch(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so picture this: it's a kernel API manual page, it's called struct rio_switch(9), and it's literally the whole personality of a RapidIO switch, packed into one struct. come learn her with me, she's iconic and honestly not that complicated once you meet the members πŸ¦‹


✨ NAME ✨

struct rio_switch β€” RIO switch info. that's it. that's the vibe. she holds the info. πŸ’–


🌸 SYNOPSIS 🌸

struct rio_switch {
    struct list_head node;
    u8 *route_table;
    u32 port_ok;
    struct rio_switch_ops *ops;
    spinlock_t lock;
    struct rio_dev *nextdev[];
};

look at her. six fields. no cap, that's the whole struct. let's go member by member, main character energy only πŸ‘‘


🫢 Members 🫢

  • node β€” her little spot in the global list of switches πŸŽ€ like she's on the group chat roster, always present, always accounted for.
  • route_table β€” a copy of the switch routing table ✨ not a pointer to the original, bestie, a copy. she keeps her own receipts.
  • port_ok β€” the status of each port, one bit per port πŸ”₯ literally, one bit each: OK=1 or UNINIT=0. so if you're counting bits to find your port, yes, that's the whole system, that's how she rolls.
  • ops β€” pointer to the switch-specific operations πŸ’… every switch has her own little bag of tricks and this is where she keeps it.
  • lock β€” the lock that serializes operations updates πŸ”’ nobody touches the operations at the same time, that's the rule, periodt.
  • nextdev β€” an array of per-port pointers to the next attached device πŸ‘‘ one entry per port, each one pointing onward to whatever device is chained next. it's giving linked list but make it hardware. iykyk.

🌈 SEE ALSO 🌈

kernel file ./include/linux/rio.h β€” go read it, bestie, fr fr β€” plus these absolute icons:

  • struct rio_switch_ops(9)
  • struct rio_dev(9)
  • struct rio_msg(9)
  • struct rio_dbell(9)
  • struct rio_mport(9)
  • struct rio_net(9)
  • struct rio_mport_attr(9)
  • struct rio_ops(9)
  • struct rio_driver(9)
  • struct rio_scan(9)
  • struct rio_scan_node(9)

not me ending the page already 😭 but like, that's genuinely all of her. every member, every bit, every pointer. no gatekeeping here πŸ’œ

okay bye ily β€” this page lives in ./include/linux and it's dated October 2026, and the footer still reps struct rio_switch(9) because she's that girl πŸŒŸπŸ’–βœ¨

πŸ“¦ where this page comes from