[ewg] [PATCH] krping: fix qp signalling type

Jon Mason jon at opengridcomputing.com
Mon Sep 14 09:01:54 PDT 2009


Per the IB spec for create qp(spec 1.2.1 section 11.2.4.11)
    
The Signaling Type must be specified for the Send Queue on this QP.  The valid
types are:
* Non-selectable: All Work Requests submitted to the Send Queue always generate
  a completion entry.
* Selectable: Consumer must specify on each Work Request submitted to the Send
  Queue whether to generate a completion entry for successful completions.

The default for IB is non-selectable (.sq_sig_type set to 0).  In the
qp_init_attr structure the field .sq_sig_type needs to be set to
IB_SIGNAL_REQ_WR in order to set it as selecetable (ie controlled from the WR).
    
Signed-off-by: Jon Mason <jon at opengridcomputing.com>

diff --git a/krping.c b/krping.c
index 095b556..85cb9f9 100644
--- a/krping.c
+++ b/krping.c
@@ -429,12 +429,6 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx)
 			wake_up_interruptible(&cb->sem);
 			break;
 
-		case IB_WC_LOCAL_INV:
-		case IB_WC_FAST_REG_MR:
-			printk(KERN_ERR PFX
-			       "Unexpected opcode %d, most likely unsignalled\n",
-			       __func__, __LINE__, wc.opcode);
-			break;
 		default:
 			printk(KERN_ERR PFX
 			       "Unexpected opcode %d, Shutting down\n",
@@ -779,6 +773,7 @@ static int krping_create_qp(struct krping_cb *cb)
 	init_attr.qp_type = IB_QPT_RC;
 	init_attr.send_cq = cb->cq;
 	init_attr.recv_cq = cb->cq;
+	init_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
 
 	if (cb->server) {
 		ret = rdma_create_qp(cb->child_cm_id, cb->pd, &init_attr);



More information about the ewg mailing list