srpt_lookup_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… srpt_lookup_port β€” the kernel API manual, but make it cute

okay so bestie, welcome to srpt_lookup_port(9) from the Kernel API Manual ✨ this one's a tiny little function and honestly it's giving "small but mighty" β€” so let's get into it πŸŽ€


🌸 NAME 🌸

srpt_lookup_port β€” literally just look up an RDMA port by its name πŸ”βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct port_and_port_id srpt_lookup_port (const char *name );

that's it. that's the whole signature. she's compact πŸ’… note that the name parameter is a const char *, and the whole thing hands you back a struct port_and_port_id β€” no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” the ASCII port name, aka the little string you're using to find your port 🌈 keep it ASCII, bestie, that's the vibe πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the thing you actually need to remember, and this is the important part so pay attention πŸ™ˆ

if an RDMA port pointer comes back to you, this function increments the RDMA port reference count πŸ”₯ which means you're now holding a reference, which means you are responsible for it. the caller (that's you, bestie πŸ’…) must drop that reference count by calling srpt_port_put_ref.

⚠️ hello?? do not forget the srpt_port_put_ref!! you got a ref, you gotta put the ref back. that's the whole deal. leaking refs is not the main character energy we're going for 😭

πŸ’œ SEE ALSO πŸ’œ

the whole friend group 🫢 these are the siblings, cousins, and distant relatives β€” every single one, no skips:


and that's the page, bestie πŸ₯° before you go β€” this iconic little doc lives in ./drivers/infiniband/ulp/srpt and it's dated October 2026 πŸ—“οΈβœ¨ slay, go drop your ref counts, and i'll see you in the next manpage πŸ’–πŸ¦‹πŸ’…

πŸ“¦ where this page comes from