ntb_db_read(9)
π NAME
ntb_db_read β read the local doorbell register (yes bestie, the local one, not the peer one, we been knew π)
This little gem lives in the Kernel API Manual, section 9, and it's literally the "hey, what's ringing?" function of the NTB world.
β¨ SYNOPSIS β¨
u64 ntb_db_read (struct ntb_dev *ntb );
That's it. One arg, one u64 back. Clean. Iconic. No notes. π«Ά
π ARGUMENTS π
ntbβ the NTB device context. It's the device you're asking, bestie, and yes you have to actually pass it, no cap.
πΈ DESCRIPTION πΈ
So okay, here's the vibe: ntb_db_read reads the local doorbell register and hands you back the bits that are set. That's the whole thing. Local register, set bits, returned. The way that this function does exactly one thing and does it flawlessly is honestly main character energy π
Think of it like checking your group chat notifications but the notifications are bits in a hardware register and there are no read receipts. You look, you see what's lit up, you move on. Periodt. π
Heads up: this is the local doorbell register β the one on your side. If you wanted the peer's register, that's a different function entirely and you'll find it down in SEE ALSO, iykyk.
β RETURN β
Returns the bits currently set in the local doorbell register, as a u64. Every bit that's lit up in there? Yours. Obsessed π
π¦ SEE ALSO π¦
Okay so the entire NTB cinematic universe is here, and ngl it's a lot, but we're gonna get through it together, bestie. First up, the source file:
- Kernel file
./include/linux/ntb.h
The enums and structs (the lore) π§
enum ntb_topo(9),enum ntb_speed(9),enum ntb_width(9),enum ntb_default_port(9)struct ntb_client_ops(9),struct ntb_ctx_ops(9),struct ntb_dev_ops(9)struct ntb_client(9),struct ntb_dev(9)
Registering and unregistering (the plot) π
Context and events (the drama) π
Ports, the default kind π
ntb_default_port_number(9),ntb_default_peer_port_count(9),ntb_default_peer_port_number(9),ntb_default_peer_port_idx(9)
Ports, the regular kind πΈ
ntb_port_number(9),ntb_peer_port_count(9),ntb_peer_port_number(9)ntb_logical_port_number(9),ntb_peer_logical_port_number(9),ntb_peer_port_idx(9)
Links (the whole point fr fr) π₯
Memory windows, local edition π
Memory windows, peer edition β¨
Doorbells β our fave, obviously π
ntb_db_is_unsafe(9),ntb_db_valid_mask(9),ntb_db_vector_count(9),ntb_db_vector_mask(9)ntb_db_set(9),ntb_db_clear(9),ntb_db_read_mask(9),ntb_db_set_mask(9),ntb_db_clear_mask(9)
Doorbells but make it the peer's π
ntb_peer_db_addr(9),ntb_peer_db_read(9),ntb_peer_db_set(9),ntb_peer_db_clear(9)ntb_peer_db_read_mask(9),ntb_peer_db_set_mask(9),ntb_peer_db_clear_mask(9)
Scratchpads (the notes app of the kernel) π
ntb_spad_is_unsafe(9),ntb_spad_count(9),ntb_spad_read(9),ntb_spad_write(9)ntb_peer_spad_addr(9),ntb_peer_spad_read(9),ntb_peer_spad_write(9)
Messages (the DMs) π
ntb_msg_count(9),ntb_msg_inbits(9),ntb_msg_outbits(9)ntb_msg_read_sts(9),ntb_msg_clear_sts(9),ntb_msg_set_mask(9),ntb_msg_clear_mask(9)ntb_msg_read(9),ntb_peer_msg_write(9)
The stragglers, but they're icons too π
And that's the whole page, bestie! π This lil masterpiece comes to you straight outta ./include/linux, dated October 2026 β screenshot it, memorise it, cite it in your next PR. Slay πβ¨
π¦ 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