rio_route_add_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 exactly 1=lock and 0=no_lock. so like, 1 means lock it down πŸ”’, 0 means no_lock, live your truth πŸ’…
ngl bestie, lock is 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 🫢


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