From: Adit Ranadive <aditr@vmware.com>
To: "jgg@mellanox.com" <jgg@mellanox.com>,
"dledford@redhat.com" <dledford@redhat.com>
Cc: Adit Ranadive <aditr@vmware.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Pv-drivers <Pv-drivers@vmware.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: [PATCH for-rc] RDMA/vmw_pvrdma: Return the correct opcode when creating WR
Date: Mon, 7 Jan 2019 18:53:24 +0000 [thread overview]
Message-ID: <1546887183-1238-1-git-send-email-aditr@vmware.com> (raw)
From: Adit Ranadive <aditr@vmware.com>
Since the IB_WR_REG_MR opcode value changed, set some of the PVRDMA device
opcodes explicitly.
Reported-by: Ruishuang Wang <ruishuangw@vmware.com>
Fixes: 9a59739bd01f ("IB/rxe: Revise the ib_wr_opcode enum")
Cc: stable@vger.kernel.org
Reviewed-by: Bryan Tan <bryantan@vmware.com>
Reviewed-by: Ruishuang Wang <ruishuangw@vmware.com>
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
---
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
index 42b8685c997e..c2ed09e66d2b 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
@@ -427,7 +427,26 @@ static inline enum ib_qp_state pvrdma_qp_state_to_ib(enum pvrdma_qp_state state)
static inline enum pvrdma_wr_opcode ib_wr_opcode_to_pvrdma(enum ib_wr_opcode op)
{
- return (enum pvrdma_wr_opcode)op;
+ switch (op) {
+ case IB_WR_LSO:
+ return PVRDMA_WR_LSO;
+ case IB_WR_SEND_WITH_INV:
+ return PVRDMA_WR_SEND_WITH_INV;
+ case IB_WR_RDMA_READ_WITH_INV:
+ return PVRDMA_WR_RDMA_READ_WITH_INV;
+ case IB_WR_LOCAL_INV:
+ return PVRDMA_WR_LOCAL_INV;
+ case IB_WR_REG_MR:
+ return PVRDMA_WR_FAST_REG_MR;
+ case IB_WR_MASKED_ATOMIC_CMP_AND_SWP:
+ return PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP;
+ case IB_WR_MASKED_ATOMIC_FETCH_AND_ADD:
+ return PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD;
+ case IB_WR_REG_SIG_MR:
+ return PVRDMA_WR_REG_SIG_MR;
+ default:
+ return (enum pvrdma_wr_opcode)op;
+ }
}
static inline enum ib_wc_status pvrdma_wc_status_to_ib(
--
1.8.3.1
next reply other threads:[~2019-01-07 18:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 18:53 Adit Ranadive [this message]
2019-01-07 18:59 ` [PATCH for-rc] RDMA/vmw_pvrdma: Return the correct opcode when creating WR Jason Gunthorpe
2019-01-07 19:08 ` Adit Ranadive
2019-01-07 19:17 ` Jason Gunthorpe
2019-01-07 20:05 ` Adit Ranadive
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546887183-1238-1-git-send-email-aditr@vmware.com \
--to=aditr@vmware.com \
--cc=Pv-drivers@vmware.com \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.