2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the
9 * OpenIB.org BSD license below:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * - Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * - Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 #ifndef INFINIBAND_SA_H
35 #define INFINIBAND_SA_H
37 #include <infiniband/verbs.h>
38 #include <infiniband/types.h>
40 struct ibv_sa_path_rec {
51 uint8_t traffic_class;
59 uint8_t rate_selector;
61 uint8_t packet_life_time_selector;
62 uint8_t packet_life_time;
66 struct ibv_sa_mcmember_rec {
68 union ibv_gid port_gid;
73 uint8_t traffic_class;
75 uint8_t rate_selector;
77 uint8_t packet_life_time_selector;
78 uint8_t packet_life_time;
87 struct ibv_sa_service_rec {
101 #define IBV_PATH_RECORD_REVERSIBLE 0x80
103 struct ibv_path_record {
109 __be32 flowlabel_hoplimit; /* resv-31:28 flow label-27:8 hop limit-7:0*/
111 uint8_t reversible_numpath; /* reversible-7:7 num path-6:0 */
113 __be16 qosclass_sl; /* qos class-15:4 sl-3:0 */
114 uint8_t mtu; /* mtu selector-7:6 mtu-5:0 */
115 uint8_t rate; /* rate selector-7:6 rate-5:0 */
116 uint8_t packetlifetime; /* lifetime selector-7:6 lifetime-5:0 */
121 #define IBV_PATH_FLAG_GMP (1<<0)
122 #define IBV_PATH_FLAG_PRIMARY (1<<1)
123 #define IBV_PATH_FLAG_ALTERNATE (1<<2)
124 #define IBV_PATH_FLAG_OUTBOUND (1<<3)
125 #define IBV_PATH_FLAG_INBOUND (1<<4)
126 #define IBV_PATH_FLAG_INBOUND_REVERSE (1<<5)
127 #define IBV_PATH_FLAG_BIDIRECTIONAL (IBV_PATH_FLAG_OUTBOUND | \
128 IBV_PATH_FLAG_INBOUND_REVERSE)
130 struct ibv_path_data {
133 struct ibv_path_record path;
136 #endif /* INFINIBAND_SA_H */