-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1529 from mazorasaf/smi_gsi_pair_suggestion
Add support for XDR infiniband tools
- Loading branch information
Showing
13 changed files
with
611 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.. -*- rst -*- | ||
.. Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md | ||
umad_get_smi_gsi_pair_by_ca_name(3) | ||
=================================== | ||
|
||
Retrieve SMI/GSI pair information based on device name and port number. | ||
|
||
Synopsis | ||
-------- | ||
|
||
.. code-block:: c | ||
#include <infiniband/umad.h> | ||
int umad_get_smi_gsi_pair_by_ca_name(const char *devname, uint8_t portnum, | ||
struct umad_ca_pair *ca, unsigned enforce_smi); | ||
Description | ||
----------- | ||
|
||
``umad_get_smi_gsi_pair_by_ca_name()`` fills the provided ``ca`` structure with the SMI and GSI pair information | ||
for the specified device name and port number. | ||
|
||
The ``devname`` parameter specifies the name of the device, and ``portnum`` is the associated port number. | ||
|
||
``enforce_smi`` parameter if enabled, will look only for pairs that has both SMI and GSI interfaces. | ||
|
||
The ``struct umad_ca_pair`` is defined in ``<infiniband/umad.h>`` and includes the following members: | ||
|
||
.. code-block:: c | ||
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 function populates this structure with the relevant data for the given ``devname`` and ``portnum``. | ||
|
||
Return Value | ||
------------ | ||
|
||
``umad_get_smi_gsi_pair_by_ca_name()`` returns: | ||
|
||
- **0**: If the specified device and port are found and the structure is successfully populated. | ||
- **1**: If no matching device or port is found. | ||
|
||
Authors | ||
------- | ||
|
||
- Asaf Mazor <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.. -*- rst -*- | ||
.. Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md | ||
umad_get_smi_gsi_pairs(3) | ||
========================= | ||
|
||
Get CAs as SMI/GSI pairs. | ||
|
||
Synopsis | ||
-------- | ||
|
||
.. code-block:: c | ||
#include <infiniband/umad.h> | ||
int umad_get_smi_gsi_pairs(struct umad_ca_pair cas[], size_t max); | ||
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`` as specified in ``<infiniband/umad.h>``: | ||
|
||
.. code-block:: c | ||
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 represent the first ports found active | ||
for the corresponding SMI/GSI device. | ||
|
||
Return Value | ||
------------ | ||
|
||
``umad_get_smi_gsi_pairs()`` returns the number of devices filled, or **-1** on error. | ||
|
||
Authors | ||
------- | ||
|
||
- Asaf Mazor <[email protected]> |
Oops, something went wrong.