ntb_link_is_up(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual β€” section 9, main character energy only. today's episode: ntb_link_is_up ✨


🌸 NAME 🌸

ntb_link_is_up β€” get the current ntb link state. that's it. that's the whole vibe check πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

u64 ntb_link_is_up (struct ntb_dev *ntb , enum ntb_speed *speed , enum
ntb_width *width );

literally one function, three args, and it tells you whether the link is up. no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ntb β€” NTB device context. the little context handoff, yk? you know exactly whose link we're asking about.
  • speed β€” OUT β€” The link speed expressed as PCIe generation number. it's an out param bestie, you're not telling it anything, it's telling you πŸ‘‘
  • width β€” OUT β€” The link width expressed as the number of PCIe lanes. also out. also giving data. both of these fill in your values for you, so slay.

✨ DESCRIPTION ✨

Get the current state of the ntb link. that's the mission. that's the assignment. 🫢

It is recommended to query the link state once after every link event. once. not in a loop, not on repeat, not spam-calling it like it's a crush's instagram β€” once, after each link event. πŸ’€

It is safe to query the link state in the context of the link event callback. so yes, you can call it right there inside the callback, no anxiety, no "am I allowed to be here" moment. you are literally invited. 🌈


⭐ RETURN ⭐

bitfield of indexed ports link state: bit is set/cleared if the link is up/down respectively.

translation for the group chat: it hands you back a u64, and each indexed port gets a bit. link up? bit set. link down? bit cleared. one bit per port, no cap πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/ntb.h β€” and here comes the friend group, the whole squad, the entire NTB roster, we love a full roster bestie:

like I said. the whole squad. ate and left no crumbs πŸ“


okay that's the page bestie, go read your link state responsibly πŸ’œ

sign-off szn: this icon lives in ./include/linux, dated October 2026, and it's called ntb_link_is_up(9) β€” mwah, bye πŸ§šβ€β™€οΈπŸ’…

πŸ“¦ where this page comes from