diff options
author | Christoph Hellwig <hch@lst.de> | 2015-12-23 13:12:48 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-12-23 14:29:04 -0500 |
commit | feb7c1e38bccfd18cc06677cb648ed2340788fe8 (patch) | |
tree | 9898dd6dfef73285013027d349179163a7d9a2c6 /include/rdma | |
parent | b7d3e0a94fe128912bbebf0ae68551c85fd2d429 (diff) |
IB: remove in-kernel support for memory windows
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the
unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw
into the uverbs module.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> [core]
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_verbs.h | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 86970f3e90b4..177844265c98 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -812,7 +812,6 @@ enum ib_wc_opcode { | |||
812 | IB_WC_RDMA_READ, | 812 | IB_WC_RDMA_READ, |
813 | IB_WC_COMP_SWAP, | 813 | IB_WC_COMP_SWAP, |
814 | IB_WC_FETCH_ADD, | 814 | IB_WC_FETCH_ADD, |
815 | IB_WC_BIND_MW, | ||
816 | IB_WC_LSO, | 815 | IB_WC_LSO, |
817 | IB_WC_LOCAL_INV, | 816 | IB_WC_LOCAL_INV, |
818 | IB_WC_REG_MR, | 817 | IB_WC_REG_MR, |
@@ -1110,7 +1109,6 @@ enum ib_wr_opcode { | |||
1110 | IB_WR_REG_MR, | 1109 | IB_WR_REG_MR, |
1111 | IB_WR_MASKED_ATOMIC_CMP_AND_SWP, | 1110 | IB_WR_MASKED_ATOMIC_CMP_AND_SWP, |
1112 | IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, | 1111 | IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, |
1113 | IB_WR_BIND_MW, | ||
1114 | IB_WR_REG_SIG_MR, | 1112 | IB_WR_REG_SIG_MR, |
1115 | /* reserve values for low level drivers' internal use. | 1113 | /* reserve values for low level drivers' internal use. |
1116 | * These values will not be used at all in the ib core layer. | 1114 | * These values will not be used at all in the ib core layer. |
@@ -1145,23 +1143,6 @@ struct ib_sge { | |||
1145 | u32 lkey; | 1143 | u32 lkey; |
1146 | }; | 1144 | }; |
1147 | 1145 | ||
1148 | /** | ||
1149 | * struct ib_mw_bind_info - Parameters for a memory window bind operation. | ||
1150 | * @mr: A memory region to bind the memory window to. | ||
1151 | * @addr: The address where the memory window should begin. | ||
1152 | * @length: The length of the memory window, in bytes. | ||
1153 | * @mw_access_flags: Access flags from enum ib_access_flags for the window. | ||
1154 | * | ||
1155 | * This struct contains the shared parameters for type 1 and type 2 | ||
1156 | * memory window bind operations. | ||
1157 | */ | ||
1158 | struct ib_mw_bind_info { | ||
1159 | struct ib_mr *mr; | ||
1160 | u64 addr; | ||
1161 | u64 length; | ||
1162 | int mw_access_flags; | ||
1163 | }; | ||
1164 | |||
1165 | struct ib_cqe { | 1146 | struct ib_cqe { |
1166 | void (*done)(struct ib_cq *cq, struct ib_wc *wc); | 1147 | void (*done)(struct ib_cq *cq, struct ib_wc *wc); |
1167 | }; | 1148 | }; |
@@ -1237,19 +1218,6 @@ static inline struct ib_reg_wr *reg_wr(struct ib_send_wr *wr) | |||
1237 | return container_of(wr, struct ib_reg_wr, wr); | 1218 | return container_of(wr, struct ib_reg_wr, wr); |
1238 | } | 1219 | } |
1239 | 1220 | ||
1240 | struct ib_bind_mw_wr { | ||
1241 | struct ib_send_wr wr; | ||
1242 | struct ib_mw *mw; | ||
1243 | /* The new rkey for the memory window. */ | ||
1244 | u32 rkey; | ||
1245 | struct ib_mw_bind_info bind_info; | ||
1246 | }; | ||
1247 | |||
1248 | static inline struct ib_bind_mw_wr *bind_mw_wr(struct ib_send_wr *wr) | ||
1249 | { | ||
1250 | return container_of(wr, struct ib_bind_mw_wr, wr); | ||
1251 | } | ||
1252 | |||
1253 | struct ib_sig_handover_wr { | 1221 | struct ib_sig_handover_wr { |
1254 | struct ib_send_wr wr; | 1222 | struct ib_send_wr wr; |
1255 | struct ib_sig_attrs *sig_attrs; | 1223 | struct ib_sig_attrs *sig_attrs; |
@@ -1299,18 +1267,6 @@ enum ib_mr_rereg_flags { | |||
1299 | IB_MR_REREG_SUPPORTED = ((IB_MR_REREG_ACCESS << 1) - 1) | 1267 | IB_MR_REREG_SUPPORTED = ((IB_MR_REREG_ACCESS << 1) - 1) |
1300 | }; | 1268 | }; |
1301 | 1269 | ||
1302 | /** | ||
1303 | * struct ib_mw_bind - Parameters for a type 1 memory window bind operation. | ||
1304 | * @wr_id: Work request id. | ||
1305 | * @send_flags: Flags from ib_send_flags enum. | ||
1306 | * @bind_info: More parameters of the bind operation. | ||
1307 | */ | ||
1308 | struct ib_mw_bind { | ||
1309 | u64 wr_id; | ||
1310 | int send_flags; | ||
1311 | struct ib_mw_bind_info bind_info; | ||
1312 | }; | ||
1313 | |||
1314 | struct ib_fmr_attr { | 1270 | struct ib_fmr_attr { |
1315 | int max_pages; | 1271 | int max_pages; |
1316 | int max_maps; | 1272 | int max_maps; |
@@ -1845,9 +1801,6 @@ struct ib_device { | |||
1845 | int sg_nents); | 1801 | int sg_nents); |
1846 | struct ib_mw * (*alloc_mw)(struct ib_pd *pd, | 1802 | struct ib_mw * (*alloc_mw)(struct ib_pd *pd, |
1847 | enum ib_mw_type type); | 1803 | enum ib_mw_type type); |
1848 | int (*bind_mw)(struct ib_qp *qp, | ||
1849 | struct ib_mw *mw, | ||
1850 | struct ib_mw_bind *mw_bind); | ||
1851 | int (*dealloc_mw)(struct ib_mw *mw); | 1804 | int (*dealloc_mw)(struct ib_mw *mw); |
1852 | struct ib_fmr * (*alloc_fmr)(struct ib_pd *pd, | 1805 | struct ib_fmr * (*alloc_fmr)(struct ib_pd *pd, |
1853 | int mr_access_flags, | 1806 | int mr_access_flags, |
@@ -2976,42 +2929,6 @@ static inline u32 ib_inc_rkey(u32 rkey) | |||
2976 | } | 2929 | } |
2977 | 2930 | ||
2978 | /** | 2931 | /** |
2979 | * ib_alloc_mw - Allocates a memory window. | ||
2980 | * @pd: The protection domain associated with the memory window. | ||
2981 | * @type: The type of the memory window (1 or 2). | ||
2982 | */ | ||
2983 | struct ib_mw *ib_alloc_mw(struct ib_pd *pd, enum ib_mw_type type); | ||
2984 | |||
2985 | /** | ||
2986 | * ib_bind_mw - Posts a work request to the send queue of the specified | ||
2987 | * QP, which binds the memory window to the given address range and | ||
2988 | * remote access attributes. | ||
2989 | * @qp: QP to post the bind work request on. | ||
2990 | * @mw: The memory window to bind. | ||
2991 | * @mw_bind: Specifies information about the memory window, including | ||
2992 | * its address range, remote access rights, and associated memory region. | ||
2993 | * | ||
2994 | * If there is no immediate error, the function will update the rkey member | ||
2995 | * of the mw parameter to its new value. The bind operation can still fail | ||
2996 | * asynchronously. | ||
2997 | */ | ||
2998 | static inline int ib_bind_mw(struct ib_qp *qp, | ||
2999 | struct ib_mw *mw, | ||
3000 | struct ib_mw_bind *mw_bind) | ||
3001 | { | ||
3002 | /* XXX reference counting in corresponding MR? */ | ||
3003 | return mw->device->bind_mw ? | ||
3004 | mw->device->bind_mw(qp, mw, mw_bind) : | ||
3005 | -ENOSYS; | ||
3006 | } | ||
3007 | |||
3008 | /** | ||
3009 | * ib_dealloc_mw - Deallocates a memory window. | ||
3010 | * @mw: The memory window to deallocate. | ||
3011 | */ | ||
3012 | int ib_dealloc_mw(struct ib_mw *mw); | ||
3013 | |||
3014 | /** | ||
3015 | * ib_alloc_fmr - Allocates a unmapped fast memory region. | 2932 | * ib_alloc_fmr - Allocates a unmapped fast memory region. |
3016 | * @pd: The protection domain associated with the unmapped region. | 2933 | * @pd: The protection domain associated with the unmapped region. |
3017 | * @mr_access_flags: Specifies the memory access rights. | 2934 | * @mr_access_flags: Specifies the memory access rights. |