fi_control(3)

πŸ’… fi_control(3) β€” the Libfabric one, bestie

Okay so this page is from the Libfabric manual, v2.5.1, and it's all about poking at a fabric resource and making it do stuff. Grab a snack, we're going in πŸ“


✨ NAME ✨

fi_control β€” perform an operation on a fabric resource. That's the whole vibe. One resource, one operation, so iconic πŸ‘‘


🌸 SYNOPSIS 🌸

#include <rdma/fabric.h>

int fi_control(struct fid *fid, int command, void *arg);
int fi_alias(struct fid *fid, struct fid **alias_fid, uint64_t flags);
int fi_get_val(struct fid *fid, int name, void *val);
int fi_set_val(struct fid *fid, int name, void *val);

Four functions, one header, zero notes πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • fid β€” the fabric resource. Your main character, literally.
  • command β€” the operation you wanna perform. What's the move, bestie?
  • arg β€” optional argument to the command. Optional! So you can skip it, no pressure 🫢

πŸ’– DESCRIPTION πŸ’–

So fi_control is the operation you use to perform one or more operations on a fabric resource. Conceptually it's giving POSIX fcntl energy β€” same idea, fabric-flavored ✨

The exact behavior of using fi_control depends on three things: the fabric resource you're operating on, the command you specified, and any provided arguments for that command. For the specific deets, go look at the fabric-resource-specific help pages listed down below, iykyk πŸ‘€

Now the wrappers, because your faves were not gonna make you spell out the command every time:

  • fi_alias β€” a wrapper for fi_control with the command FI_ALIAS. It creates an alias of the specified fabric resource. Dupe energy, but make it fabric πŸ”₯
  • fi_get_val β€” a wrapper for fi_control with the command FI_GET_VAL. It reads the value of the named parameter associated with the fabric resource πŸ“–
  • fi_set_val β€” a wrapper for fi_control with the command FI_SET_VAL. It updates that value. Glow-up time πŸ’…

Heads up though: the available parameter names depend on the type of the fabric resource and the provider in use. Providers may define provider-specific names in the provider extension header files ('rdma/fi_ext_*.h'). Please refer to the provider man pages for the details β€” they've got the lore, I don't πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

(Yes, that's a trailing comma in the original list. We keep it. We respect it. Periodt.)


πŸ‘‘ AUTHORS πŸ‘‘

OpenFabrics. That's it, that's the author. Slay 🫑


That's the whole page, bestie β€” no cap, every flag and every function survived the vibe check πŸ’œ

Signed off with love from the Libfabric Programmer's Manual, dated 2024-12-10, brought to you by Libfabric v2.5.1 πŸŽ€βœ¨ Go forth and fi_control responsibly πŸ¦‹

πŸ“¦ where this page comes from