@@ -184,28 +184,28 @@ struct rds_ib_rx_work {
184
184
struct rds_ib_connection * ic ;
185
185
};
186
186
187
- /* Time (in millisec) to wait before deallocating the RDS connection headers.
188
- */
189
- extern u32 rds_hdrs_free_wait_ms ;
187
+ /* Structure for the DMA headers pool deallocation work */
188
+ struct rds_dma_hdrs_free_wk {
189
+ struct work_struct rdhf_work ;
190
+ struct dma_pool * rdhf_pool ; /* Pool for the headers. */
190
191
191
- /* Structure for storing all the DMA headers */
192
- struct rds_dma_hdrs {
193
192
/* Info of headers for sending. */
194
- struct rds_header * * rdh_snd_hdrs ;
195
- dma_addr_t * rdh_snd_dma_addrs ;
196
- u32 rdh_snd_num_hdrs ;
193
+ struct rds_header * * rdhf_snd_hdrs ;
194
+ dma_addr_t * rdhf_snd_dma_addrs ;
195
+ u32 rdhf_snd_num_hdrs ;
197
196
198
197
/* Info of headers for receiving. */
199
- struct rds_header * * rdh_rcv_hdrs ;
200
- dma_addr_t * rdh_rcv_dma_addrs ;
201
- u32 rdh_rcv_num_hdrs ;
198
+ struct rds_header * * rdhf_rcv_hdrs ;
199
+ dma_addr_t * rdhf_rcv_dma_addrs ;
200
+ u32 rdhf_rcv_num_hdrs ;
202
201
203
202
/* Info of the ACK header. */
204
- struct rds_header * rdh_ack_hdr ;
205
- dma_addr_t rdh_ack_dma_addr ;
203
+ struct rds_header * rdhf_ack_rds_hdr ;
204
+ dma_addr_t rdhf_ack_dma_addr ;
206
205
};
207
206
208
207
struct rds_ib_connection {
208
+
209
209
struct list_head ib_node ;
210
210
struct rds_ib_device * rds_ibdev ;
211
211
struct rds_connection * conn ;
@@ -227,21 +227,11 @@ struct rds_ib_connection {
227
227
struct tasklet_struct i_stasklet ;
228
228
struct tasklet_struct i_rtasklet ;
229
229
230
- struct rds_dma_hdrs i_hdrs ;
231
-
232
- /* Quick access to the fields of struct rds_dma_hdrs */
233
- #define i_send_hdrs i_hdrs.rdh_snd_hdrs
234
- #define i_send_hdrs_dma i_hdrs.rdh_snd_dma_addrs
235
- #define i_send_num_hdrs i_hdrs.rdh_snd_num_hdrs
236
- #define i_recv_hdrs i_hdrs.rdh_rcv_hdrs
237
- #define i_recv_hdrs_dma i_hdrs.rdh_rcv_dma_addrs
238
- #define i_recv_num_hdrs i_hdrs.rdh_rcv_num_hdrs
239
- #define i_ack i_hdrs.rdh_ack_hdr
240
- #define i_ack_dma i_hdrs.rdh_ack_dma_addr
241
-
242
230
/* tx */
243
231
struct rds_ib_work_ring i_send_ring ;
244
232
struct rm_data_op * i_data_op ;
233
+ struct rds_header * * i_send_hdrs ;
234
+ dma_addr_t * i_send_hdrs_dma ;
245
235
struct rds_ib_send_work * i_sends ;
246
236
atomic_t i_signaled_sends ;
247
237
@@ -251,6 +241,8 @@ struct rds_ib_connection {
251
241
struct rds_ib_work_ring i_recv_ring ;
252
242
struct rds_ib_incoming * i_ibinc ;
253
243
u32 i_recv_data_rem ;
244
+ struct rds_header * * i_recv_hdrs ;
245
+ dma_addr_t * i_recv_hdrs_dma ;
254
246
struct rds_ib_recv_work * i_recvs ;
255
247
u64 i_ack_recv ; /* last ACK received */
256
248
struct rds_ib_refill_cache i_cache_incs ;
@@ -264,15 +256,12 @@ struct rds_ib_connection {
264
256
spinlock_t i_ack_lock ; /* protect i_ack_next */
265
257
u64 i_ack_next ; /* next ACK to send */
266
258
#endif
259
+ struct rds_header * i_ack ;
267
260
struct ib_send_wr i_ack_wr ;
268
261
struct ib_sge i_ack_sge ;
262
+ u64 i_ack_dma ;
269
263
unsigned long i_ack_queued ;
270
264
271
- /* Lock for synchronizing with clean up worker */
272
- spinlock_t i_hdrs_lock ;
273
- struct dma_pool * i_saved_hdrs_pool ; /* Pool for the headers. */
274
- struct delayed_work i_hdrs_free_work ;
275
-
276
265
/* Flow control related information
277
266
*
278
267
* Our algorithm uses a pair variables that we need to access
0 commit comments