|
@@ -874,6 +874,7 @@ struct ib_mr_status {
|
|
|
__attribute_const__ enum ib_rate mult_to_ib_rate(int mult);
|
|
__attribute_const__ enum ib_rate mult_to_ib_rate(int mult);
|
|
|
|
|
|
|
|
enum rdma_ah_attr_type {
|
|
enum rdma_ah_attr_type {
|
|
|
|
|
+ RDMA_AH_ATTR_TYPE_UNDEFINED,
|
|
|
RDMA_AH_ATTR_TYPE_IB,
|
|
RDMA_AH_ATTR_TYPE_IB,
|
|
|
RDMA_AH_ATTR_TYPE_ROCE,
|
|
RDMA_AH_ATTR_TYPE_ROCE,
|
|
|
RDMA_AH_ATTR_TYPE_OPA,
|
|
RDMA_AH_ATTR_TYPE_OPA,
|
|
@@ -3810,17 +3811,24 @@ static inline void rdma_ah_set_grh(struct rdma_ah_attr *attr,
|
|
|
grh->traffic_class = traffic_class;
|
|
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,
|
|
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))
|
|
if (rdma_protocol_roce(dev, port_num))
|
|
|
return RDMA_AH_ATTR_TYPE_ROCE;
|
|
return RDMA_AH_ATTR_TYPE_ROCE;
|
|
|
- else if ((rdma_protocol_ib(dev, port_num)) &&
|
|
|
|
|
- (rdma_cap_opa_ah(dev, port_num)))
|
|
|
|
|
- return RDMA_AH_ATTR_TYPE_OPA;
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ 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_IB;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return RDMA_AH_ATTR_TYPE_UNDEFINED;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|