summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-01-12 07:58:42 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-01-15 15:33:21 -0700
commita6532e7139660c103dda181aa5b2c734aa26ed6c (patch)
tree8430cb261887242c9088e4fa672871d261af3292
parentcd2a6e7d384b043d5d029e39663061cebc949385 (diff)
downloadlinux-stable-a6532e7139660c103dda181aa5b2c734aa26ed6c.tar.gz
linux-stable-a6532e7139660c103dda181aa5b2c734aa26ed6c.tar.bz2
linux-stable-a6532e7139660c103dda181aa5b2c734aa26ed6c.zip
RDMA/core: Clarify rdma_ah_find_type
iWARP does not use rdma_ah_attr_type, and for this reason we do not have a RDMA_AH_ATTR_TYPE_IWARP. rdma_ah_find_type should not even be called on iwarp ports and for clarity it shouldn't have a special test for iWarp. This changes the result from RDMA_AH_ATTR_TYPE_ROCE to RDMA_AH_ATTR_TYPE_IB when wrongly called on an iWarp port. Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types") Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--include/rdma/ib_verbs.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index f2b1e2244016..5e32fe781ca3 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -3793,8 +3793,7 @@ static inline void rdma_ah_set_grh(struct rdma_ah_attr *attr,
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)) ||
- (rdma_protocol_iwarp(dev, port_num)))
+ if (rdma_protocol_roce(dev, port_num))
return RDMA_AH_ATTR_TYPE_ROCE;
else if ((rdma_protocol_ib(dev, port_num)) &&
(rdma_cap_opa_ah(dev, port_num)))