STRUCT RIO_SWITCH(9)
π 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=1orUNINIT=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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms