diff options
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r-- | net/rds/ib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h index 9bb7a7412a44..2efd9d11e7d4 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #define RDS_IB_SUPPORTED_PROTOCOLS 0x00000003 /* minor versions supported */ | 22 | #define RDS_IB_SUPPORTED_PROTOCOLS 0x00000003 /* minor versions supported */ |
23 | 23 | ||
24 | #define RDS_IB_RECYCLE_BATCH_COUNT 32 | ||
25 | |||
24 | extern struct list_head rds_ib_devices; | 26 | extern struct list_head rds_ib_devices; |
25 | 27 | ||
26 | /* | 28 | /* |
@@ -30,14 +32,27 @@ extern struct list_head rds_ib_devices; | |||
30 | */ | 32 | */ |
31 | struct rds_page_frag { | 33 | struct rds_page_frag { |
32 | struct list_head f_item; | 34 | struct list_head f_item; |
35 | struct list_head f_cache_entry; | ||
33 | struct scatterlist f_sg; | 36 | struct scatterlist f_sg; |
34 | }; | 37 | }; |
35 | 38 | ||
36 | struct rds_ib_incoming { | 39 | struct rds_ib_incoming { |
37 | struct list_head ii_frags; | 40 | struct list_head ii_frags; |
41 | struct list_head ii_cache_entry; | ||
38 | struct rds_incoming ii_inc; | 42 | struct rds_incoming ii_inc; |
39 | }; | 43 | }; |
40 | 44 | ||
45 | struct rds_ib_cache_head { | ||
46 | struct list_head *first; | ||
47 | unsigned long count; | ||
48 | }; | ||
49 | |||
50 | struct rds_ib_refill_cache { | ||
51 | struct rds_ib_cache_head *percpu; | ||
52 | struct list_head *xfer; | ||
53 | struct list_head *ready; | ||
54 | }; | ||
55 | |||
41 | struct rds_ib_connect_private { | 56 | struct rds_ib_connect_private { |
42 | /* Add new fields at the end, and don't permute existing fields. */ | 57 | /* Add new fields at the end, and don't permute existing fields. */ |
43 | __be32 dp_saddr; | 58 | __be32 dp_saddr; |
@@ -104,6 +119,8 @@ struct rds_ib_connection { | |||
104 | u64 i_recv_hdrs_dma; | 119 | u64 i_recv_hdrs_dma; |
105 | struct rds_ib_recv_work *i_recvs; | 120 | struct rds_ib_recv_work *i_recvs; |
106 | u64 i_ack_recv; /* last ACK received */ | 121 | u64 i_ack_recv; /* last ACK received */ |
122 | struct rds_ib_refill_cache i_cache_incs; | ||
123 | struct rds_ib_refill_cache i_cache_frags; | ||
107 | 124 | ||
108 | /* sending acks */ | 125 | /* sending acks */ |
109 | unsigned long i_ack_flags; | 126 | unsigned long i_ack_flags; |
@@ -304,6 +321,8 @@ void rds_ib_flush_mrs(void); | |||
304 | int __init rds_ib_recv_init(void); | 321 | int __init rds_ib_recv_init(void); |
305 | void rds_ib_recv_exit(void); | 322 | void rds_ib_recv_exit(void); |
306 | int rds_ib_recv(struct rds_connection *conn); | 323 | int rds_ib_recv(struct rds_connection *conn); |
324 | int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic); | ||
325 | void rds_ib_recv_free_caches(struct rds_ib_connection *ic); | ||
307 | int rds_ib_recv_refill(struct rds_connection *conn, int prefill); | 326 | int rds_ib_recv_refill(struct rds_connection *conn, int prefill); |
308 | void rds_ib_inc_free(struct rds_incoming *inc); | 327 | void rds_ib_inc_free(struct rds_incoming *inc); |
309 | int rds_ib_inc_copy_to_user(struct rds_incoming *inc, struct iovec *iov, | 328 | int rds_ib_inc_copy_to_user(struct rds_incoming *inc, struct iovec *iov, |