[openib-general] [PATCH] Add local qp number to ib_wc

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 4 08:20:20 PST 2005


Quoting r. Roland Dreier (roland at topspin.com) "Re: [openib-general] [PATCH] Add local qp number to ib_wc":
> can you resend with a Signed-off-by line and a description appropriate
> for the kernel changelog?

Sure.


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>

Index: include/ib_verbs.h
===================================================================
--- include/ib_verbs.h	(revision 1399)
+++ include/ib_verbs.h	(working copy)
@@ -339,6 +339,7 @@ struct ib_wc {
 	u32			vendor_err;
 	u32			byte_len;
 	__be32			imm_data;
+	u32			qp_num;
 	u32			src_qp;
 	int			wc_flags;
 	u16			pkey_index;
Index: core/mad.c
===================================================================
--- core/mad.c	(revision 1399)
+++ core/mad.c	(working copy)
@@ -2024,6 +2024,7 @@ static void local_completions(void *data
 			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);
Index: hw/mthca/mthca_cq.c
===================================================================
--- hw/mthca/mthca_cq.c	(revision 1399)
+++ hw/mthca/mthca_cq.c	(working copy)
@@ -440,6 +440,8 @@ static inline int mthca_poll_one(struct 
 		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