From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 5/5] IB/core: Add rdma_cap_opa_mad helper using RDMA_CORE_CAP_OPA_MAD flag
Date: Wed, 13 May 2015 15:23:22 -0400 [thread overview]
Message-ID: <5553A4AA.4050005@dev.mellanox.co.il> (raw)
In-Reply-To: <1431395218-27693-6-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On 5/11/2015 9:46 PM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> OPA MADs share a common header with IBTA MADs but with a different base version
> and an extended length. These MADs increase the performance of management
> traffic on OPA devices.
>
> Sharing a common header with IBTA MADs allows us to share most of the MAD
> processing code when dealing with OPA MADs in addition to supporting some IBTA
> MADs on OPA devices.
>
> This patch adds the Core Capability flag for OPA MADs.
>
> Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> ---
> include/rdma/ib_verbs.h | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 162a831..c4b37b3 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -362,6 +362,7 @@ union rdma_protocol_stats {
> #define RDMA_CORE_CAP_IB_CM 0x00000004
> #define RDMA_CORE_CAP_IW_CM 0x00000008
> #define RDMA_CORE_CAP_IB_SA 0x00000010
> +#define RDMA_CORE_CAP_OPA_MAD 0x00000020
>
> /* Address format 0x000FF000 */
> #define RDMA_CORE_CAP_AF_IB 0x00001000
> @@ -386,6 +387,8 @@ union rdma_protocol_stats {
> | RDMA_CORE_CAP_ETH_AH)
> #define RDMA_CORE_PORT_IWARP (RDMA_CORE_CAP_PROT_IWARP \
> | RDMA_CORE_CAP_IW_CM)
> +#define RDMA_CORE_PORT_INTEL_OPA (RDMA_CORE_PORT_IBA_IB \
> + | RDMA_CORE_CAP_OPA_MAD)
>
> struct ib_port_attr {
> enum ib_port_state state;
> @@ -1836,6 +1839,21 @@ static inline bool rdma_cap_ib_mad(struct ib_device *device, u8 port_num)
> }
>
> /**
> + * rdma_cap_opa_mad - Check if the port of device supports OPA defined
> + * Management Datagrams.
> + *
> + * @device: Device to be checked
> + * @port_num: Port number of the device
> + *
> + * Return 0 when port of the device does not support OPA
> + * Management Datagrams.
> + */
> +static inline int rdma_cap_opa_mad(struct ib_device *device, u8 port_num)
> +{
> + return (device->port_immutable[port_num].core_cap_flags & RDMA_CORE_CAP_OPA_MAD);
> +}
> +
> +/**
> * rdma_cap_ib_smi - Check if the port of device has the capability Infiniband
> * Subnet Management Interface.
> *
This patch should be part of an OPA patch series where the helper is
actually used.
-- Hal
--
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
prev parent reply other threads:[~2015-05-13 19:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 1:46 [PATCH 0/5] Convert management helpers to Core Capability bits ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1431395218-27693-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-12 1:46 ` [PATCH 1/5] IB/user_mad: Fix bug in ib_umad_remove_one when rdma_cap_ib_mad implementation changed ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1431395218-27693-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-12 2:29 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A8FCE4C5-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-12 14:42 ` Weiny, Ira
2015-05-12 19:15 ` Jason Gunthorpe
[not found] ` <20150512191505.GB3503-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-12 21:53 ` ira.weiny
2015-05-12 1:46 ` [PATCH 2/5] IB/core: Formalize the creation of immutable per port data within the ib_device object ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1431395218-27693-3-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-12 15:25 ` Doug Ledford
[not found] ` <1431444301.43876.34.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-12 17:48 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E1107CBB6-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-12 17:54 ` Doug Ledford
2015-05-12 19:21 ` Jason Gunthorpe
[not found] ` <20150512192109.GC3503-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-12 21:02 ` ira.weiny
[not found] ` <20150512210225.GA7341-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-12 22:17 ` Jason Gunthorpe
2015-05-12 1:46 ` [PATCH 3/5] IB/core: Convert management helpers to core capability bits ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1431395218-27693-4-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-12 2:38 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A8FCE4DE-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-12 21:54 ` ira.weiny
2015-05-12 19:25 ` Jason Gunthorpe
[not found] ` <20150512192517.GD3503-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-12 22:06 ` ira.weiny
2015-05-12 1:46 ` [PATCH 4/5] IB/core: Add rdma_dev_max_mad_size helper call ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-12 1:46 ` [PATCH 5/5] IB/core: Add rdma_cap_opa_mad helper using RDMA_CORE_CAP_OPA_MAD flag ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1431395218-27693-6-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-13 19:23 ` Hal Rosenstock [this message]
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=5553A4AA.4050005@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox