RDMA_SET_OPTION(3)

πŸ“¦
version 65.0 Β· 2 versions
  • 65.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 15.1 Β· freebsd 14.5, freebsd 15.1
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 the level and the optname, so no, there's no single answer, it's dependent 😌
  • optlen β€” the size of the optval buffer. 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 expected optlen is size of uint8_t. tiny buffer, big service energy ✨
  • RDMA_OPTION_ID_REUSEADDR β€” bound the rdma_cm_id to a reuseable address. this will allow other users to bind to that same address. the expected optlen is size of int. sharing is caring, no cap 🀝
  • RDMA_OPTION_ID_AFONLY β€” set IPV6_V6ONLY socket. the expected optlen is size of int. v6 only, v6 forever, periodt πŸ¦‹
  • RDMA_OPTION_IB_PATH β€” set IB path record data. the expected optlen is size of struct 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 formula 4.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 🧚

rdma_create_id(3)


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