umad_get_smi_gsi_pairs(3) =========================Get CAs as SMI/GSI pairs.Synopsis ‐‐‐‐‐‐‐‐ #include <infiniband/umad.h> int umad_get_smi_gsi_pairs(struct umad_ca_pair cas[], size_tmax);Description ‐‐‐‐‐‐‐‐‐‐‐‘‘umad_get_smi_gsi_pairs()‘‘ fills a user‐allocated array of‘‘struct umad_ca_pair‘‘. It fills up to ‘‘max‘‘ devices.The argument ‘‘cas‘‘ is an array of ‘‘struct umad_ca_pair‘‘ asspecified in ‘‘<infiniband/umad.h>‘‘: struct umad_ca_pair { char smi_name[UMAD_CA_NAME_LEN]; /* Name of the SMI */ uint32_t smi_preferred_port; /* Preferred port for the SMI */ char gsi_name[UMAD_CA_NAME_LEN]; /* Name of the GSI */ uint32_t gsi_preferred_port; /* Preferred port for the GSI */ };The ‘‘smi_preferred_port‘‘ and ‘‘gsi_preferred_port‘‘ fields rep‐resent the first ports found active for the corresponding SMI/GSIdevice.Return Value ‐‐‐‐‐‐‐‐‐‐‐‐‘‘umad_get_smi_gsi_pairs()‘‘ returns the number of devicesfilled, or **‐1** on error.Authors ‐‐‐‐‐‐‐‐ Asaf Mazor <amazor@nvidia.com>HTML rendering created 2025-02-02 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |