xref: /NextBSD/contrib/ofed/libcxgb4/ChangeLog (revision 4bf303e5af1834cdd3092175eeca7676420229c4)
1commit 6a417d903b9add7c8ab2b71ac11c85c46671e020
2Author: Steve Wise <swise@opengridcomputing.com>
3Date:   Thu Jul 31 11:25:22 2014 -0500
4
5    Spin release 1.3.5.
6
7    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
8
9commit 52ecbea1b908d3b449022e2d75ebe0ca3885bcf2
10Author: Steve Wise <swise@opengridcomputing.com>
11Date:   Thu Jul 31 11:14:05 2014 -0500
12
13    libcxb4: use wc_wmb() instead of wmb().
14
15    The user mode RDMA macro for wmb() is not sufficient to provide the
16    fencing needed.  This was causing corrupted packets when running multiple
17    WD-UDP sockperf processes.  The correct "sfence" instruction is provided
18    with the wc_wmb() macro.  See /usr/include/infiniband/arch.h.
19
20    Note:  The kernel implementation of wmb() is sufficient.  This is a
21    libcxgb4 issue only...
22
23    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
24
25commit 242c29715372bf6999aa343a5aad5654da3ecf3a
26Author: Steve Wise <swise@opengridcomputing.com>
27Date:   Wed Jun 18 10:17:00 2014 -0500
28
29    Spin release 1.3.4
30
31    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
32
33commit 2d54f4c5604cae24caac493aaf6d8b0907ac2ed2
34Author: Steve Wise <swise@opengridcomputing.com>
35Date:   Wed Jun 18 10:16:52 2014 -0500
36
37    Support the query_qp() verb
38
39    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
40
41commit f80159d12148774646ad65d03cd070f6d5f86eb4
42Author: Steve Wise <swise@opengridcomputing.com>
43Date:   Mon Jun 9 15:20:47 2014 -0500
44
45    Account for the full qid range.
46
47    The total qid range is should really be based on the max_cq attribute.
48
49    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
50
51commit 5aaf5e7277a1c12964aac11a4cff94520717e805
52Author: Yann Droneaud <ydroneaud@opteya.com>
53Date:   Mon May 5 12:59:23 2014 -0500
54
55    kernel abi: adds explicit padding in struct c4iw_alloc_ucontext_resp
56
57    i386 ABI disagree with most other ABIs regarding alignment
58    of data type larger than 4 bytes: on most ABIs a padding must
59    be added at end of the structures, while it is not
60    required on i386.
61
62    Such ABI disagreement will make an x86_64 kernel try to write past
63    the struct c4iw_alloc_ucontext_resp buffer provided by an i386
64    userspace binary. As struct c4iw_alloc_ucontext_resp is likely
65    on stack, see function c4iw_alloc_context(), side effects are
66    expected.
67
68    On kernel side, this structure was modified for kernel v3.15-rc1
69    by following commit:
70
71      Commit 05eb23893c2cf9502a9cec0c32e7f1d1ed2895c8
72      Author: Steve Wise <swise@opengridcomputing.com>
73      Date:   Fri Mar 14 21:52:08 2014 +0530
74
75          cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes
76
77    If boundary check is implemented on kernel side, the x86_64
78    kernel will instead refuse to write past the i386 userspace
79    provided buffer and the uverbs will fail.
80
81    To fix these issues, this patch adds an explicit padding at end
82    of structure so that i386 and others ABI share the same structure
83    layout. This patch makes c4iw_alloc_context() check for a value
84    in the padding field to detect newer kernel using the field for
85    a future purpose (only activated in debug).
86
87    With this patch, libcxgb4 will work against older kernel and
88    newer patched kernel.
89
90    Link: http://marc.info/?i=cover.1399216475.git.ydroneaud@opteya.com
91    Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
92    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
93
94commit 5c65bf17913949368db8802656dc7dbc291271ed
95Author: Yann Droneaud <ydroneaud@opteya.com>
96Date:   Mon May 5 12:59:23 2014 -0500
97
98    kernel abi: adds explicit padding in struct c4iw_create_cq_resp
99
100    i386 ABI disagree with most other ABIs regarding alignment
101    of data type larger than 4 bytes: on most ABIs a padding must
102    be added at end of the structures, while it is not required
103    on i386.
104
105    Such ABI disagreement will make an x86_64 kernel try to write past
106    the struct c4iw_create_cq_resp buffer provided by an i386
107    userspace binary. As struct c4iw_create_cq_resp is likely
108    on stack, see function c4iw_create_cq(), side effects are
109    expected.
110
111    On kernel side, this structure was added for kernel v2.6.35-rc1
112    by following commit.
113
114      Commit cfdda9d764362ab77b11a410bb928400e6520d57
115      Author: Steve Wise <swise@opengridcomputing.com>
116      Date:   Wed Apr 21 15:30:06 2010 -0700
117
118          RDMA/cxgb4: Add driver for Chelsio T4 RNIC
119
120    If boundary check is implemented on kernel side, the x86_64 kernel
121    will refuse to write past the i386 userspace provided buffer and the
122    uverbs will fail.
123
124    To fix these issues, this patch adds an explicit padding at end
125    of structure so that i386 and others ABI share the same structure
126    layout. This patch makes c4iw_create_cq() check for a value in the
127    padding field to detect newer kernel using the field for a future
128    purpose (only activated in debug).
129
130    With this patch, libcxgb4 will work against older kernel and
131    newer patched kernel.
132
133    Link: http://marc.info/?i=cover.1399216475.git.ydroneaud@opteya.com
134
135    Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
136    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
137
138commit 4f334446f63e3a34006f504f7c89075423c412b4
139Author: Steve Wise <swise@opengridcomputing.com>
140Date:   Tue Mar 11 11:47:19 2014 -0500
141
142    Spin release 1.3.3.
143
144    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
145
146commit 98cea522707232b99ff5c07dd9f57937aa8a7d91
147Author: Steve Wise <swise@opengridcomputing.com>
148Date:   Tue Mar 11 11:44:16 2014 -0500
149
150    Zero the status_page_size before calling get_context.
151
152    Signed-off-by: Steve Wise <swise@opengridcomuting.com>
153
154commit a373e16a94524e20492301b0e97f53930133739b
155Author: Steve Wise <swise@opengridcomputing.com>
156Date:   Tue Feb 18 12:07:19 2014 -0600
157
158    Spin release 1.3.2.
159
160    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
161
162commit a2f25730971e8b76033e283f03e79ef4c5dbc4bc
163Author: Steve Wise <swise@opengridcomputing.com>
164Date:   Tue Feb 18 11:29:50 2014 -0600
165
166    Fixed compilation error with debug enabled.
167
168    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
169
170commit f484e0f4c5a4cb249f86a050efd659be37a51204
171Author: Steve Wise <swise@opengridcomputing.com>
172Date:   Tue Feb 18 11:24:06 2014 -0600
173
174    Use V_PIDX_T5() for T5 devices in ring_db funcs.
175
176    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
177
178commit 32b74074808da51e5918295bfc63d347548478a0
179Author: Steve Wise <swise@opengridcomputing.com>
180Date:   Tue Feb 18 11:24:05 2014 -0600
181
182    Call wc_wmb() needed after DB writes.
183
184    Need to do an sfence after botht he WC and regular PIDX DB write.
185    Otherwise the host might reorder things and cause work request corruption
186    (seen with NFSRDMA).
187
188    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
189
190commit c078eed091a32b930f5bbdf0a12a3be0d0a79cf0
191Author: Steve Wise <swise@opengridcomputing.com>
192Date:   Tue Feb 18 11:23:57 2014 -0600
193
194    Call rmb() after reading valid gen bit.
195
196    Some HW platforms can reorder read operations, so we must rmb() after
197    we see a valid gen bit in a CQE but before we read any other fields
198    from the CQE.
199
200    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
201
202commit 7b482dcdbbd187fd8372f744157ac2b323d32f45
203Author: Steve Wise <swise@opengridcomputing.com>
204Date:   Tue Feb 18 11:12:06 2014 -0600
205
206    Update copyrights.
207
208    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
209
210commit f74316373c0b2a2bd2872ae38f7be516a10503c9
211Author: Steve Wise <swise@opengridcomputing.com>
212Date:   Tue Feb 18 11:12:06 2014 -0600
213
214    Refresh t4 fw/hw reg files.
215
216    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
217
218commit 1b8434f22deb30f700246dd2f474eaa2512e4867
219Author: Steve Wise <swise@opengridcomputing.com>
220Date:   Tue Feb 18 11:12:03 2014 -0600
221
222    Add common device id table and chip types.
223
224    This will make it easier to merge in new devices.
225
226commit 18e5bc32bbe7e19eb9ea5a34d8b2f7d1e6355105
227Author: Steve Wise <swise@opengridcomputing.com>
228Date:   Tue Feb 18 10:25:33 2014 -0600
229
230    Remove dead SIM code.
231
232    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
233
234commit c8c793385de1d3e9c1edeb7b13cbc964049b8362
235Author: Steve Wise <swise@opengridcomputing.com>
236Date:   Tue Feb 18 10:23:05 2014 -0600
237
238    Remove dead raw qp code.
239
240    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
241
242commit 9302c092d46e4c40cbf6b2189aeda08e5ca3fea4
243Author: Steve Wise <swise@opengridcomputing.com>
244Date:   Tue Feb 18 10:17:52 2014 -0600
245
246    iw_cxgb4/libcxgb4: swsq "signaled" state needs to mind sq_sig_all.
247
248    When a qp is created, the ULP can request that all sq wrs be signaled.
249    The swsqe entries need to take this into account when marking the entry
250    as signaled.
251
252    This bug will cause read request CQEs to be silently discarded, and can
253    cause flush problems because the swsqe entry will be mismarked for qps
254    created with sq_sig_all set in the qp init attributes.
255
256    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
257
258commit 48c6633d4a6510a8c1832ac800f45c2099eb28b4
259Author: Steve Wise <swise@opengridcomputing.com>
260Date:   Tue Feb 18 10:17:52 2014 -0600
261
262    never consume a pending wr in sq flush.
263
264    There is a race when moving a QP from RTS->CLOSING where a SQ work
265    request could be posted after the FW receives the RDMA_RI/FINI WR.
266    The SQ work request will never get processed, and should be completed
267    with FLUSHED status.  Function c4iw_flush_sq(), however was dropping
268    the oldest SQ work request when in CLOSING or IDLE states, instead of
269    completing the pending work request. If that oldest pending work request
270    was actually complete and has a CQE in the CQ, then when that CQE is
271    proceessed in poll_cq, we'll BUG_ON() due to the inconsistent SQ/CQ state.
272
273    This is a very small timing hole and has only been hit once so far.
274
275    c4iw_flush_sq() MUST always flush all non-completed WRs with FLUSHED
276    status regardless of the QP state.
277
278    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
279
280commit 1a3a3e8e8da7463e59b74d5c5396e7bd5e303cd4
281Author: Steve Wise <swise@opengridcomputing.com>
282Date:   Tue Feb 18 10:11:35 2014 -0600
283
284    unmap status page when freeing the context.
285
286    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
287
288commit 81e83780e44af2ff25c2572b15fe7e8b8cc6e134
289Author: Steve Wise <swise@opengridcomputing.com>
290Date:   Tue Feb 18 10:05:54 2014 -0600
291
292    DB Drop Avoidance, Version 2.
293
294    Add support for the device status page mapped per device that is used
295    to enable/disable user db usage.
296
297    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
298
299commit 5830447cef866432c4d3e65f7e58c51a0c687798
300Author: Steve Wise <swise@opengridcomputing.com>
301Date:   Tue Feb 18 09:40:39 2014 -0600
302
303    Fix DEBUG code in c4iw_flush_hw_cq().
304
305    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
306
307commit 127bc437797ca34e14b261fa653c1d0524d07272
308Author: Steve Wise <swise@opengridcomputing.com>
309Date:   Tue Feb 18 09:40:38 2014 -0600
310
311    T4 onchip workaround: do the 16 4B MA writes just before DB ring.
312
313    This is a merge of sw repo changesets 1576, 2149, and 2246.
314
315    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
316
317commit ac38281728d12a91725aa67e0273dc26976598fb
318Author: Steve Wise <swise@opengridcomputing.com>
319Date:   Fri Jul 19 09:37:10 2013 -0500
320
321    Spin release 1.3.1.
322
323    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
324
325commit 272fcac194318e13f563b46463726cc03ae83dbe
326Author: Steve Wise <swise@opengridcomputing.com>
327Date:   Fri Jul 19 09:36:35 2013 -0500
328
329    Update copyright.
330
331    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
332
333commit ba3183d18168f764700ded52651033a79d2a9a86
334Author: Steve Wise <swise@opengridcomputing.com>
335Date:   Mon Jun 10 14:10:02 2013 -0500
336
337    get rid of hard coded queue iqs.
338
339    Since we now get the number of queues available from the driver,
340    we shouldn't be using the hard coded defines anymore.
341
342    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
343
344commit 2095e0a04bc5357da1b9d346e00d52cf7c236cf6
345Author: Steve Wise <swise@opengridcomputing.com>
346Date:   Mon Jun 10 14:09:35 2013 -0500
347
348    update configure.in
349
350    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
351
352commit a7a4de4f37a60ffbd8addd8f9ab5505adb86c63f
353Author: Steve Wise <swise@opengridcomputing.com>
354Date:   Mon Jun 10 14:09:34 2013 -0500
355
356    Mind the sq_sig_all/sq_sig_type QP attributes.
357
358    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
359
360commit 4a485c8dc1c7c70ab85c708bb4c530eef385424d
361Author: Steve Wise <swise@opengridcomputing.com>
362Date:   Mon Jun 10 14:09:34 2013 -0500
363
364    always do GTS write if cidx_inc == M_CIDXINC.
365
366    When polling, we do a GTS update if the accumulated cidx_inc == the cq
367    depth / 16.  This works around a T4 bug.  However, if the cq is large
368    enough, cq depth / 16 exceeds the size of the field in the GTS word.
369    So we also need to update if cidx_inc hits M_CIDXINC to avoid overflowing
370    the field.
371
372    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
373
374commit a276f65add45933cf8b16bb09361786cf1932c4b
375Author: Steve Wise <swise@opengridcomputing.com>
376Date:   Mon Jun 10 14:09:34 2013 -0500
377
378    fixed bug where sq.udb was getting overwritten.
379
380    There was an erroneous statement in create_rc_qp() which caused the
381    sq.udb va to be overwritten with the rq.udb va only for on-chip queues.
382    This error only affected unmapping of that mapped va when destroying
383    a qp.  In the presence of multiple threads creating/destroying qps, the
384    erroneously unmapped va could have been assigned to another qp mapping.
385    This causes intermittent seg faults as libcxgb4 tries to access memory
386    that has been unmapped in error.
387
388    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
389
390commit 1cb6249cf722e265d8e2364de0ee5b0d59a8e4cd
391Author: Steve Wise <swise@opengridcomputing.com>
392Date:   Mon Jun 10 14:09:34 2013 -0500
393
394    flush problem with unsignaled wrs.
395
396    c4iw_flush_sq() should only flush wrs that have not already been
397    flushed. Since we already track where in the sq we've flushed via
398    sq.cidx_flush, just start at that point and flush any remaining.  This bug
399    only caused a problem in the presence of unsignaled work requests.
400
401    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
402
403commit 4132e3434d8ffc2b92055649f42c56be77111216
404Author: Steve Wise <swise@opengridcomputing.com>
405Date:   Mon Jun 10 14:09:31 2013 -0500
406
407    clean up queue dump logic.
408
409    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
410
411commit a5e390613548f1dc62d9fe142b6a30a943fc56cf
412Author: Steve Wise <swise@opengridcomputing.com>
413Date:   Tue Jun 4 12:09:21 2013 -0500
414
415    accounting for unsignled sq wrs fails to deal with wrap.
416
417    When determining how many wrs are completed with a signaled cqe,
418    correctly deal with queue wraps.
419
420    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
421
422commit 0c1906cec82443e2323dc69dd5c23ae4314087c0
423Author: Steve Wise <swise@opengridcomputing.com>
424Date:   Tue Jun 4 12:09:19 2013 -0500
425
426    Handle qp flushes with pending sw cqes.
427
428    The flush and out of order completion logic has a bug:  If out of order
429    completions are flushed but not yet polled by the consumer and the qp
430    is then flushed, we end up inserting duplicate completions.
431
432    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
433
434commit 26a19bf6d020dbaab8c6cf13396b39a64f952dba
435Author: Steve Wise <swise@opengridcomputing.com>
436Date:   Tue Jun 4 11:57:00 2013 -0500
437
438    fixed false uninitialized var warning.
439
440    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
441
442commit 119e11e72d20a07a806c3385b8cfa6de93f7d114
443Author: Steve Wise <swise@opengridcomputing.com>
444Date:   Thu Mar 28 15:15:39 2013 -0500
445
446    Spin release 1.3.0
447
448    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
449
450commit a4a0d3fe768ffa33a75ab3df4bd8c678e7f7180b
451Author: Steve Wise <swise@opengridcomputing.com>
452Date:   Thu Mar 28 15:15:38 2013 -0500
453
454    Remove aclocal.m4.
455
456    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
457
458commit 3c22ddca7cf627d62d06b0ff374fa04192a8cc4c
459Author: Steve Wise <swise@opengridcomputing.com>
460Date:   Thu Mar 28 15:15:37 2013 -0500
461
462    libcxgb4: unmap the correct udb/ugts address.
463
464        The various db and gts variables holding the mapped bar2 pointer
465        get incremented at creation time as a normal part of object creation.
466        However this causes the wrong address to get unmapped when the object is
467        destroyed.  The result is a mapping leak because the munmap() fails.
468        So align them back to their proper page boundary when calling munmap().
469
470    Singed-off-by: Steve Wise <swise@opengridcomputing.com>
471
472commit 9b2d3af5735e4067b83cde79e08a37142e8fb895
473Author: Steve Wise <swise@opengridcomputing.com>
474Date:   Thu Mar 28 15:15:35 2013 -0500
475
476    Query device to get the max supported stags, qps, and cqs.
477
478    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
479
480commit e8a595da9129d650caf162b7103368af03e07fcc
481Author: Steve Wise <swise@opengridcomputing.com>
482Date:   Thu Mar 28 15:15:33 2013 -0500
483
484    Add T5 support.
485
486    This commit is composed of a series of patches to enable T5 support.  I
487    folded them into one commit for simplicity.  Plus intermittent patches
488    caused problems/regressions/etc, so its cleaner to have 1 commit to enable
489    the new device.
490
491    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
492    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
493
494commit 7cb73aba54eb47d6902c9a3f952c0e37500cac8f
495Author: Steve Wise <swise@opengridcomputing.com>
496Date:   Mon Mar 4 10:28:32 2013 -0600
497
498    zero out r3 and r4 fields of fw_ri_send_wr messages.
499
500    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
501
502commit f61c762e82b3e6e1c27496eecaf2bf8d00f009e3
503Author: Steve Wise <swise@opengridcomputing.com>
504Date:   Mon Mar 4 10:21:39 2013 -0600
505
506    Add new T4 device IDs.
507
508    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
509
510commit c66a627e1e964bad794e9dc40e9a39dc6977aa1e
511Author: Steve Wise <swise@opengridcomputing.com>
512Date:   Mon Mar 4 10:08:59 2013 -0600
513
514    flush bug can cause application crash
515
516    This fixes a problem in the flush logic that could occur if the
517    current position is near the end of the queue and the 'count' being
518    retired plus this position was greater than the queue size. In this
519    case the index wasn't being wrapped and the associated swcqe pointer
520    would point past the end of the CQ.
521
522    Asserts were added to check other possible wrap-error paths.
523
524    This bug was causing mbw to occasionally crash when flushing the qp.
525
526    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
527
528commit c5cdab8ad79cecc996d735011b210729fcc95ecd
529Author: Steve Wise <swise@opengridcomputing.com>
530Date:   Mon Mar 4 10:08:58 2013 -0600
531
532    Silently eat unsignaled read response cqes.
533
534    Terminator HW always generates read response cqes.  We need to silently
535    eat them vs returning them to the user.  The perftest benchmark ib_read_bw
536    relies on unsignaled work requests and will crash with this fix.
537
538    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
539
540commit 1eefdaae19110deae2c20a08ea53cab451fc00bb
541Author: Steve Wise <swise@opengridcomputing.com>
542Date:   Fri Feb 8 13:51:37 2013 -0600
543
544    Remove useless dma_addr_t define.
545
546    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
547
548commit c551f4632cfcd284ad82d1d9b36d1449d109a5de
549Author: Steve Wise <swise@opengridcomputing.com>
550Date:   Fri Feb 8 13:51:00 2013 -0600
551
552    Disable strict aliasing warnings.
553
554    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
555
556commit 695a5a4be21f44d49999c83e6ac0699ce90d97c7
557Author: Steve Wise <swise@opengridcomputing.com>
558Date:   Wed Nov 9 09:50:32 2011 -0600
559
560    Spin release 1.2.0.
561
562    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
563
564commit 721cfb11ca5697d017bc60167805aea9bbb13ba0
565Author: Vipul Pandya <vipul@chelsio.com>
566Date:   Mon Nov 7 15:08:45 2011 +0530
567
568    libcxgb4: Reset flush_cidx before incrementing cidx.
569
570    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
571
572commit db4fe38c7ee2b3ad9dc8c33f2b54f0c8cdf8b4d2
573Author: Vipul Pandya <vipul@chelsio.com>
574Date:   Mon Nov 7 15:06:29 2011 +0530
575
576    libcxgb4: Fix multi-flush logic path....again
577
578    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
579
580commit 19198bdc2f7feb05babcc2a544ae8b48e4943c41
581Author: Vipul Pandya <vipul@chelsio.com>
582Date:   Mon Nov 7 15:02:57 2011 +0530
583
584    libcxgb4: Reset cidx_flush if a active queue starts getting hw cqes
585
586    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
587
588commit 98545f3a8cbe1670efad080cf908db42269f76ff
589Author: Vipul Pandya <vipul@chelsio.com>
590Date:   Mon Nov 7 14:56:44 2011 +0530
591
592    libcxgb4: Support for flushing a CQ bound to multiple QPs
593
594    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
595
596commit 86ba968706b3dc8cb232a303201bb03a2d919c88
597Author: Vipul Pandya <vipul@chelsio.com>
598Date:   Mon Nov 7 13:06:43 2011 +0530
599
600    libcxgb4: Checks iw_cxgb4 ABI version to know door bell drop recovery support
601
602    Store iw_cxgb4 ABI version in a global state. Read that global state in
603    t4_wq_db_enabled to know if iw_cxgb4 driver supports door bell drop recovery.
604
605    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
606
607commit 2b6563ed5b377dac56c218b809d387089d70312d
608Author: Vipul Pandya <vipul@chelsio.com>
609Date:   Sun Oct 23 16:50:16 2011 +0530
610
611    libcxgb4: fixed compilation warnings
612
613    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
614
615commit c5c120969c22a04d34adc566085192afc99d0db9
616Author: Vipul Pandya <vipul@chelsio.com>
617Date:   Fri Oct 21 19:05:20 2011 +0530
618
619    libcxgb4: Bug Fix#4410 - Fix 3 segfaults
620
621    This patch fixes 3 segfaults with below signatures:
622    ----
623    1)
624    Program received signal SIGSEGV, Segmentation fault.
625    [Switching to Thread 0x7ffff7fef710 (LWP 22624)]
626    0x00007ffff75613e4 in create_read_req_cqe (wq=0x7fffe800ada0,
627    hw_cqe=0x7ffff7fc7880, read_cqe=0x7ffff7fee860) at src/cq.c:162
628    162             read_cqe->u.rdma.u.scqe.cidx = wq->sq.oldest_read->idx;
629    (gdb) bt
630    hw_cqe=0x7ffff7fc7880, read_cqe=0x7ffff7fee860) at src/cq.c:162
631    attr=0x7ffff7feeae0, attr_mask=1) at src/verbs.c:691
632    src/verbs.c:721
633
634    2)
635    Program received signal SIGSEGV, Segmentation fault.
636    [Switching to Thread 0x7ffff6e07710 (LWP 22218)]
637    0x00007ffff71563e4 in create_read_req_cqe (wq=0x7fffe800ada0,
638    hw_cqe=0x7ffff7fc7880, read_cqe=0x7ffff6e02b70) at src/cq.c:162
639    162             read_cqe->u.rdma.u.scqe.cidx = wq->sq.oldest_read->idx;
640    (gdb) bt
641    hw_cqe=0x7ffff7fc7880, read_cqe=0x7ffff6e02b70) at src/cq.c:162
642    src/verbs.c:887
643
644    3)
645    (gdb) bt
646    wc=0x7ffff51378d0) at src/cq.c:776
647    evd_ptr=<value optimized out>, wc_ptr=<value optimized out>)
648        at /usr/include/infiniband/verbs.h:957
649    ----
650
651    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
652
653commit 075adec1159606303b40f4b29ef3cea7ab780ac2
654Author: Vipul Pandya <vipul@chelsio.com>
655Date:   Fri Oct 21 18:59:16 2011 +0530
656
657    libcxgb4: return -ENOSYS in c4iw_resize_cq().
658
659    I fixed a "bug" in c4iw_resize_cq() in an earlier commit which regressed
660    us.  c4iw_resize_cq() was returning 0 always even though we don't support
661    resizing the CQ.  So I change libcxgb4 to return whatever errno is
662    returned by the kernel driver.   However, because the driver didn't set
663    the uverbs capabilities for resize_cq, uverbs returned EINVAL.  The OMPI
664    code checks for -ENOSYS and handles providers that don't support it.
665    If, however, ibv_resize_cq() returns any other error, OMPI bails out.
666    So we need to return -ENOSYS.
667
668    I didn't see this error, however, running NP192 OMPI/IMB all night long.
669    So it must only try to resize for small jobs and thus I missed the
670    regression.
671
672    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
673
674commit 320285a3a3a93a614e24a78f7a68780d7791e3c5
675Author: Vipul Pandya <vipul@chelsio.com>
676Date:   Fri Oct 21 18:53:47 2011 +0530
677
678    libcxgb4: Don't flush unsignaled WRs if the QP closed normally
679
680    - add query_qp support in driver to query the qp state before flushing.
681
682    - fixed flush logic (again).
683
684    - don't flush unsignaled WRs is QP had a normal close.
685
686    - support up to 64K QIDs.
687
688    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
689
690commit 4c98bebe97aeef1c5cda2f071eb9c1d4fa29c37e
691Author: Vipul Pandya <vipul@chelsio.com>
692Date:   Fri Oct 21 17:58:38 2011 +0530
693
694    libcxgb4: Correctly flush unsignaled WRs followed by a signaled WR.
695
696    The cq flush logic was not accounting for unsignaled SQ WRs followed by
697    a signaled WR.  The result was too many flushed CQEs causing application
698    faults or assert() failures in libcxgb4 because the SQ state is corrupted.
699
700    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
701
702commit 8196f85bdefb1511d6d834240a92fdaf815834b8
703Author: Vipul Pandya <vipul@chelsio.com>
704Date:   Fri Oct 21 17:31:03 2011 +0530
705
706    libcxgb4: Remove auto generated ltmain.sh file.
707
708    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
709
710commit 230d12f42d143eeb53d8c4935ba27620c13e6165
711Author: Vipul Pandya <vipul@chelsio.com>
712Date:   Fri Oct 21 17:20:37 2011 +0530
713
714    libcxgb4: Add debug code to dump state on a stall condition.
715
716    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
717
718commit 2df0677b22aebb7a22d0e8ca11beb90250b363c7
719Author: Vipul Pandya <vipul@chelsio.com>
720Date:   Fri Oct 21 15:04:46 2011 +0530
721
722    libcxgb4: don't write host idx values when wq is in error.
723
724    This fixes a regression introduced by the db recovery changes.  The host
725    idx shadow fields at the end of the wq should only be written if the wq
726    is not in error.  Otherwise, a seg fault can occur.
727
728    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
729
730commit 4eaf4b9added6ca660ef2f9363b24d754185fddf
731Author: Vipul Pandya <vipul@chelsio.com>
732Date:   Thu Oct 20 19:55:57 2011 +0530
733
734    libcxgb4: cq debug changes
735
736        - turn on cq overflow detection by default
737
738        - shadow cq->cidx in the cq status page
739
740    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
741
742commit b15d02248dd1029706d07fa229767d8b68d16c65
743Author: Vipul Pandya <vipul@chelsio.com>
744Date:   Thu Oct 20 19:43:07 2011 +0530
745
746    libcxgb4: DB Drop Recovery for RDMA and LLD queues.
747
748    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
749
750commit b2c7499eab73cf28cbd9cf86f6ea134e2450cdd3
751Author: Vipul Pandya <vipul@chelsio.com>
752Date:   Sun Oct 23 12:59:24 2011 +0530
753
754    libcxgb4: put queue idx values in status page for debug.
755
756    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
757
758commit 60a30673a4072b6727e7266f7782607ddcbc8de7
759Author: Vipul Pandya <vipul@chelsio.com>
760Date:   Thu Oct 20 18:07:13 2011 +0530
761
762    libcxgb4: DB Overflow Avoidance.
763
764    - when user dbs are disabled, call into the kernel driver via modify_qp()
765    to ring the dbs.
766
767    Signed-off-by: Vipul Pandya <vipul@chelsio.com>
768
769commit c8651d01a2d69d83caff8c01b32be0b23624d8da
770Author: Steve Wise <swise@opengridcomputing.com>
771Date:   Thu Mar 10 09:45:00 2011 -0600
772
773    Spin release 1.1.1.
774
775    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
776
777commit ace467085deb7327522faeb19e20e13d691f66a2
778Author: Steve Wise <swise@opengridcomputing.com>
779Date:   Thu Mar 10 09:34:11 2011 -0600
780
781    Flush MA FIFO for on-chip queues.
782
783    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
784
785commit 7cb87f46c1784c791d29646104ab355ed920747d
786Author: Steve Wise <swise@opengridcomputing.com>
787Date:   Thu Mar 10 09:27:57 2011 -0600
788
789    increase the frequency of CIDX-INC updates.
790
791    Heavy IMB loads reveal that my current algorithm of doing CIDX-INC
792    GTS writes every 1/2 the CQ depth was not sufficient.  This patch
793    increases the frequency to 1/16.
794
795    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
796
797commit 7652d71daadda0c3aba9b96311ea623a1e324d77
798Author: Steve Wise <swise@opengridcomputing.com>
799Date:   Wed Sep 15 16:57:04 2010 -0500
800
801    Spin release 1.1.0.
802
803    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
804
805commit ed05d22592bc96987635b2c255a99663f286b812
806Author: Steve Wise <swise@opengridcomputing.com>
807Date:   Wed Sep 15 16:56:51 2010 -0500
808
809    Support all T4 device IDs.
810
811    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
812
813commit b051a2ea9dc7b6ffa08f955e60b331e42fec8672
814Author: Steve Wise <swise@opengridcomputing.com>
815Date:   Wed Sep 15 15:54:35 2010 -0500
816
817    Support ABI 0 and 1 versions of the iwarp driver.
818
819    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
820
821commit 62f1363bb716e2283f9e2b885e5f02a6d5c692d1
822Author: Steve Wise <swise@opengridcomputing.com>
823Date:   Wed Sep 15 14:06:17 2010 -0500
824
825    Bump the slots per SQ to 5 to allow up to 128MB fast registers.
826
827    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
828
829commit d51e041839254d656cc260dba3f26a7c9d73aa56
830Author: Steve Wise <swise@opengridcomputing.com>
831Date:   Wed Sep 15 14:06:16 2010 -0500
832
833    Raw QP implementation
834
835    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
836
837commit 8f55539d0b8aea70084edf31687e590cf5a57221
838Author: Steve Wise <swise@opengridcomputing.com>
839Date:   Wed Sep 15 14:03:55 2010 -0500
840
841    Add compile-time user mode rdma stats.
842
843    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
844
845commit 2e3531bbd91d7a6f057b3503132aef5e64adb548
846Author: Steve Wise <swise@opengridcomputing.com>
847Date:   Wed Sep 15 13:57:03 2010 -0500
848
849    Support on-chip SQs.
850
851    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
852
853commit 65bb173b86c2e0a9ff5f877e4d3951cb8daa6e97
854Author: Steve Wise <swise@opengridcomputing.com>
855Date:   Wed Sep 15 13:54:44 2010 -0500
856
857    Work around TERM CQE hw bug.
858
859    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
860
861commit 6bb37d1f72652d4ed0c1972bc673f4418cc7a856
862Author: Steve Wise <swise@opengridcomputing.com>
863Date:   Wed Sep 15 13:54:44 2010 -0500
864
865    Zero out padding in iSGLs.
866
867    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
868
869commit aad128404c494ec4779055b5e550c2d7de7d5ca9
870Author: Steve Wise <swise@opengridcomputing.com>
871Date:   Thu Jul 22 14:58:51 2010 -0500
872
873    Spin release 1.0.4
874
875    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
876
877commit 07ac253a8a479fd59fe654baf5a94ffc1de13765
878Author: Steve Wise <swise@opengridcomputing.com>
879Date:   Thu Jul 22 14:57:27 2010 -0500
880
881    Do GTS/CIDX_INC writes in the poll path to avoid drops.
882
883    With T4 asic, we still see the CIDX_INC overflow/drops.
884
885    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
886
887commit 3394198639f811c86ab519c43197a9b724435cb0
888Author: Steve Wise <swise@opengridcomputing.com>
889Date:   Thu Jul 22 14:56:53 2010 -0500
890
891    Support T420 and T440 cards.
892
893    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
894
895commit 311dd1c8ec3e38287895053dce52dfef5ed5f0b1
896Author: Steve Wise <swise@opengridcomputing.com>
897Date:   Fri Jun 11 10:40:53 2010 -0500
898
899    Spin release 1.0.3.
900
901    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
902
903commit a62d7cf38f7b6c731486ff969ee7e3a4238ebc3f
904Author: Steve Wise <swise@opengridcomputing.com>
905Date:   Fri Jun 11 10:37:17 2010 -0500
906
907    Support variable sized work requests.
908
909    T4 EQ entries are in multiples of 64B.  Currently the RDMA SQ and RQ
910    use fixed sized entries composed of 4 EQ entries for the SQ and 2 EQ
911    entries for the RQ.  For optimial latency with small IO, we need to
912    change this so the HW only needs to DMA the EQ entries actually used by
913    a given work request.
914
915    Implementation:
916
917    - add wq_pidx counter to track where we are in the EQ.  cidx/pidx are
918    used for the sw sq/rq tracking and flow control.
919
920    - the variable part of work requests is the SGL.  Add new functions to
921    build the SGL and/or immediate data directly in the EQ memory wrapping
922    when needed.
923
924    - adjust the min burst size for the EQ contexts to 64B.
925
926commit 3be829d117a8ca7957370b09b477fe551de0cea5
927Author: Steve Wise <swise@opengridcomputing.com>
928Date:   Thu May 20 15:52:59 2010 -0500
929
930    Spin release 1.0.2.
931
932    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
933
934commit dc1ea232e8ece4ba53d2496befad14bd433e2e3e
935Author: Steve Wise <swise@opengridcomputing.com>
936Date:   Thu May 20 15:48:37 2010 -0500
937
938    only insert sq qid in lookup tables.
939
940    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
941
942commit 00c60fd47b71dac42d864662567701e2618ff45d
943Author: Steve Wise <swise@opengridcomputing.com>
944Date:   Thu May 20 15:47:37 2010 -0500
945
946    Update some driver limits.
947
948    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
949
950commit f25661e19d728a0a33a221c0646a9fce9b160f8b
951Author: Steve Wise <swise@opengridcomputing.com>
952Date:   Thu May 20 15:46:38 2010 -0500
953
954    Fix cq arm overflow.
955
956    - wrap cq->cqidx_inc based on cq size
957    - optimize t4_arm_cq() logic
958
959    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
960
961commit 8c224aca8f1acd219010e46da538ae4c9a4f9d1a
962Author: Steve Wise <swise@opengridcomputing.com>
963Date:   Thu May 20 15:45:54 2010 -0500
964
965    Optimize cq overflow detection.
966
967    1) save the timestamp flit in the cq when we consume a CQE
968
969    2) always compare the saved flit with the previous entry flit when reading
970    the next CQE entry.  If the flits don't compare, then we've overflowed.
971
972    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
973
974commit 0c0cfbdbeb32548994d94a6278c74e2a4f11d9ba
975Author: Steve Wise <swise@opengridcomputing.com>
976Date:   Thu May 6 17:57:56 2010 -0500
977
978    Spin release 1.0.1.
979
980    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
981
982commit 5b9ebdfbcd6df0f02375717aff20400ac33dc47f
983Author: Steve Wise <swise@opengridcomputing.com>
984Date:   Thu May 6 17:34:07 2010 -0500
985
986    Update code with new t4fw interface.
987
988    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
989
990commit 0116d75d8dcc2f4018d0c0074728ca7d127a5065
991Author: Steve Wise <swise@opengridcomputing.com>
992Date:   Thu May 6 17:32:10 2010 -0500
993
994    Refresh t4fw-interface.h
995
996    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
997
998commit ad7a3f8dea2873a3a600859cfe8eb10ad979ddb1
999Author: Steve Wise <swise@opengridcomputing.com>
1000Date:   Thu May 6 17:30:42 2010 -0500
1001
1002    Avoid CQ arm overflows.
1003
1004    There are 2 limits that need to be taken into account when arming the CQ.
1005    1) the GTS register limits the delta idx to <= M_CIDXINC.
1006    2) T4 HW limits it to < cq size.
1007
1008    Update t4_arm_cq() to account for these limits.
1009
1010commit 2905808680aad82b4f295850551bbe15711c2f42
1011Author: Steve Wise <swise@opengridcomputing.com>
1012Date:   Thu May 6 17:30:12 2010 -0500
1013
1014    Poll fixes.
1015
1016    - when synthesizing CQEs for the SWCQ, always use SQ QID.
1017    - when flushing, ignore target side read response errors.
1018
1019    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
1020
1021commit 7a7962e856eb606e25a1529bc7f2945e639042b7
1022Author: Steve Wise <swise@opengridcomputing.com>
1023Date:   Thu May 6 17:24:07 2010 -0500
1024
1025    Fix CQ overflow detection.
1026
1027    CQ overflow detection needs to read the gen bit and the timestamp in
1028    one read operation.  Otherwise false overflows can result.
1029
1030    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
1031
1032commit 5ca340c298c61c9019d8593ee7acdbda93fdd498
1033Author: Steve Wise <swise@opengridcomputing.com>
1034Date:   Thu May 6 17:23:53 2010 -0500
1035
1036    libcxgb3: create_read_req_cqe() needs to swap read length.
1037
1038    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
1039
1040commit 9bd1e60d3aea10dbe7cb9920363e485b845d85a3
1041Author: Steve Wise <swise@opengridcomputing.com>
1042Date:   Wed Apr 14 10:36:41 2010 -0500
1043
1044    Refresh t4fw_interface.h
1045
1046    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
1047
1048commit d6e6ae69be5edffc566178e1b7e6402d61a5a786
1049Author: Steve Wise <swise@opengridcomputing.com>
1050Date:   Fri Apr 2 16:01:31 2010 -0500
1051
1052    Add libcxgb4 files.
1053
1054    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
1055