diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:43:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:43:13 -0400 |
commit | ce9d3c9a6a9aef61525be07fe6ba27d937236aa2 (patch) | |
tree | 1b29bcb8f60fc6b59fa0d7b833cc733b8ebe17c9 /include | |
parent | 038a5008b2f395c85e6e71d6ddf3c684e7c405b0 (diff) | |
parent | 3d73c2884f45f9a297cbc956cea101405a9703f2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (87 commits)
mlx4_core: Fix section mismatches
IPoIB: Allow setting policy to ignore multicast groups
IB/mthca: Mark error paths as unlikely() in post_srq_recv functions
IB/ipath: Minor fix to ordering of freeing and zeroing of tid pages.
IB/ipath: Remove redundant link state checks
IB/ipath: Fix IB_EVENT_PORT_ERR event
IB/ipath: Better handling of unexpected GPIO interrupts
IB/ipath: Maintain active time on all chips
IB/ipath: Fix QHT7040 serial number check
IB/ipath: Indicate a couple of chip bugs to userspace
IB/ipath: iba6110 rev4 no longer needs recv header overrun workaround
IB/ipath: Use counters in ipath_poll and cleanup interrupts in ipath_close
IB/ipath: Remove duplicate copy of LMC
IB/ipath: Add ability to set the LMC via the sysfs debugging interface
IB/ipath: Optimize completion queue entry insertion and polling
IB/ipath: Implement IB_EVENT_QP_LAST_WQE_REACHED
IB/ipath: Generate flush CQE when QP is in error state
IB/ipath: Remove redundant code
IB/ipath: Future proof eeprom checksum code (contents reading)
IB/ipath: UC RDMA WRITE with IMMEDIATE doesn't send the immediate
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx4/device.h | 27 | ||||
-rw-r--r-- | include/rdma/ib_cm.h | 7 | ||||
-rw-r--r-- | include/rdma/ib_sa.h | 11 | ||||
-rw-r--r-- | include/rdma/ib_umem.h | 1 | ||||
-rw-r--r-- | include/rdma/ib_user_mad.h | 70 | ||||
-rw-r--r-- | include/rdma/rdma_cm.h | 14 | ||||
-rw-r--r-- | include/rdma/rdma_user_cm.h | 18 |
7 files changed, 139 insertions, 9 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index cfb78fb2c046..222815d91c40 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -49,6 +49,10 @@ enum { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | enum { | 51 | enum { |
52 | MLX4_BOARD_ID_LEN = 64 | ||
53 | }; | ||
54 | |||
55 | enum { | ||
52 | MLX4_DEV_CAP_FLAG_RC = 1 << 0, | 56 | MLX4_DEV_CAP_FLAG_RC = 1 << 0, |
53 | MLX4_DEV_CAP_FLAG_UC = 1 << 1, | 57 | MLX4_DEV_CAP_FLAG_UC = 1 << 1, |
54 | MLX4_DEV_CAP_FLAG_UD = 1 << 2, | 58 | MLX4_DEV_CAP_FLAG_UD = 1 << 2, |
@@ -210,6 +214,17 @@ struct mlx4_mr { | |||
210 | int enabled; | 214 | int enabled; |
211 | }; | 215 | }; |
212 | 216 | ||
217 | struct mlx4_fmr { | ||
218 | struct mlx4_mr mr; | ||
219 | struct mlx4_mpt_entry *mpt; | ||
220 | __be64 *mtts; | ||
221 | dma_addr_t dma_handle; | ||
222 | int max_pages; | ||
223 | int max_maps; | ||
224 | int maps; | ||
225 | u8 page_shift; | ||
226 | }; | ||
227 | |||
213 | struct mlx4_uar { | 228 | struct mlx4_uar { |
214 | unsigned long pfn; | 229 | unsigned long pfn; |
215 | int index; | 230 | int index; |
@@ -272,6 +287,8 @@ struct mlx4_dev { | |||
272 | unsigned long flags; | 287 | unsigned long flags; |
273 | struct mlx4_caps caps; | 288 | struct mlx4_caps caps; |
274 | struct radix_tree_root qp_table_tree; | 289 | struct radix_tree_root qp_table_tree; |
290 | u32 rev_id; | ||
291 | char board_id[MLX4_BOARD_ID_LEN]; | ||
275 | }; | 292 | }; |
276 | 293 | ||
277 | struct mlx4_init_port_param { | 294 | struct mlx4_init_port_param { |
@@ -331,4 +348,14 @@ int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | |||
331 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 348 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); |
332 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 349 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); |
333 | 350 | ||
351 | int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list, | ||
352 | int npages, u64 iova, u32 *lkey, u32 *rkey); | ||
353 | int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages, | ||
354 | int max_maps, u8 page_shift, struct mlx4_fmr *fmr); | ||
355 | int mlx4_fmr_enable(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | ||
356 | void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | ||
357 | u32 *lkey, u32 *rkey); | ||
358 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | ||
359 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | ||
360 | |||
334 | #endif /* MLX4_DEVICE_H */ | 361 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h index 12243e80c706..a627c8682d2f 100644 --- a/include/rdma/ib_cm.h +++ b/include/rdma/ib_cm.h | |||
@@ -477,12 +477,15 @@ int ib_send_cm_rej(struct ib_cm_id *cm_id, | |||
477 | const void *private_data, | 477 | const void *private_data, |
478 | u8 private_data_len); | 478 | u8 private_data_len); |
479 | 479 | ||
480 | #define IB_CM_MRA_FLAG_DELAY 0x80 /* Send MRA only after a duplicate msg */ | ||
481 | |||
480 | /** | 482 | /** |
481 | * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection | 483 | * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection |
482 | * message. | 484 | * message. |
483 | * @cm_id: Connection identifier associated with the connection message. | 485 | * @cm_id: Connection identifier associated with the connection message. |
484 | * @service_timeout: The maximum time required for the sender to reply to | 486 | * @service_timeout: The lower 5-bits specify the maximum time required for |
485 | * to the connection message. | 487 | * the sender to reply to to the connection message. The upper 3-bits |
488 | * specify additional control flags. | ||
486 | * @private_data: Optional user-defined private data sent with the | 489 | * @private_data: Optional user-defined private data sent with the |
487 | * message receipt acknowledgement. | 490 | * message receipt acknowledgement. |
488 | * @private_data_len: Size of the private data buffer, in bytes. | 491 | * @private_data_len: Size of the private data buffer, in bytes. |
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h index 5e26b2f53f86..942692b0b92e 100644 --- a/include/rdma/ib_sa.h +++ b/include/rdma/ib_sa.h | |||
@@ -109,8 +109,8 @@ enum ib_sa_selector { | |||
109 | * Reserved rows are indicated with comments to help maintainability. | 109 | * Reserved rows are indicated with comments to help maintainability. |
110 | */ | 110 | */ |
111 | 111 | ||
112 | /* reserved: 0 */ | 112 | #define IB_SA_PATH_REC_SERVICE_ID (IB_SA_COMP_MASK( 0) |\ |
113 | /* reserved: 1 */ | 113 | IB_SA_COMP_MASK( 1)) |
114 | #define IB_SA_PATH_REC_DGID IB_SA_COMP_MASK( 2) | 114 | #define IB_SA_PATH_REC_DGID IB_SA_COMP_MASK( 2) |
115 | #define IB_SA_PATH_REC_SGID IB_SA_COMP_MASK( 3) | 115 | #define IB_SA_PATH_REC_SGID IB_SA_COMP_MASK( 3) |
116 | #define IB_SA_PATH_REC_DLID IB_SA_COMP_MASK( 4) | 116 | #define IB_SA_PATH_REC_DLID IB_SA_COMP_MASK( 4) |
@@ -123,7 +123,7 @@ enum ib_sa_selector { | |||
123 | #define IB_SA_PATH_REC_REVERSIBLE IB_SA_COMP_MASK(11) | 123 | #define IB_SA_PATH_REC_REVERSIBLE IB_SA_COMP_MASK(11) |
124 | #define IB_SA_PATH_REC_NUMB_PATH IB_SA_COMP_MASK(12) | 124 | #define IB_SA_PATH_REC_NUMB_PATH IB_SA_COMP_MASK(12) |
125 | #define IB_SA_PATH_REC_PKEY IB_SA_COMP_MASK(13) | 125 | #define IB_SA_PATH_REC_PKEY IB_SA_COMP_MASK(13) |
126 | /* reserved: 14 */ | 126 | #define IB_SA_PATH_REC_QOS_CLASS IB_SA_COMP_MASK(14) |
127 | #define IB_SA_PATH_REC_SL IB_SA_COMP_MASK(15) | 127 | #define IB_SA_PATH_REC_SL IB_SA_COMP_MASK(15) |
128 | #define IB_SA_PATH_REC_MTU_SELECTOR IB_SA_COMP_MASK(16) | 128 | #define IB_SA_PATH_REC_MTU_SELECTOR IB_SA_COMP_MASK(16) |
129 | #define IB_SA_PATH_REC_MTU IB_SA_COMP_MASK(17) | 129 | #define IB_SA_PATH_REC_MTU IB_SA_COMP_MASK(17) |
@@ -134,8 +134,7 @@ enum ib_sa_selector { | |||
134 | #define IB_SA_PATH_REC_PREFERENCE IB_SA_COMP_MASK(22) | 134 | #define IB_SA_PATH_REC_PREFERENCE IB_SA_COMP_MASK(22) |
135 | 135 | ||
136 | struct ib_sa_path_rec { | 136 | struct ib_sa_path_rec { |
137 | /* reserved */ | 137 | __be64 service_id; |
138 | /* reserved */ | ||
139 | union ib_gid dgid; | 138 | union ib_gid dgid; |
140 | union ib_gid sgid; | 139 | union ib_gid sgid; |
141 | __be16 dlid; | 140 | __be16 dlid; |
@@ -148,7 +147,7 @@ struct ib_sa_path_rec { | |||
148 | int reversible; | 147 | int reversible; |
149 | u8 numb_path; | 148 | u8 numb_path; |
150 | __be16 pkey; | 149 | __be16 pkey; |
151 | /* reserved */ | 150 | __be16 qos_class; |
152 | u8 sl; | 151 | u8 sl; |
153 | u8 mtu_selector; | 152 | u8 mtu_selector; |
154 | u8 mtu; | 153 | u8 mtu; |
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index c533d6c7903f..22298423cf0b 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h | |||
@@ -45,6 +45,7 @@ struct ib_umem { | |||
45 | int offset; | 45 | int offset; |
46 | int page_size; | 46 | int page_size; |
47 | int writable; | 47 | int writable; |
48 | int hugetlb; | ||
48 | struct list_head chunk_list; | 49 | struct list_head chunk_list; |
49 | struct work_struct work; | 50 | struct work_struct work; |
50 | struct mm_struct *mm; | 51 | struct mm_struct *mm; |
diff --git a/include/rdma/ib_user_mad.h b/include/rdma/ib_user_mad.h index d66b15ea82c4..29d2c7205a90 100644 --- a/include/rdma/ib_user_mad.h +++ b/include/rdma/ib_user_mad.h | |||
@@ -52,7 +52,50 @@ | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index | ||
56 | * @id - ID of agent MAD received with/to be sent with | ||
57 | * @status - 0 on successful receive, ETIMEDOUT if no response | ||
58 | * received (transaction ID in data[] will be set to TID of original | ||
59 | * request) (ignored on send) | ||
60 | * @timeout_ms - Milliseconds to wait for response (unset on receive) | ||
61 | * @retries - Number of automatic retries to attempt | ||
62 | * @qpn - Remote QP number received from/to be sent to | ||
63 | * @qkey - Remote Q_Key to be sent with (unset on receive) | ||
64 | * @lid - Remote lid received from/to be sent to | ||
65 | * @sl - Service level received with/to be sent with | ||
66 | * @path_bits - Local path bits received with/to be sent with | ||
67 | * @grh_present - If set, GRH was received/should be sent | ||
68 | * @gid_index - Local GID index to send with (unset on receive) | ||
69 | * @hop_limit - Hop limit in GRH | ||
70 | * @traffic_class - Traffic class in GRH | ||
71 | * @gid - Remote GID in GRH | ||
72 | * @flow_label - Flow label in GRH | ||
73 | */ | ||
74 | struct ib_user_mad_hdr_old { | ||
75 | __u32 id; | ||
76 | __u32 status; | ||
77 | __u32 timeout_ms; | ||
78 | __u32 retries; | ||
79 | __u32 length; | ||
80 | __be32 qpn; | ||
81 | __be32 qkey; | ||
82 | __be16 lid; | ||
83 | __u8 sl; | ||
84 | __u8 path_bits; | ||
85 | __u8 grh_present; | ||
86 | __u8 gid_index; | ||
87 | __u8 hop_limit; | ||
88 | __u8 traffic_class; | ||
89 | __u8 gid[16]; | ||
90 | __be32 flow_label; | ||
91 | }; | ||
92 | |||
93 | /** | ||
55 | * ib_user_mad_hdr - MAD packet header | 94 | * ib_user_mad_hdr - MAD packet header |
95 | * This layout allows specifying/receiving the P_Key index. To use | ||
96 | * this capability, an application must call the | ||
97 | * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before | ||
98 | * any other actions with the file handle. | ||
56 | * @id - ID of agent MAD received with/to be sent with | 99 | * @id - ID of agent MAD received with/to be sent with |
57 | * @status - 0 on successful receive, ETIMEDOUT if no response | 100 | * @status - 0 on successful receive, ETIMEDOUT if no response |
58 | * received (transaction ID in data[] will be set to TID of original | 101 | * received (transaction ID in data[] will be set to TID of original |
@@ -70,6 +113,7 @@ | |||
70 | * @traffic_class - Traffic class in GRH | 113 | * @traffic_class - Traffic class in GRH |
71 | * @gid - Remote GID in GRH | 114 | * @gid - Remote GID in GRH |
72 | * @flow_label - Flow label in GRH | 115 | * @flow_label - Flow label in GRH |
116 | * @pkey_index - P_Key index | ||
73 | */ | 117 | */ |
74 | struct ib_user_mad_hdr { | 118 | struct ib_user_mad_hdr { |
75 | __u32 id; | 119 | __u32 id; |
@@ -88,6 +132,8 @@ struct ib_user_mad_hdr { | |||
88 | __u8 traffic_class; | 132 | __u8 traffic_class; |
89 | __u8 gid[16]; | 133 | __u8 gid[16]; |
90 | __be32 flow_label; | 134 | __be32 flow_label; |
135 | __u16 pkey_index; | ||
136 | __u8 reserved[6]; | ||
91 | }; | 137 | }; |
92 | 138 | ||
93 | /** | 139 | /** |
@@ -101,6 +147,26 @@ struct ib_user_mad { | |||
101 | __u64 data[0]; | 147 | __u64 data[0]; |
102 | }; | 148 | }; |
103 | 149 | ||
150 | /* | ||
151 | * Earlier versions of this interface definition declared the | ||
152 | * method_mask[] member as an array of __u32 but treated it as a | ||
153 | * bitmap made up of longs in the kernel. This ambiguity meant that | ||
154 | * 32-bit big-endian applications that can run on both 32-bit and | ||
155 | * 64-bit kernels had no consistent ABI to rely on, and 64-bit | ||
156 | * big-endian applications that treated method_mask as being made up | ||
157 | * of 32-bit words would have their bitmap misinterpreted. | ||
158 | * | ||
159 | * To clear up this confusion, we change the declaration of | ||
160 | * method_mask[] to use unsigned long and handle the conversion from | ||
161 | * 32-bit userspace to 64-bit kernel for big-endian systems in the | ||
162 | * compat_ioctl method. Unfortunately, to keep the structure layout | ||
163 | * the same, we need the method_mask[] array to be aligned only to 4 | ||
164 | * bytes even when long is 64 bits, which forces us into this ugly | ||
165 | * typedef. | ||
166 | */ | ||
167 | typedef unsigned long __attribute__((aligned(4))) packed_ulong; | ||
168 | #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long))) | ||
169 | |||
104 | /** | 170 | /** |
105 | * ib_user_mad_reg_req - MAD registration request | 171 | * ib_user_mad_reg_req - MAD registration request |
106 | * @id - Set by the kernel; used to identify agent in future requests. | 172 | * @id - Set by the kernel; used to identify agent in future requests. |
@@ -119,7 +185,7 @@ struct ib_user_mad { | |||
119 | */ | 185 | */ |
120 | struct ib_user_mad_reg_req { | 186 | struct ib_user_mad_reg_req { |
121 | __u32 id; | 187 | __u32 id; |
122 | __u32 method_mask[4]; | 188 | packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK]; |
123 | __u8 qpn; | 189 | __u8 qpn; |
124 | __u8 mgmt_class; | 190 | __u8 mgmt_class; |
125 | __u8 mgmt_class_version; | 191 | __u8 mgmt_class_version; |
@@ -134,4 +200,6 @@ struct ib_user_mad_reg_req { | |||
134 | 200 | ||
135 | #define IB_USER_MAD_UNREGISTER_AGENT _IOW(IB_IOCTL_MAGIC, 2, __u32) | 201 | #define IB_USER_MAD_UNREGISTER_AGENT _IOW(IB_IOCTL_MAGIC, 2, __u32) |
136 | 202 | ||
203 | #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3) | ||
204 | |||
137 | #endif /* IB_USER_MAD_H */ | 205 | #endif /* IB_USER_MAD_H */ |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 2d6a7705eae7..010f876f41d8 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -314,4 +314,18 @@ int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr, | |||
314 | */ | 314 | */ |
315 | void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr); | 315 | void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr); |
316 | 316 | ||
317 | /** | ||
318 | * rdma_set_service_type - Set the type of service associated with a | ||
319 | * connection identifier. | ||
320 | * @id: Communication identifier to associated with service type. | ||
321 | * @tos: Type of service. | ||
322 | * | ||
323 | * The type of service is interpretted as a differentiated service | ||
324 | * field (RFC 2474). The service type should be specified before | ||
325 | * performing route resolution, as existing communication on the | ||
326 | * connection identifier may be unaffected. The type of service | ||
327 | * requested may not be supported by the network to all destinations. | ||
328 | */ | ||
329 | void rdma_set_service_type(struct rdma_cm_id *id, int tos); | ||
330 | |||
317 | #endif /* RDMA_CM_H */ | 331 | #endif /* RDMA_CM_H */ |
diff --git a/include/rdma/rdma_user_cm.h b/include/rdma/rdma_user_cm.h index f632b0c007c9..9749c1b34d00 100644 --- a/include/rdma/rdma_user_cm.h +++ b/include/rdma/rdma_user_cm.h | |||
@@ -212,4 +212,22 @@ struct rdma_ucm_event_resp { | |||
212 | } param; | 212 | } param; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | /* Option levels */ | ||
216 | enum { | ||
217 | RDMA_OPTION_ID = 0 | ||
218 | }; | ||
219 | |||
220 | /* Option details */ | ||
221 | enum { | ||
222 | RDMA_OPTION_ID_TOS = 0 | ||
223 | }; | ||
224 | |||
225 | struct rdma_ucm_set_option { | ||
226 | __u64 optval; | ||
227 | __u32 id; | ||
228 | __u32 level; | ||
229 | __u32 optname; | ||
230 | __u32 optlen; | ||
231 | }; | ||
232 | |||
215 | #endif /* RDMA_USER_CM_H */ | 233 | #endif /* RDMA_USER_CM_H */ |