IB/SA: Add support to query OPA path records
When the bit 26 of capmask2 field in OPA classport info query is set, SA will query for OPA path records instead of querying for IB path records. Note that OPA path records can only be queried by kernel ULPs. Userspace clients continue to query IB path records. Reviewed-by: Don Hiatt <don.hiatt@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
5752075144
commit
4c33bd1926
@@ -262,6 +262,8 @@ struct ib_class_port_info {
|
||||
__be32 trap_qkey;
|
||||
};
|
||||
|
||||
#define OPA_CLASS_PORT_INFO_PR_SUPPORT BIT(26)
|
||||
|
||||
struct opa_class_port_info {
|
||||
u8 base_version;
|
||||
u8 class_version;
|
||||
@@ -340,6 +342,17 @@ static inline void ib_set_cpi_capmask2(struct ib_class_port_info *cpi,
|
||||
IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* opa_get_cpi_capmask2 - Returns the capmask2 value from
|
||||
* cap_mask2_resp_time in ib_class_port_info.
|
||||
* @cpi: A struct opa_class_port_info mad.
|
||||
*/
|
||||
static inline u32 opa_get_cpi_capmask2(struct opa_class_port_info *cpi)
|
||||
{
|
||||
return (be32_to_cpu(cpi->cap_mask2_resp_time) >>
|
||||
IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE);
|
||||
}
|
||||
|
||||
struct ib_mad_notice_attr {
|
||||
u8 generic_type;
|
||||
u8 prod_type_msb;
|
||||
|
Reference in New Issue
Block a user