umad_get_port(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | AUTHORS | COLOPHON

UMAD_GET_PORT(3)       OpenIB Programmer's Manual       UMAD_GET_PORT(3)

NAME         top

       umad_get_port, umad_release_port - open and close an InfiniBand
       port

SYNOPSIS         top

       #include <infiniband/umad.h>

       int umad_get_port(char *ca_name, int portnum, umad_port_t *port);

       int umad_release_port(umad_port_t *port);

DESCRIPTION         top

       umad_get_port() fills the port structure with the IB port
       attributes specified by ca_name and portnum , or the default port
       if ca_name is NULL and portnum is zero. If only one of ca_name
       and portnum are specified, the other is used as a filter.  For
       example, passing a NULL ca_name and 2 for the portnum means get a
       port from any of the local IB devices, as long as it is the
       second port.  Note that the library may use some reference scheme
       to support port caching therefore umad_release_port() should be
       called before the port structure can be deallocated.  The
       argument port is an umad_port_t struct, as specified in
       <infiniband/umad.h>.

       typedef struct umad_port {
               char ca_name[UMAD_CA_NAME_LEN];                 /* Name of the device */
               int portnum;                                    /* Physical port number */
               uint base_lid;                                  /* Base port LID */
               uint lmc;                                       /* LMC of LID */
               uint sm_lid;                                    /* SM LID */
               uint sm_sl;                                     /* SM service level */
               uint state;                                     /* Logical port state */
               uint phys_state;                                /* Physical port state */
               uint rate;                                      /* Port link bit rate */
               uint64_t capmask;                               /* Port capabilities */
               uint64_t gid_prefix;                            /* Gid prefix of this port */
               uint64_t port_guid;                             /* GUID of this port */
       } umad_port_t;

       umad_release_port() releases the resources that were allocated by
       the umad_get_port() function for the specified IB port.

RETURN VALUE         top

       umad_get_port() and umad_release_port() return 0 on success, and
       a negative value on error.

AUTHORS         top

       Hal Rosenstock <halr@voltaire.com>

       Dotan Barak <dotanb@mellanox.co.il>

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2024-06-14.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2024-06-10.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

OpenIB                        May 21, 2007              UMAD_GET_PORT(3)

Pages that refer to this page: umad_get_issm_path(3)umad_open_port(3)