hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/rds/ib.h
....@@ -15,8 +15,7 @@
1515
1616 #define RDS_IB_DEFAULT_RECV_WR 1024
1717 #define RDS_IB_DEFAULT_SEND_WR 256
18
-#define RDS_IB_DEFAULT_FR_WR 256
19
-#define RDS_IB_DEFAULT_FR_INV_WR 256
18
+#define RDS_IB_DEFAULT_FR_WR 512
2019
2120 #define RDS_IB_DEFAULT_RETRY_COUNT 1
2221
....@@ -67,7 +66,9 @@
6766 u8 ricpc_protocol_major;
6867 u8 ricpc_protocol_minor;
6968 __be16 ricpc_protocol_minor_mask; /* bitmask */
70
- __be32 ricpc_reserved1;
69
+ u8 ricpc_dp_toss;
70
+ u8 ripc_reserved1;
71
+ __be16 ripc_reserved2;
7172 __be64 ricpc_ack_seq;
7273 __be32 ricpc_credit; /* non-zero enables flow ctl */
7374 };
....@@ -155,7 +156,7 @@
155156
156157 /* To control the number of wrs from fastreg */
157158 atomic_t i_fastreg_wrs;
158
- atomic_t i_fastunreg_wrs;
159
+ atomic_t i_fastreg_inuse_count;
159160
160161 /* interrupt handling */
161162 struct tasklet_struct i_send_tasklet;
....@@ -164,8 +165,8 @@
164165 /* tx */
165166 struct rds_ib_work_ring i_send_ring;
166167 struct rm_data_op *i_data_op;
167
- struct rds_header *i_send_hdrs;
168
- dma_addr_t i_send_hdrs_dma;
168
+ struct rds_header **i_send_hdrs;
169
+ dma_addr_t *i_send_hdrs_dma;
169170 struct rds_ib_send_work *i_sends;
170171 atomic_t i_signaled_sends;
171172
....@@ -174,8 +175,8 @@
174175 struct rds_ib_work_ring i_recv_ring;
175176 struct rds_ib_incoming *i_ibinc;
176177 u32 i_recv_data_rem;
177
- struct rds_header *i_recv_hdrs;
178
- dma_addr_t i_recv_hdrs_dma;
178
+ struct rds_header **i_recv_hdrs;
179
+ dma_addr_t *i_recv_hdrs_dma;
179180 struct rds_ib_recv_work *i_recvs;
180181 u64 i_ack_recv; /* last ACK received */
181182 struct rds_ib_refill_cache i_cache_incs;
....@@ -219,6 +220,7 @@
219220 /* Send/Recv vectors */
220221 int i_scq_vector;
221222 int i_rcq_vector;
223
+ u8 i_sl;
222224 };
223225
224226 /* This assumes that atomic_t is at least 32 bits */
....@@ -244,12 +246,11 @@
244246 struct list_head conn_list;
245247 struct ib_device *dev;
246248 struct ib_pd *pd;
247
- bool use_fastreg;
249
+ u8 odp_capable:1;
248250
249251 unsigned int max_mrs;
250252 struct rds_ib_mr_pool *mr_1m_pool;
251253 struct rds_ib_mr_pool *mr_8k_pool;
252
- unsigned int fmr_max_remaps;
253254 unsigned int max_8k_mrs;
254255 unsigned int max_1m_mrs;
255256 int max_sge;
....@@ -262,7 +263,6 @@
262263 int *vector_load;
263264 };
264265
265
-#define ibdev_to_node(ibdev) dev_to_node((ibdev)->dev.parent)
266266 #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
267267
268268 /* bits for i_ack_flags */
....@@ -331,10 +331,8 @@
331331 unsigned int i;
332332
333333 for_each_sg(sglist, sg, sg_dma_len, i) {
334
- ib_dma_sync_single_for_cpu(dev,
335
- ib_sg_dma_address(dev, sg),
336
- ib_sg_dma_len(dev, sg),
337
- direction);
334
+ ib_dma_sync_single_for_cpu(dev, sg_dma_address(sg),
335
+ sg_dma_len(sg), direction);
338336 }
339337 }
340338 #define ib_dma_sync_sg_for_cpu rds_ib_dma_sync_sg_for_cpu
....@@ -348,10 +346,8 @@
348346 unsigned int i;
349347
350348 for_each_sg(sglist, sg, sg_dma_len, i) {
351
- ib_dma_sync_single_for_device(dev,
352
- ib_sg_dma_address(dev, sg),
353
- ib_sg_dma_len(dev, sg),
354
- direction);
349
+ ib_dma_sync_single_for_device(dev, sg_dma_address(sg),
350
+ sg_dma_len(sg), direction);
355351 }
356352 }
357353 #define ib_dma_sync_sg_for_device rds_ib_dma_sync_sg_for_device
....@@ -383,7 +379,6 @@
383379 int rds_ib_cm_initiate_connect(struct rdma_cm_id *cm_id, bool isv6);
384380 void rds_ib_cm_connect_complete(struct rds_connection *conn,
385381 struct rdma_cm_event *event);
386
-
387382
388383 #define rds_ib_conn_error(conn, fmt...) \
389384 __rds_ib_conn_error(conn, KERN_WARNING "RDS/IB: " fmt)