[openib-general] Comments on ehca updates

Roland Dreier rdreier at cisco.com
Tue Jan 17 04:59:08 PST 2006


Hi, I noticed that you checked in some ehca changes.  A couple of comments:

1) While most of the changes to your #includes are correct, like

	-#include <hipz_fns_core.h>
	+#include "hipz_fns_core.h"

since you should use "" instead of <> for includes in your own local
directory to make the kernel build work, things in the kernel's own
include/ directory should still use <>, so for example

	-#include <linux/version.h>
	+#include "linux/version.h"

Also, I never noticed this before but

	-#include <ib_mad.h>
	+#include "ib_mad.h"

should really just be #include <rdma/ib_mad.h>.

2) How can the changes like

@@ -75,7 +74,7 @@ int ehca_post_send(struct ib_qp *qp,
 		my_qp, qp->qp_num, send_wr, bad_send_wr);
 
 	/* LOCK the QUEUE */
-	spin_lock_irqsave(&my_qp->spinlock_s, spin_flags);
+	spin_lock(&my_qp->spinlock_s);

be correct?  ehca_post_send() is called directly as your device's
post_send method, which means that a consumer can call it from both
process and interrupt context.  So using plain spin_lock() can
deadlock if a process context call is interrupted by an interrupt
context call.

The same comment applies to your other changes like this, at least in
your post_recv and poll_cq methods.

 - R.



More information about the general mailing list