From 109a910baf91598e8a5564ef6974af2c13744215 Mon Sep 17 00:00:00 2001 From: tzachid Date: Sun, 26 Mar 2006 13:13:48 +0000 Subject: [PATCH] [MTHCA] (continues patch 251) remaps RDD/EEC WC status values to IB_WCS_GENERIC_ERR, and that removes the use of the qp_num field in the ib_wc_t structure git-svn-id: svn://openib.tc.cornell.edu/gen1@253 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/hw/mthca/kernel/mthca_cmd.c | 29 +++-------------------------- trunk/hw/mthca/kernel/mthca_cq.c | 18 +++--------------- trunk/hw/mthca/user/mlnx_uvp_cq.c | 18 ++---------------- 3 files changed, 8 insertions(+), 57 deletions(-) diff --git a/trunk/hw/mthca/kernel/mthca_cmd.c b/trunk/hw/mthca/kernel/mthca_cmd.c index 0820e977..3913691e 100644 --- a/trunk/hw/mthca/kernel/mthca_cmd.c +++ b/trunk/hw/mthca/kernel/mthca_cmd.c @@ -1707,6 +1707,9 @@ int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, u32 in_modifier = port; u8 op_modifier = 0; + ASSERT( !in_wc ); + UNREFERENCED_PARAMETER( in_grh ); + #define MAD_IFC_BOX_SIZE 0x400 #define MAD_IFC_MY_QPN_OFFSET 0x100 #define MAD_IFC_RQPN_OFFSET 0x104 @@ -1738,32 +1741,6 @@ int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, if (ignore_bkey || !in_wc) op_modifier |= 0x2; - if (in_wc) { - u8 val; - - RtlZeroMemory(inbox + 256, 256); - - MTHCA_PUT(inbox, in_wc->qp_num, MAD_IFC_MY_QPN_OFFSET); - MTHCA_PUT(inbox, in_wc->recv.ud.remote_qp, MAD_IFC_RQPN_OFFSET); - - val = in_wc->recv.ud.remote_sl << 4; - MTHCA_PUT(inbox, val, MAD_IFC_SL_OFFSET); - - val = in_wc->recv.ud.path_bits | - (in_wc->recv.ud.recv_opt & IB_RECV_OPT_GRH_VALID ? 0x80 : 0); - MTHCA_PUT(inbox, val, MAD_IFC_GRH_OFFSET); - - MTHCA_PUT(inbox, in_wc->recv.ud.remote_lid, MAD_IFC_RLID_OFFSET); - MTHCA_PUT(inbox, in_wc->recv.ud.pkey_index, MAD_IFC_PKEY_OFFSET); - - if (in_grh) - memcpy(inbox + MAD_IFC_GRH_OFFSET, in_grh, 40); - - op_modifier |= 0x10; - - in_modifier |= in_wc->recv.ud.remote_lid << 16; - } - err = mthca_cmd_box(dev, inmailbox->dma, outmailbox->dma, in_modifier, op_modifier, CMD_MAD_IFC, CMD_TIME_CLASS_C, status); diff --git a/trunk/hw/mthca/kernel/mthca_cq.c b/trunk/hw/mthca/kernel/mthca_cq.c index 6f01ac1a..e9b210ca 100644 --- a/trunk/hw/mthca/kernel/mthca_cq.c +++ b/trunk/hw/mthca/kernel/mthca_cq.c @@ -362,9 +362,6 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, case SYNDROME_LOCAL_QP_OP_ERR: entry->status = IB_WCS_LOCAL_OP_ERR; break; - case SYNDROME_LOCAL_EEC_OP_ERR: - entry->status = IB_WCS_LOCAL_EEC_OP_ERR; - break; case SYNDROME_LOCAL_PROT_ERR: entry->status = IB_WCS_LOCAL_PROTECTION_ERR; break; @@ -381,7 +378,7 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, entry->status = IB_WCS_LOCAL_ACCESS_ERR; break; case SYNDROME_REMOTE_INVAL_REQ_ERR: - entry->status = IB_WCS_REM_INV_REQ_ERR; + entry->status = IB_WCS_REM_INVALID_REQ_ERR; break; case SYNDROME_REMOTE_ACCESS_ERR: entry->status = IB_WCS_REM_ACCESS_ERR; @@ -395,21 +392,14 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, case SYNDROME_RNR_RETRY_EXC_ERR: entry->status = IB_WCS_RNR_RETRY_ERR; break; - case SYNDROME_LOCAL_RDD_VIOL_ERR: - entry->status = IB_WCS_LOCAL_RDD_VIOL_ERR; - break; case SYNDROME_REMOTE_INVAL_RD_REQ_ERR: entry->status = IB_WCS_REM_INVALID_REQ_ERR; break; case SYNDROME_REMOTE_ABORTED_ERR: - entry->status = IB_WCS_REM_ABORT_ERR; - break; + case SYNDROME_LOCAL_EEC_OP_ERR: + case SYNDROME_LOCAL_RDD_VIOL_ERR: case SYNDROME_INVAL_EECN_ERR: - entry->status = IB_WCS_INV_EECN_ERR; - break; case SYNDROME_INVAL_EEC_STATE_ERR: - entry->status = IB_WCS_INV_EEC_STATE_ERR; - break; default: entry->status = IB_WCS_GENERAL_ERR; break; @@ -500,8 +490,6 @@ static inline int mthca_poll_one(struct mthca_dev *dev, } } - entry->qp_num = (*cur_qp)->qpn; - if (is_send) { wq = &(*cur_qp)->sq; wqe_index = ((cl_ntoh32(cqe->wqe) - (*cur_qp)->send_wqe_offset) diff --git a/trunk/hw/mthca/user/mlnx_uvp_cq.c b/trunk/hw/mthca/user/mlnx_uvp_cq.c index d1b80d4f..26776ecd 100644 --- a/trunk/hw/mthca/user/mlnx_uvp_cq.c +++ b/trunk/hw/mthca/user/mlnx_uvp_cq.c @@ -203,9 +203,6 @@ static int handle_error_cqe(struct mthca_cq *cq, case SYNDROME_LOCAL_QP_OP_ERR: entry->status = IB_WCS_LOCAL_OP_ERR; break; - case SYNDROME_LOCAL_EEC_OP_ERR: - entry->status = IB_WCS_LOCAL_EEC_OP_ERR; - break; case SYNDROME_LOCAL_PROT_ERR: entry->status = IB_WCS_LOCAL_PROTECTION_ERR; break; @@ -222,7 +219,7 @@ static int handle_error_cqe(struct mthca_cq *cq, entry->status = IB_WCS_LOCAL_ACCESS_ERR; break; case SYNDROME_REMOTE_INVAL_REQ_ERR: - entry->status = IB_WCS_REM_INV_REQ_ERR; + entry->status = IB_WCS_REM_INVALID_REQ_ERR; break; case SYNDROME_REMOTE_ACCESS_ERR: entry->status = IB_WCS_REM_ACCESS_ERR; @@ -236,21 +233,12 @@ static int handle_error_cqe(struct mthca_cq *cq, case SYNDROME_RNR_RETRY_EXC_ERR: entry->status = IB_WCS_RNR_RETRY_ERR; break; + case SYNDROME_LOCAL_EEC_OP_ERR: case SYNDROME_LOCAL_RDD_VIOL_ERR: - entry->status = IB_WCS_LOCAL_RDD_VIOL_ERR; - break; case SYNDROME_REMOTE_INVAL_RD_REQ_ERR: - entry->status = IB_WCS_REM_INVALID_REQ_ERR; - break; case SYNDROME_REMOTE_ABORTED_ERR: - entry->status = IB_WCS_REM_ABORT_ERR; - break; case SYNDROME_INVAL_EECN_ERR: - entry->status = IB_WCS_INV_EECN_ERR; - break; case SYNDROME_INVAL_EEC_STATE_ERR: - entry->status = IB_WCS_INV_EEC_STATE_ERR; - break; default: entry->status = IB_WCS_GENERAL_ERR; break; @@ -344,8 +332,6 @@ static inline int mthca_poll_one(struct mthca_cq *cq, } } - entry->qp_num = (*cur_qp)->ibv_qp.qp_num; - if (is_send) { wq = &(*cur_qp)->sq; wqe_index = ((cl_ntoh32(cqe->wqe) - (*cur_qp)->send_wqe_offset) >> wq->wqe_shift); -- 2.41.0