From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Shiraz Saleem
<shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH for-next v2 15/16] IB/core: Map iWarp AH type to undefined in rdma_ah_find_type
Date: Fri, 26 Jan 2018 15:32:52 -0700 [thread overview]
Message-ID: <20180126223252.GE23869@ziepe.ca> (raw)
In-Reply-To: <20180126213043.12097.88707.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
On Fri, Jan 26, 2018 at 01:30:46PM -0800, Dennis Dalessandro wrote:
> From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> iWarp devices do not support the creation of address handles
> so return AH_ATTR_TYPE_UNDEFINED for all iWarp devices.
>
> While we are here reduce the size of port_num to u8 and add
> a comment.
>
> Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
> Reported-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> CC: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Changes since v1: Add Shiraz RB tag, move undefined to be 0 not 3
> include/rdma/ib_verbs.h | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 5e32fe7..0eb3074 100644
> +++ b/include/rdma/ib_verbs.h
> @@ -878,6 +878,7 @@ struct ib_mr_status {
> __attribute_const__ enum ib_rate mult_to_ib_rate(int mult);
>
> enum rdma_ah_attr_type {
> + RDMA_AH_ATTR_TYPE_UNDEFINED,
> RDMA_AH_ATTR_TYPE_IB,
> RDMA_AH_ATTR_TYPE_ROCE,
> RDMA_AH_ATTR_TYPE_OPA,
> @@ -3789,12 +3790,19 @@ static inline void rdma_ah_set_grh(struct rdma_ah_attr *attr,
> grh->traffic_class = traffic_class;
> }
>
> -/*Get AH type */
> +/**
> + * rdma_ah_find_type - Return address handle type.
> + *
> + * @dev: Device to be checked
> + * @port_num: Port number
> + */
> static inline enum rdma_ah_attr_type rdma_ah_find_type(struct ib_device *dev,
> - u32 port_num)
> + u8 port_num)
> {
> if (rdma_protocol_roce(dev, port_num))
> return RDMA_AH_ATTR_TYPE_ROCE;
> + else if (rdma_protocol_iwarp(dev, port_num))
> + return RDMA_AH_ATTR_TYPE_UNDEFINED;
> else if ((rdma_protocol_ib(dev, port_num)) &&
> (rdma_cap_opa_ah(dev, port_num)))
> return RDMA_AH_ATTR_TYPE_OPA;
Let's not add an UNDEFINED type in the middle of an if casecade with an all
other cases fall through please:
static inline enum rdma_ah_attr_type rdma_ah_find_type(struct ib_device *dev,
u32 port_num)
{
if (rdma_protocol_roce(dev, port_num))
return RDMA_AH_ATTR_TYPE_ROCE;
if (rdma_protocol_ib(dev, port_num)) {
if (rdma_cap_opa_ah(dev, port_num))
return RDMA_AH_ATTR_TYPE_OPA;
return RDMA_AH_ATTR_TYPE_IB;
}
return RDMA_AH_ATTR_TYPE_UNDEFINED;
}
I'm not sure sending all these unrelated patches in one series is such
a helpful idea. Lot of trouble for everyone just to respond to one
minor comment.
This series looks like 4-5 topics to me:
- Optimize HFI
- 2 patches realted to the interrupt race
- Random driver fixes
- IPoIB fix
- This patch
Jason
--
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:[~2018-01-26 22:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 21:28 [PATCH for-next v2 00/16] IB/hfi1, core: Driver updates for 1/26/2018 Dennis Dalessandro
[not found] ` <20180126211126.12097.47410.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 21:28 ` [PATCH for-next v2 01/16] IB/hfi1: Do not override given pcie_pset value Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 02/16] IB/hfi1: Fix for early release of sdma context Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 03/16] IB/hfi1: Remove dependence on qp->s_hdrwords Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 04/16] IB/hfi1: Remove blind constants from 16B update Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 05/16] IB/hfi1: Convert PortXmitWait/PortVLXmitWait counters to flit times Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 06/16] IB/hfi1: Fix for potential refcount leak in hfi1_open_file() Dennis Dalessandro
[not found] ` <20180126212933.12097.3989.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 22:33 ` Jason Gunthorpe
2018-01-26 21:29 ` [PATCH for-next v2 07/16] IB/hfi1: Show fault stats in both TX and RX directions Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 08/16] IB/hfi1: Prevent LNI hang when LCB can't obtain lanes Dennis Dalessandro
2018-01-26 21:29 ` [PATCH for-next v2 09/16] IB/hfi1: Compute BTH only for RDMA_WRITE_LAST/SEND_LAST packet Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 10/16] IB/hfi1: Optimize packet type comparison using 9B and bypass code paths Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 11/16] IB/hfi1: Look up ibport using a pointer in receive path Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 12/16] IB/hfi1: Remove unnecessary fecn and becn fields Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 13/16] IB/hfi1: Optimize process_receive_ib() Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 14/16] IB/hfi1: Re-order IRQ cleanup to address driver cleanup race Dennis Dalessandro
2018-01-26 21:30 ` [PATCH for-next v2 15/16] IB/core: Map iWarp AH type to undefined in rdma_ah_find_type Dennis Dalessandro
[not found] ` <20180126213043.12097.88707.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-26 21:39 ` Parav Pandit
[not found] ` <VI1PR0502MB300863FABEA9D4B962E4D826D1E00-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-26 21:41 ` Parav Pandit
2018-01-27 1:24 ` Weiny, Ira
2018-01-26 22:32 ` Jason Gunthorpe [this message]
[not found] ` <20180126223252.GE23869-uk2M96/98Pc@public.gmane.org>
2018-01-29 13:24 ` Dennis Dalessandro
[not found] ` <368266b8-ae79-3804-38d0-e7730126b532-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-31 13:55 ` Dennis Dalessandro
[not found] ` <e2a7ac03-539f-9427-b2bb-03ba7f54cbf3-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-31 15:31 ` Doug Ledford
2018-01-26 21:30 ` [PATCH for-next v2 16/16] IB/ipoib: Fix for potential no-carrier state 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=20180126223252.GE23869@ziepe.ca \
--to=jgg-uk2m96/98pc@public.gmane.org \
--cc=dennis.dalessandro-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 \
--cc=parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=shiraz.saleem-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox