[openib-general] [PATCH][9/18] InfiniBand/core: add QP number to work completion struct

Roland Dreier roland at topspin.com
Wed Jan 12 13:47:56 PST 2005


InfiniBand spec rev 1.2 compliance: add local qp number to
work completion structure.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Signed-off-by: Roland Dreier <roland at topspin.com>

--- linux/drivers/infiniband/include/ib_verbs.h	(revision 1466)
+++ linux/drivers/infiniband/include/ib_verbs.h	(revision 1468)
@@ -352,6 +352,7 @@
 	u32			vendor_err;
 	u32			byte_len;
 	__be32			imm_data;
+	u32			qp_num;
 	u32			src_qp;
 	int			wc_flags;
 	u16			pkey_index;
--- linux/drivers/infiniband/core/mad.c	(revision 1466)
+++ linux/drivers/infiniband/core/mad.c	(revision 1468)
@@ -2026,6 +2026,7 @@
 			wc.slid = IB_LID_PERMISSIVE;
 			wc.sl = 0;
 			wc.dlid_path_bits = 0;
+			wc.qp_num = IB_QP0;
 			local->mad_priv->header.recv_wc.wc = &wc;
 			local->mad_priv->header.recv_wc.mad_len =
 						sizeof(struct ib_mad);
--- linux/drivers/infiniband/hw/mthca/mthca_cq.c	(revision 1466)
+++ linux/drivers/infiniband/hw/mthca/mthca_cq.c	(revision 1468)
@@ -444,6 +444,8 @@
 		spin_lock(&(*cur_qp)->lock);
 	}
 
+	entry->qp_num = (*cur_qp)->qpn;
+
 	if (is_send) {
 		wq = &(*cur_qp)->sq;
 		wqe_index = ((be32_to_cpu(cqe->wqe) - (*cur_qp)->send_wqe_offset)




More information about the general mailing list