Lines Matching refs:smp
95 opa_get_smp_direction(struct opa_smp *smp) in opa_get_smp_direction() argument
97 return ib_get_smp_direction((struct ib_smp *)smp); in opa_get_smp_direction()
100 static inline u8 *opa_get_smp_data(struct opa_smp *smp) in opa_get_smp_data() argument
102 if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in opa_get_smp_data()
103 return smp->route.dr.data; in opa_get_smp_data()
105 return smp->route.lid.data; in opa_get_smp_data()
108 static inline size_t opa_get_smp_data_size(struct opa_smp *smp) in opa_get_smp_data_size() argument
110 if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in opa_get_smp_data_size()
111 return sizeof(smp->route.dr.data); in opa_get_smp_data_size()
113 return sizeof(smp->route.lid.data); in opa_get_smp_data_size()
116 static inline size_t opa_get_smp_header_size(struct opa_smp *smp) in opa_get_smp_header_size() argument
118 if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in opa_get_smp_header_size()
119 return sizeof(*smp) - sizeof(smp->route.dr.data); in opa_get_smp_header_size()
121 return sizeof(*smp) - sizeof(smp->route.lid.data); in opa_get_smp_header_size()