[openib-general] [PATCH] mthca: send opcode in error CQE for debug

Michael S. Tsirkin mst at mellanox.co.il
Fri Jun 9 00:59:12 PDT 2006


I find the following helpful for debug. Pls consider for 2.6.18

--

While IP spec does not require opcode to be valid in error CQEs, Mellanox HCAs
differentiate between send/receive errors, which is useful for debugging
purposes.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: last_stable/drivers/infiniband/hw/mthca/mthca_cq.c
===================================================================
--- last_stable.orig/drivers/infiniband/hw/mthca/mthca_cq.c	2006-06-09 10:14:53.000000000 +0300
+++ last_stable/drivers/infiniband/hw/mthca/mthca_cq.c	2006-06-09 10:15:08.000000000 +0300
@@ -562,6 +562,7 @@ static inline int mthca_poll_one(struct 
 		handle_error_cqe(dev, cq, *cur_qp, wqe_index, is_send,
 				 (struct mthca_err_cqe *) cqe,
 				 entry, &free_cqe);
+		entry->opcode = is_send ? IB_WC_SEND : IB_WC_RECV;
 		goto out;
 	}
 

-- 
MST




More information about the general mailing list