All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dasaratharaman Chandramouli <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH rdma-core 6/7] IB/core: Add rdma_cap_opa_ah to expose opa address handles
Date: Wed, 15 Mar 2017 17:24:25 -0400	[thread overview]
Message-ID: <1489613066-61684-7-git-send-email-dasaratharaman.chandramouli@intel.com> (raw)
In-Reply-To: <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

rdma_cap_opa_ah(..) enables core components to check if the
corresponding port supports OPA extended addressing.

Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 include/rdma/ib_verbs.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 8c61532..64cc4ef 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -493,6 +493,7 @@ static inline struct rdma_hw_stats *rdma_alloc_hw_stats_struct(
 /* Address format                       0x000FF000 */
 #define RDMA_CORE_CAP_AF_IB             0x00001000
 #define RDMA_CORE_CAP_ETH_AH            0x00002000
+#define RDMA_CORE_CAP_OPA_AH            0x00004000
 
 /* Protocol                             0xFFF00000 */
 #define RDMA_CORE_CAP_PROT_IB           0x00100000
@@ -2519,6 +2520,21 @@ static inline bool rdma_cap_eth_ah(const struct ib_device *device, u8 port_num)
 }
 
 /**
+ * rdma_cap_opa_ah - Check if the port of device supports
+ * OPA Address handles
+ * @device: Device to check
+ * @port_num: Port number to check
+ *
+ * Return: true if we are running on an OPA device which supports
+ * the extended OPA addressing.
+ */
+static inline bool rdma_cap_opa_ah(struct ib_device *device, u8 port_num)
+{
+	return (device->port_immutable[port_num].core_cap_flags &
+		RDMA_CORE_CAP_OPA_AH) == RDMA_CORE_CAP_OPA_AH;
+}
+
+/**
  * rdma_max_mad_size - Return the max MAD size required by this RDMA Port.
  *
  * @device: Device
-- 
1.8.3.1

--
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

  parent reply	other threads:[~2017-03-15 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 21:24 [PATCH rdma-core 0/7] Add support for OPA classport info Dasaratharaman Chandramouli
     [not found] ` <1489613066-61684-1-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-15 21:24   ` [PATCH rdma-core 1/7] IB/SA: Fix lines longer than 80 columns Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 2/7] IB/SA: Add braces when using sizeof Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 3/7] IB/SA: Remove unwanted braces Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 4/7] IB/SA: Move functions update_sm_ah() and ib_sa_event() Dasaratharaman Chandramouli
2017-03-15 21:24   ` [PATCH rdma-core 5/7] IB/SA: Modify SA to implicity cache Class Port info Dasaratharaman Chandramouli
     [not found]     ` <1489613066-61684-6-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-16 12:59       ` Hal Rosenstock
     [not found]         ` <c01d0080-26da-8eb9-59b6-6d959457ea0c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-03-16 18:27           ` Chandramouli, Dasaratharaman
2017-03-15 21:24   ` Dasaratharaman Chandramouli [this message]
2017-03-15 21:24   ` [PATCH rdma-core 7/7] IB/SA: Add support to query opa classport info Dasaratharaman Chandramouli
2017-03-20  7:49   ` [PATCH rdma-core 0/7] Add support for OPA " Leon Romanovsky
     [not found]     ` <20170320074911.GW2079-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-20 18:21       ` Chandramouli, Dasaratharaman

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=1489613066-61684-7-git-send-email-dasaratharaman.chandramouli@intel.com \
    --to=dasaratharaman.chandramouli-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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.