STRUCT RIO_SWITCH_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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