12006-11-09  Roland Dreier  <rdreier@cisco.com>
2
3	* Release version 1.0.3.
4
52006-10-17  Roland Dreier  <rdreier@cisco.com>
6
7	* src/cq.c, src/qp.c, src/srq.c: Convert existing uses of mb() to
8	rmb() or wmb() as appropriate.  In fact all memory barriers were
9	really just wmb(), except for the barrier between reading a CQE's
10	ownership bit and contents, which should be rmb().
11
12	* src/mthca.h: Add compatibility defines of rmb()/wmb() so that
13	libmthca continues to build against old libibverbs releases.
14
152006-10-03  Roland Dreier  <rdreier@cisco.com>
16
17	* src/cq.c (mthca_poll_one): Annotate so that Valgrind knows
18	contents of CQ entry are all valid after they are written by HCA.
19	(set_cqe_hw): Annotate so that CQ entries owned by hardware are
20	not defined.
21
22	* src/mthca.h: Add wrapper for VALGRIND_MAKE_MEM_DEFINED so that
23	it can be used in .c files without worrying about whether Valgrind
24	is installed or enabled.
25
26	* configure.in: Add support for Valgrind annotation (enabled with
27	--with-valgrind option to configure).
28
29	* src/verbs.c (mthca_create_qp): Set reserved fields to 0 to avoid
30	future problems and also to make Valgrind a little quieter.
31
322006-09-04  Roland Dreier  <rdreier@cisco.com>
33
34	* src/verbs.c (mthca_destroy_qp): Avoid potential AB-BA deadlock
35	when destroying QPs by always taking CQ locks in a consistent
36	order (lowest CQN first).  The old code always took the send_cq
37	lock first, which is prone to deadlock if the send_cq of one QP is
38	the recv_cq of another QP destroyed at the same time.  This bug
39	was pointed out by Dotan Barak and Jack Morgenstein.
40
412006-08-23  Roland Dreier  <rdreier@cisco.com>
42
43	* src/verbs.c (mthca_resize_cq): Add a test for
44	IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS to make libmthca work with newer
45	libibverbs libraries that add two parameters to ibv_cmd_resize_cq().
46
472006-08-09  Michael S. Tsirkin  <mst@mellanox.co.il>
48
49	* src/qp.c (mthca_tavor_post_send, mthca_arbel_post_send): Fence
50	bit must be set in both doorbell and WQE.
51
522006-08-03  Jack Morgenstein  <jackm@mellanox.co.il>
53
54	* src/mthca.h: Include <stddef.h> to get definition of offsetof().
55
562006-08-03  Michael S. Tsirkin  <mst@mellanox.co.il>
57
58	* src/verbs.c (mthca_create_srq): Limit SRQ max_wr to avoid
59	integer overflow.
60
612006-07-26  Roland Dreier  <rdreier@cisco.com>
62
63	* src/mthca.h, src/ah.c, src/cq.c, src/memfree.c, src/qp.c,
64	src/srq.c, src/verbs.c: Convert internal allocations for AH pages
65	(for non-memfree HCAs), CQ buffers, doorbell pages (for memfree
66	HCAs), QP buffers and SRQ buffers to use the new buffer
67	allocator.  This makes libmthca fork()-clean when built against
68	libibverbs 1.1.
69
70	* src/buf.c (mthca_alloc_buf, mthca_free_buf): Add new functions
71	to wrap up allocating page-aligned buffers.  The new functions
72	will call ibv_dontfork_range()/ibv_dofork_range() to do proper
73	madvise()ing to handle fork(), if applicable.
74
75	* configure.in: Check for ibv_dontfork_range() and ibv_dontfork_range().
76
772006-07-04  Dotan Barak  <dotanb@mellanox.co.il>
78
79	* src/verbs.c (mthca_create_cq, mthca_resize_cq): Passing huge
80	size values to create_cq/resize_cq causes a hang in
81	align_cq_size().  Fix this by validating input, similiar to what
82	we do for mthca_create_qp() and mthca_create_srq().
83
842006-06-13  Roland Dreier  <rdreier@cisco.com>
85
86	* Release version 1.0.2.
87
882006-06-13  Michael S. Tsirkin  <mst@mellanox.co.il>
89
90	* src/cq.c (mthca_poll_one): Add workaround for MemFree FW bug
91	that causes wrong WQE addr to be reported.
92
932006-05-24  Roland Dreier  <rdreier@cisco.com>
94
95	* src/mthca.c: If <sysfs/libsysfs.h> is detected, include it
96	explicitly.  This lets things build when sysfs headers are
97	installed on the build system even when building against
98	libibverbs 1.1 (which does not include sysfs headers implicitly).
99
100	* src/ah.c, src/cq.c, src/memfree.c, src/mthca.c, src/qp.c,
101	src/srq.c: Add include of <string.h>, since it may no long be
102	implicitly included from libsysfs headers when building with
103	libibverbs 1.1.
104
1052006-05-24  Michael S. Tsirkin  <mst@mellanox.co.il>
106
107	* src/srq.c (mthca_tavor_post_srq_recv): Fix posting of lists of
108	receives that have exactly a multiple of 256 entries (same as QP
109	bug fixed below).
110
1112006-05-22  Roland Dreier  <rdreier@cisco.com>
112
113	* configure.in, src/mthca.c (openib_driver_init): Check for the
114	presence of <sysfs/libsysfs.h>, and if it is not installed, don't
115	export the old openib_driver_init() entry point.
116
1172006-05-18  Michael S. Tsirkin  <mst@mellanox.co.il>
118
119	* src/qp.c (mthca_tavor_post_recv): Fix posting of lists of
120	receives that have exactly a multiple of 256 entries.
121
1222006-05-08  Jack Morgenstein  <jackm@mellanox.co.il>
123
124	* src/mthca.c: Add include files needed for open() if
125	HAVE_IBV_READ_SYSFS_FILE is not defined (so libmthca includes a
126	private local definition of ibv_read_sysfs_file()).
127
1282006-04-11  Roland Dreier  <rdreier@cisco.com>
129
130	* src/mthca.c (ibv_driver_init, openib_driver_init): Add new
131	forward-compatible driver entry point.  Make old entry point a
132	simple wrapper for the new one.
133
1342006-03-14  Roland Dreier  <rdreier@cisco.com>
135
136	* Release version 1.0.1.
137
138	* Makefile.am (EXTRA_DIST): Remove debian/ directory from
139	tarballs, since Debian policy is that upstream tarballs should not
140	include it.
141
1422006-03-13  Roland Dreier  <rdreier@cisco.com>
143
144	* Release version 1.0.
145
1462006-02-27  Dotan Barak  <dotanb@mellanox.co.il>
147
148	* src/qp.c (mthca_tavor_post_send, mthca_arbel_post_send): Add
149	support for IBV_SEND_FENCE flag.
150
1512006-02-16  Roland Dreier  <rdreier@cisco.com>
152
153	* src/memfree.c (mthca_alloc_db): Introduce a temporary variable
154	to pass to posix_memalign() to avoid "warning: dereferencing
155	type-punned pointer will break strict-aliasing rules."
156
157	* Release version 1.0-rc7.
158
1592006-02-15  Roland Dreier  <rdreier@cisco.com>
160
161	* src/verbs.c (mthca_create_qp): Update to add new response and
162	response size parameters for libibverbs ibv_cmd_create_qp().
163
1642006-02-14  Roland Dreier  <rdreier@cisco.com>
165
166	* Release version 1.0-rc6.
167
1682006-02-13  Dotan Barak  <dotanb@mellanox.co.il>
169
170	* src/verbs.c (mthca_query_qp, mthca_query_srq): Add query QP and
171	query SRQ verbs.
172
1732006-01-31  Roland Dreier  <rdreier@cisco.com>
174
175	* src/mthca.h: Remove useless "extern" from function declarations.
176
1772006-01-30  Michael S. Tsirkin  <mst@mellanox.co.il>
178
179	* src/qp.c (mthca_tavor_post_recv, mthca_arbel_post_recv): Pass
180	recv_cq to wq_overflow() so we lock the correct CQ.  Noticed by
181	Yossi Leybovich.
182
1832006-01-26  Roland Dreier  <rdreier@cisco.com>
184
185	* src/mthca.h, src/verbs.c, src/cq.c, src/mthca.c: Add
186	implementation of resize CQ operation.
187
188	* src/mthca-abi.h: Add mthca-specific resize CQ ABI.
189
1902006-01-22  Roland Dreier  <rdreier@cisco.com>
191
192	* Release version 1.0-rc5.
193
1942006-01-11  Jack Morgenstein  <jackm@mellanox.co.il>
195
196	* src/verbs.c (mthca_free_pd): Free pointer to correct structure
197	(we get lucky now, but don't rely on this).
198	* src/mthca.c (mthca_free_context): Free context's PD so we don't
199	leak it.
200
2012006-01-06  Michael S. Tsirkin  <mst@mellanox.co.il>
202
203	* src/verbs.c (mthca_destroy_qp): Jack Morgenstein has discovered
204	the following race condition in libmthca:
205
206	Thread A destroys QP A at the kernel side by calling
207	ibv_cmd_destroy_qp, but its time-slice is over before removing it
208	from the user-space qp_table removal.
209
210	Thread B allocates QP B, receiving a QP number that matches the
211	just-destroyed QP A in the low 16 bits.  Thread B will now
212	over-write the slot in qp_table which was used for QP A.
213
214	Thread A wakes up and clears qp_table slot, in effect removing QP
215	B from qp_table.
216
217	As a solution, remove the QP from qp_table before calling
218	ibv_cmd_destroy_qp.  This also makes sense since operations are
219	performed in the reverse order in create_qp.
220
221	* src/cq.c (handle_error_cqe): Fill in vendor_err field for
222	completions with error.
223
2242006-01-05  Jack Morgenstein  <jackm@mellanox.co.il>
225
226	* src/verbs.c (mthca_destroy_qp, mthca_destroy_srq): Free QP/SRQ
227	object to avoid memory leak.
228
2292005-12-15  Jack Morgenstein  <jackm@mellanox.co.il>
230
231	* src/cq.c (mthca_cq_clean): When cleaning up a CQ, we should free
232	an SRQ WQE if and only if the CQE is a receive.
233
2342005-12-15  Michael S. Tsirkin  <mst@mellanox.co.il>
235
236	* src/qp.c (mthca_store_qp): Don't increment qp_table ref count if
237	allocation fails.
238
2392005-11-29  Michael S. Tsirkin  <mst@mellanox.co.il>
240
241	* src/qp.c (mthca_arbel_post_send): Add handling for posting long
242	send lists for mem-free HCAs.
243	* src/qp.c (mthca_tavor_post_recv): Fix posting long receive
244	lists: nreq is set to zero early on, so we need to use
245	MTHCA_TAVOR_MAX_WQES_PER_RECV_DB as the increment to rq.head.
246
2472005-11-28  Roland Dreier  <roland@cisco.com>
248
249	* src/qp.c (mthca_init_qp_indices): Set qp->sq.last and
250	qp->rq.last so that QP is fully reset when the indices are
251	reinited on transition to RESET state.
252	(mthca_tavor_post_send, mthca_arbel_post_send): Don't create an
253	inline send segment when a work request is posted that has the
254	inline flag set but no gather entries included.
255
2562005-11-09  Roland Dreier  <roland@cisco.com>
257
258	* src/srq.c (mthca_tavor_post_srq_recv), src/qp.c
259	(mthca_tavor_post_recv): Fix bugs in long receive list handling;
260	need to set nreq to 0 and not put 256 credits into the second
261	doorbell word.
262
263	* src/cq.c (mthca_cq_clean): Handle case where CQ indices wrap
264	around by treating signed comparisons of prod_index and
265	cq->cons_index carefully.
266
2672005-11-09  Michael S. Tsirkin  <mst@mellanox.co.il>
268
269	* src/srq.c (mthca_tavor_post_srq_recv), src/qp.c
270	(mthca_tavor_post_recv): Tavor requires that a doorbell be rung
271	at least every 256 receives, so add code to ring doorbells in the
272	middle of posting a huge list of receives.
273	
274	* src/qp.c (mthca_tavor_post_send, mthca_tavor_post_send): When
275	posting atomic operations, could wqe size in "octowords" correctly.
276
277	* src/ah.c (mthca_alloc_av): Don't free ah if page allocation
278	fails.  It will be freed where it's allocated, in the caller.
279
2802005-11-08  Roland Dreier  <roland@cisco.com>
281
282	* src/qp.c, src/verbs.c, src/mthca.h: Delegate setting of QP
283	capabilities (max_sge, max_inline_data, etc) to kernel.
284
2852005-11-04  Roland Dreier  <roland@cisco.com>
286
287	* src/verbs.c (mthca_destroy_qp): Clean CQEs when we destroy a QP.
288	(mthca_modify_qp): Clean CQEs when we move a QP to RESET state,
289	and reset QP index pointers.
290
291	* src/cq.c (mthca_cq_clean): Add function to clean out CQEs for
292	QPs that are being destroyed or reset.
293
2942005-10-30  Roland Dreier  <roland@cisco.com>
295
296	* src/srq.c (wqe_to_link): Change to use an offset of 12 (the imm
297	field), because posting an SRQ WQE may actually change the ee_nds
298	field and still cause free list corruption.  A receive WQE will
299	never have immediate data, so using imm is definitely safe.
300
3012005-10-25  Roland Dreier  <roland@cisco.com>
302
303	* Release version 1.0-rc4.
304
3052005-10-23  Roland Dreier  <roland@cisco.com>
306
307	* src/qp.c (mthca_return_cap, mthca_alloc_qp_buf), src/verbs.c
308	(mthca_create_qp): Explicitly pass QP type to functions used while
309	creating QP, since we can't rely on ibv_qp.qp_type to be set until
310	after we return.  This fixes breakage with UD QPs introduced in
311	the last change below.
312
3132005-10-19  Roland Dreier  <roland@cisco.com>
314
315	* src/mthca.h, src/verbs.c (mthca_create_qp), src/qp.c
316	(mthca_tavor_post_send, mthca_arbel_post_send, mthca_alloc_qp_buf,
317	mthca_return_cap): Eliminate struct mthca_qp.qpt field and use
318	struct ibv_qp.qp_type instead (now that that field has been added
319	in libibverbs).
320
3212005-10-18  Roland Dreier  <roland@cisco.com>
322
323	* src/cq.c (handle_error_cqe, mthca_poll_one): Dump CQEs for local
324	QP operation errors instead of all error statuses.
325
3262005-10-06  Roland Dreier  <roland@cisco.com>
327
328	* src/srq.c (mthca_free_srq_wqe): Pass index instead of WQE
329	address.  The only caller already has the index handy, so there's
330	no need to recalculate it here.
331	
332	* src/srq.c (mthca_tavor_post_srq_recv,
333	mthca_arbel_post_srq_recv): Add an extra check so that we report
334	the SRQ as full before using the one extra WQE we need internally.
335
3362005-10-05  Roland Dreier  <roland@cisco.com>
337
338	* src/verbs.c (mthca_modify_srq): Fill in mthca_modify_srq().
339
3402005-09-29  Roland Dreier  <roland@cisco.com>
341
342	* src/verbs.c (mthca_query_device): Update to match new libibverbs
343	API that requires device-specific libraries to format firmware version.
344
3452005-09-25  Roland Dreier  <roland@cisco.com>
346
347	* src/cq.c, src/mthca.c, src/mthca.h, src/verbs.c: Update to match
348	new libibverbs API introduced with completion channel implementation.
349
3502005-09-13  Roland Dreier  <roland@cisco.com>
351
352	* src/qp.c (mthca_tavor_post_send, mthca_tavor_post_recv,
353	mthca_arbel_post_send), src/srq.c (mthca_tavor_post_srq_recv):
354	Apply Michael S. Tsirkin's patch to fix linking of WQEs on
355	mem-free HCAs.  While we're at it, simplify the Tavor WQE posting
356	code as well -- there's no need for a conditional, just always lik
357	the previous WQE.
358
3592005-09-07  Roland Dreier  <roland@cisco.com>
360
361	* src/mthca.h: Get rid of ntohll() and htonll() now that
362	libibverbs defines them in <infiniband/arch.h>.
363
3642005-08-31  Roland Dreier  <roland@cisco.com>
365
366	* src/memfree.c (mthca_free_db): When we free a doorbell record,
367	really mark it as free in the free bitmap.  This we we don't
368	eventually run out of doorbells if a consumer creates and frees a
369	lot of objects.
370
371	* src/memfree.c (mthca_alloc_db): Introduce MTHCA_FREE_MAP_SIZE so
372	that we iterate over the correct number of entries in the mem-free
373	doorbell record free maps.  This fixes some off-by-a-factor-of-8
374	bugs that could lead to crashes.
375
376	* src/verbs.c (mthca_create_cq): In the mem-free case, when
377	creating a CQ fails to allocate an arm doorbell, make sure we free
378	the set CI doorbell instead of the (non-existent) arm doorbell.
379