author | pkidd <patrick.kidd@oracle.com> |
Thu, 01 Dec 2016 09:15:00 -0800 | |
branch | s11u3-sru |
changeset 7423 | a17eef087a5e |
parent 6322 | c8b38df3868d |
permissions | -rw-r--r-- |
6322
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
1 |
#This patch was developed both in-house and from outside. We plan to submit it |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
2 |
#upstream, but do not yet have a target date for doing so |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
3 |
# |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
4 |
# HG changeset patch |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
5 |
# Parent bed9e1f4976b9258363d26ec587075f77ac65042 |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
6 |
22689609 qperf returns failed to receive results: timed out for ud_bw tests |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
7 |
|
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
8 |
diff -r bed9e1f4976b src/rdma.c |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
9 |
--- a/src/rdma.c Thu Feb 11 05:13:36 2016 -0800 |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
10 |
+++ b/src/rdma.c Tue Feb 23 21:03:12 2016 -0800 |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
11 |
@@ -987,9 +987,14 @@ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
12 |
{ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
13 |
DEVICE dev; |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
14 |
|
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
15 |
- rd_open(&dev, transport, 0, NCQE); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
16 |
+ /* |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
17 |
+ * Post more receive buffers for the server, A fast client can cause receive WR |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
18 |
+ * exhaustion, which in turn can cause packet drop (in case of UD) or cause |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
19 |
+ * re-transmits (in case of RC). |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
20 |
+ */ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
21 |
+ rd_open(&dev, transport, 0, (4 * NCQE)); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
22 |
rd_prep(&dev, 0); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
23 |
- rd_post_recv_std(&dev, NCQE); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
24 |
+ rd_post_recv_std(&dev, (4 * NCQE)); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
25 |
sync_test(); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
26 |
while (!Finished) { |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
27 |
int i; |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
28 |
@@ -2574,6 +2579,14 @@ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
29 |
{ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
30 |
int n; |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
31 |
|
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
32 |
+ /* |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
33 |
+ * We will attempt to poll the CQ first. |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
34 |
+ * If CQ is empty we could wait for CQ notification. |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
35 |
+ */ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
36 |
+ n = ibv_poll_cq(dev->cq, nwc, wc); |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
37 |
+ if (n > 0) |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
38 |
+ return n; |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
39 |
+ |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
40 |
if (!Req.poll_mode && !Finished) { |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
41 |
void *ectx; |
c8b38df3868d
PSARC/2016/109 Solaris OFED (OFUV) Version 3.18 and other updates
boris.chiu@oracle.com
parents:
diff
changeset
|
42 |
struct ibv_cq *ecq; |