rio_route_add_entry(9)
π rio_route_add_entry β the kernel API manual, bestie edition π
okay so real talk, this is a page from the Kernel API Manual and it's about rio_route_add_entry β like, one (1) function, and it's lowkey the plug that gets a route entry into a switch routing table. sit down, hydrate, let's go β¨
π NAME π
rio_route_add_entry β add a route entry to a switch routing table. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
int rio_route_add_entry (struct rio_dev *rdev , u16 table , u16
route_destid , u8 route_port , int lock );
yeah she's a five-argument girlie, copy it exactly, no cap π«Ά
π¦ ARGUMENTS π¦
rdevβ the RIO device. your main character struct, literally.tableβ the routing table ID. which table we're messing with πroute_destidβ the destination ID to be routed. the where-to of it all.route_portβ the port number to be routed. the which-door of it all.lockβ apply a hardware lock on switch device flag, and the values are exactly1=lockand0=no_lock. so like,1means lock it down π,0means no_lock, live your truth π
ngl bestie,lockis just that β<italic>1</italic>for lock,<italic>0</italic>for no_lock. don't overthink her, she's iconic as she is.
πΈ DESCRIPTION πΈ
so here's the tea π β if it's available, this calls the switch specific add_entry method to add a route entry into a switch routing table. that's the first choice, the preferred path, the moment.
otherwise? it uses the standard RT update method as defined by the RapidIO specification. so either way you're getting a route entry, it's giving "we have options" energy β¨
and the way that table works β a specific routing table can be selected using the table argument if a switch has per port routing tables, or the standard (or global) table may be used by passing RIO_GLOBAL_TABLE in table. so RIO_GLOBAL_TABLE is the "global girlie" option, iykyk π
returns 0 on success or -EINVAL on failure. that's the whole report card π 0 = slay, -EINVAL = not slay.
π₯ SEE ALSO π₯
kernel file ./drivers/rapidio/rio.c β and honestly the whole friend group is here, like a rapidio group chat π«Ά
rio_local_get_device_id(9)rio_query_mport(9)rio_alloc_net(9)rio_local_set_device_id(9)rio_add_device(9)rio_request_inb_mbox(9)rio_release_inb_mbox(9)rio_request_outb_mbox(9)rio_release_outb_mbox(9)rio_setup_inb_dbell(9)rio_request_inb_dbell(9)rio_release_inb_dbell(9)rio_request_outb_dbell(9)rio_release_outb_dbell(9)rio_add_mport_pw_handler(9)rio_del_mport_pw_handler(9)rio_request_inb_pwrite(9)rio_release_inb_pwrite(9)rio_pw_enable(9)rio_map_inb_region(9)rio_unmap_inb_region(9)rio_map_outb_region(9)rio_unmap_outb_region(9)rio_mport_get_physefb(9)rio_get_comptag(9)rio_set_port_lockout(9)rio_enable_rx_tx_port(9)rio_chk_dev_route(9)rio_mport_chk_dev_access(9)rio_chk_dev_access(9)rio_get_input_status(9)rio_clr_err_stopped(9)rio_inb_pwrite_handler(9)rio_mport_get_efb(9)rio_mport_get_feature(9)rio_std_route_add_entry(9)rio_std_route_get_entry(9)rio_std_route_clr_table(9)rio_lock_device(9)rio_unlock_device(9)rio_route_get_entry(9)rio_route_clr_table(9)rio_request_mport_dma(9)rio_release_dma(9)rio_dma_prep_xfer(9)rio_register_scan(9)rio_mport_scan(9)
so yeah, that's the page π and for the cute sign-off: this lil beauty lives in ./drivers/rapidio and it's dated October 2026 β so like, future-dated queen fr fr π§ββοΈβ¨ go route something iconic bestie, 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