From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [RFC PATCH 08/27] IB/hfi1: Use correct rdmavt header files after move.
Date: Sat, 09 Jan 2016 07:17:22 -0800 [thread overview]
Message-ID: <20160109151722.30800.85712.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20160109151020.30800.82395.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
Rdmavt split the header files to be based on ibta object. This patch
makes changes in hfi1 to account for the move.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/staging/rdma/hfi1/driver.c | 3 ++-
drivers/staging/rdma/hfi1/mad.c | 4 ++--
drivers/staging/rdma/hfi1/qp.c | 5 +++--
drivers/staging/rdma/hfi1/ud.c | 14 +++++++-------
drivers/staging/rdma/hfi1/verbs.c | 4 ++--
5 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rdma/hfi1/driver.c b/drivers/staging/rdma/hfi1/driver.c
index 16ac8b6..d51a273 100644
--- a/drivers/staging/rdma/hfi1/driver.c
+++ b/drivers/staging/rdma/hfi1/driver.c
@@ -56,6 +56,7 @@
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/prefetch.h>
+#include <rdma/ib_verbs.h>
#include "hfi.h"
#include "trace.h"
@@ -316,7 +317,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,
/* Get the destination QP number. */
qp_num = be32_to_cpu(ohdr->bth[1]) & HFI1_QPN_MASK;
- if (lid < HFI1_MULTICAST_LID_BASE) {
+ if (lid < be16_to_cpu(IB_MULTICAST_LID_BASE)) {
struct hfi1_qp *qp;
unsigned long flags;
diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c
index 8e20760..9378fe8 100644
--- a/drivers/staging/rdma/hfi1/mad.c
+++ b/drivers/staging/rdma/hfi1/mad.c
@@ -1096,7 +1096,7 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
/* Must be a valid unicast LID address. */
if ((lid == 0 && ls_old > IB_PORT_INIT) ||
- lid >= HFI1_MULTICAST_LID_BASE) {
+ lid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) {
smp->status |= IB_SMP_INVALID_FIELD;
pr_warn("SubnSet(OPA_PortInfo) lid invalid 0x%x\n",
lid);
@@ -1129,7 +1129,7 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
/* Must be a valid unicast LID address. */
if ((smlid == 0 && ls_old > IB_PORT_INIT) ||
- smlid >= HFI1_MULTICAST_LID_BASE) {
+ smlid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) {
smp->status |= IB_SMP_INVALID_FIELD;
pr_warn("SubnSet(OPA_PortInfo) smlid invalid 0x%x\n", smlid);
} else if (smlid != ibp->sm_lid || msl != ibp->sm_sl) {
diff --git a/drivers/staging/rdma/hfi1/qp.c b/drivers/staging/rdma/hfi1/qp.c
index b847e1a..fcc2773 100644
--- a/drivers/staging/rdma/hfi1/qp.c
+++ b/drivers/staging/rdma/hfi1/qp.c
@@ -637,14 +637,15 @@ int hfi1_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
goto inval;
if (attr_mask & IB_QP_AV) {
- if (attr->ah_attr.dlid >= HFI1_MULTICAST_LID_BASE)
+ if (attr->ah_attr.dlid >= be16_to_cpu(IB_MULTICAST_LID_BASE))
goto inval;
if (hfi1_check_ah(qp->ibqp.device, &attr->ah_attr))
goto inval;
}
if (attr_mask & IB_QP_ALT_PATH) {
- if (attr->alt_ah_attr.dlid >= HFI1_MULTICAST_LID_BASE)
+ if (attr->alt_ah_attr.dlid >=
+ be16_to_cpu(IB_MULTICAST_LID_BASE))
goto inval;
if (hfi1_check_ah(qp->ibqp.device, &attr->alt_ah_attr))
goto inval;
diff --git a/drivers/staging/rdma/hfi1/ud.c b/drivers/staging/rdma/hfi1/ud.c
index a99d0c5..15c5a47 100644
--- a/drivers/staging/rdma/hfi1/ud.c
+++ b/drivers/staging/rdma/hfi1/ud.c
@@ -243,7 +243,7 @@ static void ud_loopback(struct hfi1_qp *sqp, struct hfi1_swqe *swqe)
wc.slid = ppd->lid | (ah_attr->src_path_bits & ((1 << ppd->lmc) - 1));
/* Check for loopback when the port lid is not set */
if (wc.slid == 0 && sqp->ibqp.qp_type == IB_QPT_GSI)
- wc.slid = HFI1_PERMISSIVE_LID;
+ wc.slid = be16_to_cpu(IB_LID_PERMISSIVE);
wc.sl = ah_attr->sl;
wc.dlid_path_bits = ah_attr->dlid & ((1 << ppd->lmc) - 1);
wc.port_num = qp->port_num;
@@ -311,11 +311,11 @@ int hfi1_make_ud_req(struct hfi1_qp *qp)
ibp = to_iport(qp->ibqp.device, qp->port_num);
ppd = ppd_from_ibp(ibp);
ah_attr = &to_iah(wqe->ud_wr.ah)->attr;
- if (ah_attr->dlid < HFI1_MULTICAST_LID_BASE ||
- ah_attr->dlid == HFI1_PERMISSIVE_LID) {
+ if (ah_attr->dlid < be16_to_cpu(IB_MULTICAST_LID_BASE) ||
+ ah_attr->dlid == be16_to_cpu(IB_LID_PERMISSIVE)) {
lid = ah_attr->dlid & ~((1 << ppd->lmc) - 1);
if (unlikely(!loopback && (lid == ppd->lid ||
- (lid == HFI1_PERMISSIVE_LID &&
+ (lid == be16_to_cpu(IB_LID_PERMISSIVE) &&
qp->ibqp.qp_type == IB_QPT_GSI)))) {
/*
* If DMAs are in progress, we can't generate
@@ -666,8 +666,8 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
qkey = be32_to_cpu(ohdr->u.ud.deth[0]);
src_qp = be32_to_cpu(ohdr->u.ud.deth[1]) & HFI1_QPN_MASK;
dlid = be16_to_cpu(hdr->lrh[1]);
- is_mcast = (dlid > HFI1_MULTICAST_LID_BASE) &&
- (dlid != HFI1_PERMISSIVE_LID);
+ is_mcast = (dlid > be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
+ (dlid != be16_to_cpu(IB_LID_PERMISSIVE));
bth1 = be32_to_cpu(ohdr->bth[1]);
if (unlikely(bth1 & HFI1_BECN_SMASK)) {
/*
@@ -872,7 +872,7 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
/*
* Save the LMC lower bits if the destination LID is a unicast LID.
*/
- wc.dlid_path_bits = dlid >= HFI1_MULTICAST_LID_BASE ? 0 :
+ wc.dlid_path_bits = dlid >= be16_to_cpu(IB_MULTICAST_LID_BASE) ? 0 :
dlid & ((1 << ppd_from_ibp(ibp)->lmc) - 1);
wc.port_num = qp->port_num;
/* Signal completion event if the solicited bit is set. */
diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c
index 11540ed..a349d86 100644
--- a/drivers/staging/rdma/hfi1/verbs.c
+++ b/drivers/staging/rdma/hfi1/verbs.c
@@ -644,8 +644,8 @@ void hfi1_ib_rcv(struct hfi1_packet *packet)
/* Get the destination QP number. */
qp_num = be32_to_cpu(packet->ohdr->bth[1]) & HFI1_QPN_MASK;
lid = be16_to_cpu(hdr->lrh[1]);
- if (unlikely((lid >= HFI1_MULTICAST_LID_BASE) &&
- (lid != HFI1_PERMISSIVE_LID))) {
+ if (unlikely((lid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
+ (lid != be16_to_cpu(IB_LID_PERMISSIVE)))) {
struct hfi1_mcast *mcast;
struct hfi1_mcast_qp *p;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-09 15:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 15:16 [RFC PATCH 00/27] IB/hfi1: Add rdmavt support to hfi1 Dennis Dalessandro
[not found] ` <20160109151020.30800.82395.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-01-09 15:16 ` [RFC PATCH 01/27] IB/hfi1: Begin to use rdmavt for verbs Dennis Dalessandro
2016-01-09 15:16 ` [RFC PATCH 02/27] IB/hfi1: Add basic rdmavt capability flags for hfi1 Dennis Dalessandro
2016-01-09 15:16 ` [RFC PATCH 03/27] IB/hfi1: Consolidate dma ops " Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 04/27] IB/hfi1: Use rdmavt protection domain Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 05/27] IB/hfi1: Remove MR data structures from hfi1 Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 06/27] IB/hfi1: Remove driver specific members from hfi1 qp type Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 07/27] IB/hfi1: Add device specific info prints Dennis Dalessandro
2016-01-09 15:17 ` Dennis Dalessandro [this message]
2016-01-09 15:17 ` [RFC PATCH 09/27] IB/hfi1: Use address handle in rdmavt and remove from hfi1 Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 10/27] IB/hfi1: Implement hfi1 support for AH notification Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 11/27] IB/hfi1: Remove hfi1 MR and hfi1 specific qp type Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 12/27] IB/hfi1: Remove srq from hfi1 Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 13/27] IB/hfi1: Remove ibport and use rdmavt version Dennis Dalessandro
2016-01-09 15:17 ` [RFC PATCH 14/27] IB/hfi1: Remove mmap from hfi1 Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 15/27] IB/hfi1: Use rdmavt pkey verbs function Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 16/27] IB/hfi1: Remove user context allocation and de-alloction functions Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 17/27] IB/hfi1: Use rdmavt send flags and recv flags Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 18/27] IB/hfi1: Remove qpdev and qpn table from hfi1 Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 19/27] IB/hfi1: Remove create_qp functionality Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 20/27] IB/hfi1: Remove query_device function Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 21/27] IB/hfi1: Remove CQ data structures and functions from hfi1 Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 22/27] IB/hfi1: Use rdmavt version of post_send Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 23/27] IB/hfi1: Remove modify queue pair from hfi1 Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 24/27] IB/hfi1: Remove destroy qp verb Dennis Dalessandro
2016-01-09 15:18 ` [RFC PATCH 25/27] IB/hfi1: Remove post_recv and use rdmavt version Dennis Dalessandro
2016-01-09 15:19 ` [RFC PATCH 26/27] IB/hfi1: Remove multicast verbs functions Dennis Dalessandro
2016-01-09 15:19 ` [RFC PATCH 27/27] IB/hfi1: Clean up register device Dennis Dalessandro
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=20160109151722.30800.85712.stgit@scvm10.sc.intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.