STRUCT RIO_SWITCH_OPS(9)
β¨ struct rio_switch_ops(9) β¨
okay so bestie, this is a page from the Linux Kernel API Manual, and honestly? it's giving "backstage pass to the RIO switch world" π lowkey iconic.
πΈ NAME πΈ
struct rio_switch_ops β the per-switch operations, fr fr. like every switch gets its own little toolbox of moves π
π¦ SYNOPSIS π¦
struct rio_switch_ops {
struct module *owner;
int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table, u16 route_destid, u8 route_port);
int (*get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table, u16 route_destid, u8 *route_port);
int (*clr_table) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table);
int (*set_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,
u8 sw_domain);
int (*get_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,
u8 *sw_domain);
int (*em_init) (struct rio_dev *dev);
int (*em_handle) (struct rio_dev *dev, u8 swport);
};
like, look at all those function pointers bestie π it's a whole vibe check for whoever's implementing a switch π
π Members π
ownerβ the module owner of this structure. literally who's holding the keys to this thing πadd_entryβ callback for the switch-specific route add function. it's the "add a route" girly β¨get_entryβ callback for the switch-specific route get function. she fetches the route for you π«Άclr_tableβ callback for the switch-specific clear route table function. wiping the slate clean, periodt πset_domainβ callback for the switch-specific domain setting function. setting that domain, no cap πget_domainβ callback for the switch-specific domain get function. reading the domain back out, slay πΈem_initβ callback for the switch-specific error management init function. error management setup time π§em_handleβ callback for the switch-specific error management handler function. she handles the errors, highkey main character energy π₯
β Description β
So basically, this struct defines all the operations you need to initialize and control a particular RIO switch device π it's the blueprint, the whole playbook, iykyk.
π SEE ALSO π
Kernel file ./include/linux/rio.h β plus all these besties:
struct rio_switch(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)
ok that's the whole page, go read the others too, they're lowkey connected π¦
and that's a wrap bestie! this page lives in ./include/linux and the version is from October 2026 β so like, future vibes fr fr. mwah ππ
π¦ 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