ntb_peer_db_set(9)
π
ntb_peer_db_set β from the ntb_peer_db_set(9) chapter of the Kernel API Manual
okay bestie, so this is a kernel API page, part of the kernel API manual β we're literally in the drivers/ntb β¨ doorbell β¨ zone today. no cap, it's a tiny function with big "hey other side, look over here" energy.
πΈ NAME πΈ
ntb_peer_db_set β set bits in the peer doorbell register ποΈ
Like, you're poking the other side's doorbell. Rude? No. Iconic? Yes.
π SYNOPSIS π
int ntb_peer_db_set (struct ntb_dev *ntb , u64 db_bits );
the way that signature just sits there being all int-returning and tidy... we love a function that tells you if it worked. π
π¦ ARGUMENTS π¦
ntbβ your NTB device context. the main character struct, basically πdb_bitsβ the doorbell bits you wanna set. these are your bits, pick them wisely β¨
π«Ά DESCRIPTION π«Ά
okay so what this does: it sets bits in the peer doorbell register β the peer's, not yours, that's the whole point β and setting those bits may generate a peer doorbell interrupt on the other side. so, yeah, you're ringing their bell π.
and here's the rule that's lowkey the most important part, no exceptions:
Bits that were already set must remain set. periodt. π you're setting bits, not clearing them, not toggling them, not doing an unhinged little rewrite of the register. already-set bits stay set. fr fr.
π₯ RETURN π₯
- Zero on success π β zero is a win here, do not @ me
- otherwise an error number β so if it's not zero, it's giving error vibes and you should handle that π
β SEE ALSO β
the bestie list is LONG, so buckle in. first up, the header that started it all:
- Kernel file
./include/linux/ntb.hπ
enums + 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)
register / unregister:
ctx + events:
ports (so many ports):
ntb_default_port_number(9),ntb_default_peer_port_count(9),ntb_default_peer_port_number(9),ntb_default_peer_port_idx(9)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:
memory windows:
ntb_mw_count(9),ntb_mw_get_align(9),ntb_mw_set_trans(9),ntb_mw_clear_trans(9)ntb_peer_mw_count(9),ntb_peer_mw_get_addr(9),ntb_peer_mw_set_trans(9),ntb_peer_mw_clear_trans(9)
doorbells, local side:
ntb_db_is_unsafe(9),ntb_db_valid_mask(9),ntb_db_vector_count(9),ntb_db_vector_mask(9)ntb_db_read(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, peer side (yes, my girl's whole family):
ntb_peer_db_addr(9),ntb_peer_db_read(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:
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:
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)
misc icons:
and that's the whole page, bestie π§ you now know how to ring a peer doorbell and you know the bits you didn't touch stay exactly where they were. iykyk.
<cute>β signed off with love from ./include/linux, dated October 2026, version ntb_peer_db_set(9) Β· stay slaying ππ</cute>
π¦ 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