RDMA_SET_OPTION(3)
π RDMA_SET_OPTION π
okay bestie, gather round, because this is a lil function from the Librdmacm Programmer's Manual and she is lowkey iconic π
β¨ NAME β¨
rdma_set_option β sets communication options for an rdma_cm_id. that's it, that's the job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <rdma/rdma_cma.h>
int rdma_set_option (struct rdma_cm_id *id, int level, int optname, void
*optval, size_t optlen);
like yes, five arguments, we love a main character with a full ensemble cast π«Ά
π ARGUMENTS π
idβ the RDMA identifier. your lil handle on the whole situation fr.levelβ the protocol level of the option you're setting. which floor of the building are we on, bestie.optnameβ the name of the option, relative to the level, that you wanna set. it's giving "address, but make it relative" πoptvalβ a reference to the option data. what's actually in there depends on theleveland theoptname, so no, there's no single answer, it's dependent πoptlenβ the size of theoptvalbuffer. know your sizes, queen.
π DESCRIPTION π
Sets communication options for an rdma_cm_id. the whole point of this call is to override the default system settings β you're basically saying "thanks for the defaults but I'll take it from here" πβοΈ
optname can be one of these:
RDMA_OPTION_ID_TOSβ specify the quality of service provided by a connection. the expectedoptlenis size ofuint8_t. tiny buffer, big service energy β¨RDMA_OPTION_ID_REUSEADDRβ bound therdma_cm_idto a reuseable address. this will allow other users to bind to that same address. the expectedoptlenis size ofint. sharing is caring, no cap π€RDMA_OPTION_ID_AFONLYβ setIPV6_V6ONLYsocket. the expectedoptlenis size ofint. v6 only, v6 forever, periodt π¦RDMA_OPTION_IB_PATHβ set IB path record data. the expectedoptlenis size ofstruct ibv_path_data[]. yes it's an array, yes that's on purpose πRDMA_OPTION_ID_ACK_TIMEOUTβ set QP ACK timeout. the value is calculated according to the formula4.096 * 2^(ack_timeout) usec. math girlies rise, we love a formula π₯
β RETURN VALUE β
Returns 0 on success, or -1 on error. and if an error happens, errno will be set to indicate the failure reason. so like, always check errno, bestie, she's the one telling you what went wrong π
π NOTES π
Option details may be found in the relevant header files. iykyk β go read the headers, they're the receipts π
π§ SEE ALSO π§
not me being obsessed with a C function. anyway, this page is brought to you by librdmacm, dated 2007-08-06 β vintage but still slaying π go forth and set those options, angel π
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- 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
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: librdmacm-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: librdmacm-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: librdmacm-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: librdmacm-dev 56.1-1ubuntu1
- ubuntu resolute: librdmacm-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: librdmacm-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms