rvt_init_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– rvt_init_port(9) β€” Kernel API Manual πŸ’–

okay so bestie, this is rvt_init_port, a function from the Kernel API Manual, and it's literally the lil' setup gremlin that gets a driver port's internal data all cute and ready. πŸŽ€


✨ NAME ✨

rvt_init_port β€” init internal data for driver port

Like, it initializes the internal data for a driver port. That's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

int rvt_init_port (struct rvt_dev_info *rdi , struct rvt_ibport *port ,
int port_index , u16 *pkey_table );

No cap, that's the exact signature, spaces and all. πŸ’…


✨ ARGUMENTS ✨

  • rdi β€” the rvt_dev_info struct, aka the main-character device info situation 🫢
  • port β€” the rvt port itself, the lil' guy being set up πŸ’–
  • port_index β€” 0 based index of ports, and heads up: this is different from the IB core port num. do not mix them up bestie, i'm begging 😭
  • pkey_table β€” the pkey_table for the port, it's a u16 * and it's giving lookup-table realness πŸ“‹

✨ DESCRIPTION ✨

So what it does is keep track of a list of ports. That's the whole job. ✨

The slay part? There's no need to have a detach port β€” like, none. They persist until the driver goes away. periodt. πŸ’€

So don't go looking for a matching detach function, because it simply does not exist. the ports just vibe there until the driver itself dips. πŸ‘‹


✨ RETURN ✨

always 0. yup, always. no drama, no surprises, highkey the most reliable function in the whole file. 🌈⭐


✨ SEE ALSO ✨

Kernel file ./drivers/infiniband/sw/rdmavt/vt.c, plus the whole friend group:

go read them, iykyk πŸ§šπŸ’œ


fr fr remember: port_index is 0 based and is not the IB core port num. that's the one thing that'll get you. πŸ™ˆ

and that's the page! sourced from ./drivers/infiniband/sw/rdmavt, dated October 2026, and yes the whole thing is still living under the name rvt_init_port(9). mwah, go init some ports bestie πŸ’…πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from