3 .TH UMAD_GET_PORT 3 "May 21, 2007" "OpenIB" "OpenIB Programmer\'s Manual"
5 umad_get_port, umad_release_port \- open and close an InfiniBand port
8 .B #include <infiniband/umad.h>
10 .BI "int umad_get_port(char " "*ca_name" ", int " "portnum" ", umad_port_t " "*port" );
12 .BI "int umad_release_port(umad_port_t " "*port" );
18 structure with the IB port attributes specified by
22 , or the default port if
26 is zero. If only one of
30 are specified, the other is used as a filter.
31 For example, passing a NULL
35 means get a port from any of the local IB devices, as long as it is
37 Note that the library may use some reference scheme to support port caching
39 .B umad_release_port()
40 should be called before the
42 structure can be deallocated.
47 struct, as specified in <infiniband/umad.h>.
50 typedef struct umad_port {
52 char ca_name[UMAD_CA_NAME_LEN]; /* Name of the device */
53 int portnum; /* Physical port number */
54 uint base_lid; /* Base port LID */
55 uint lmc; /* LMC of LID */
56 uint sm_lid; /* SM LID */
57 uint sm_sl; /* SM service level */
58 uint state; /* Logical port state */
59 uint phys_state; /* Physical port state */
60 uint rate; /* Port link bit rate */
61 uint64_t capmask; /* Port capabilities */
62 uint64_t gid_prefix; /* Gid prefix of this port */
63 uint64_t port_guid; /* GUID of this port */
68 .B umad_release_port()
69 releases the resources that were allocated by the
71 function for the specified IB
76 .B umad_release_port()
77 return 0 on success, and a negative value on error.
80 Hal Rosenstock <halr@voltaire.com>
82 Dotan Barak <dotanb@mellanox.co.il>