IONIC_DV_PD_SET_SQCMB(3)
π IONIC_DV_PD_SET_SQCMB(3) π
okay so bestie, you're in the Ionic Programmer's Manual, section 3, and today's main character is ionic_dv_pd_set_sqcmb β yes that's a mouthful, no we're not renaming it, and honestly? iconic name. let's get into it π«Ά
β¨ NAME β¨
ionic_dv_pd_set_sqcmb β specify send queue preference for controller memory bar
like, it literally sets your send queue prefs for the CMB. that's the vibe. π
β¨ SYNOPSIS β¨
#include <infiniband/ionic_dv.h>
int ionic_dv_pd_set_sqcmb(struct ibv_pd *ibpd, bool enable, bool expdb,
bool require);
πΈ DESCRIPTION πΈ
ionic_dv_pd_set_sqcmb() configures the controller memory bar (CMB) preferences for send queues created under the protection domain ibpd. bestie listen β send queues created after this call will use the CMB according to the preferences you specified. so like, order matters, obviously. π
When CMB is enabled, the send queue ring buffer is placed in device memory (the controller memory bar) instead of host memory, which can reduce doorbell latency. yes, that's a real optimization, not just a vibe. β¨
Express doorbell (expdb) is an additional optimization that further reduces doorbell overhead when the send queue is placed in CMB. it's giving "extra sparkle on top" π¦
The require flag controls whether creation should fail if the requested CMB preferences cannot be met. When require is false, the driver will fall back to host memory if CMB is unavailable. so like, false = chill, we pivot to host memory. true = no plan B, it's CMB or nothing. π
π ARGUMENTS π
ibpdβ the protection domain to configure. Must be an ionic protection domain, no exceptions, we check. πenableβ allow the use of the controller memory bar for send queues. this is the big switch, the moment, the main character energy.expdbβ allow the use of express doorbell optimizations. Only meaningful whenenableistrue. so don't come at it withenableoff, it's not going to do anything for you. πrequireβ require that the CMB preferences are met. Iftrueand the preferences cannot be satisfied, queue creation will fail instead of falling back to host memory. Only meaningful whenenableistrue. fr fr, this is the strict mode.
π₯ RETURN VALUE π₯
Returns 0 on success, or a positive errno value on failure. yes we love a clean zero. β
EPERMβibpdis not an ionic protection domain. wrong PD bestie, it's giving "wrong group chat" πEINVALβrequireistruewithexpdbtrue, but the device does not support express doorbell for send queues. the device said no, and we must respect it. π
π¦ SEE ALSO π¦
go read those too, they're all part of the same little friend group. π
π AUTHORS π
Advanced Micro Devices, Inc.
π quick reminder bestie:require=truemeans no fallback, so if the CMB prefs can't be met, queue creation will fail. don't say i didn't warn you. π«Ά
and that's the whole page, slay. this lil masterpiece is from the ionic manual set, dated 2025-06-23 β recorded in the footer as IONIC_DV_PD_SET_SQCMB(3) like the icon it is. periodt. π
π¦ where this page comes from
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms