diff options
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r-- | net/rds/ib.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h index 8be563a1363a..069206cae733 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h | |||
@@ -108,7 +108,12 @@ struct rds_ib_connection { | |||
108 | 108 | ||
109 | /* sending acks */ | 109 | /* sending acks */ |
110 | unsigned long i_ack_flags; | 110 | unsigned long i_ack_flags; |
111 | #ifdef KERNEL_HAS_ATOMIC64 | ||
112 | atomic64_t i_ack_next; /* next ACK to send */ | ||
113 | #else | ||
114 | spinlock_t i_ack_lock; /* protect i_ack_next */ | ||
111 | u64 i_ack_next; /* next ACK to send */ | 115 | u64 i_ack_next; /* next ACK to send */ |
116 | #endif | ||
112 | struct rds_header *i_ack; | 117 | struct rds_header *i_ack; |
113 | struct ib_send_wr i_ack_wr; | 118 | struct ib_send_wr i_ack_wr; |
114 | struct ib_sge i_ack_sge; | 119 | struct ib_sge i_ack_sge; |
@@ -267,9 +272,17 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, | |||
267 | 272 | ||
268 | /* ib_rdma.c */ | 273 | /* ib_rdma.c */ |
269 | int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr); | 274 | int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr); |
270 | int rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); | 275 | void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); |
271 | void rds_ib_remove_nodev_conns(void); | 276 | void rds_ib_remove_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn); |
272 | void rds_ib_remove_conns(struct rds_ib_device *rds_ibdev); | 277 | void __rds_ib_destroy_conns(struct list_head *list, spinlock_t *list_lock); |
278 | static inline void rds_ib_destroy_nodev_conns(void) | ||
279 | { | ||
280 | __rds_ib_destroy_conns(&ib_nodev_conns, &ib_nodev_conns_lock); | ||
281 | } | ||
282 | static inline void rds_ib_destroy_conns(struct rds_ib_device *rds_ibdev) | ||
283 | { | ||
284 | __rds_ib_destroy_conns(&rds_ibdev->conn_list, &rds_ibdev->spinlock); | ||
285 | } | ||
273 | struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *); | 286 | struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *); |
274 | void rds_ib_get_mr_info(struct rds_ib_device *rds_ibdev, struct rds_info_rdma_connection *iinfo); | 287 | void rds_ib_get_mr_info(struct rds_ib_device *rds_ibdev, struct rds_info_rdma_connection *iinfo); |
275 | void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *); | 288 | void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *); |
@@ -355,13 +368,4 @@ rds_ib_data_sge(struct rds_ib_connection *ic, struct ib_sge *sge) | |||
355 | return &sge[1]; | 368 | return &sge[1]; |
356 | } | 369 | } |
357 | 370 | ||
358 | static inline void rds_ib_set_64bit(u64 *ptr, u64 val) | ||
359 | { | ||
360 | #if BITS_PER_LONG == 64 | ||
361 | *ptr = val; | ||
362 | #else | ||
363 | set_64bit(ptr, val); | ||
364 | #endif | ||
365 | } | ||
366 | |||
367 | #endif | 371 | #endif |