Lines Matching refs:rec

192 		sa_conv_pathrec_to_gid_type(struct sa_path_rec *rec)  in sa_conv_pathrec_to_gid_type()  argument
194 switch (rec->rec_type) { in sa_conv_pathrec_to_gid_type()
426 u8 port_num, struct sa_path_rec *rec,
435 struct ib_sa_service_rec *rec,
444 struct ib_sa_mcmember_rec rec; member
481 struct ib_sa_mcmember_rec *rec,
510 union ib_gid *mgid, struct ib_sa_mcmember_rec *rec);
517 struct ib_sa_mcmember_rec *rec,
523 struct sa_path_rec *rec,
531 void ib_sa_pack_path(struct sa_path_rec *rec, void *attribute);
537 void ib_sa_unpack_path(void *attribute, struct sa_path_rec *rec);
542 struct ib_sa_guidinfo_rec *rec,
554 static inline bool sa_path_is_roce(struct sa_path_rec *rec) in sa_path_is_roce() argument
556 return ((rec->rec_type == SA_PATH_REC_TYPE_ROCE_V1) || in sa_path_is_roce()
557 (rec->rec_type == SA_PATH_REC_TYPE_ROCE_V2)); in sa_path_is_roce()
560 static inline bool sa_path_is_opa(struct sa_path_rec *rec) in sa_path_is_opa() argument
562 return (rec->rec_type == SA_PATH_REC_TYPE_OPA); in sa_path_is_opa()
565 static inline void sa_path_set_slid(struct sa_path_rec *rec, u32 slid) in sa_path_set_slid() argument
567 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_slid()
568 rec->ib.slid = cpu_to_be16(slid); in sa_path_set_slid()
569 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_slid()
570 rec->opa.slid = cpu_to_be32(slid); in sa_path_set_slid()
573 static inline void sa_path_set_dlid(struct sa_path_rec *rec, u32 dlid) in sa_path_set_dlid() argument
575 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_dlid()
576 rec->ib.dlid = cpu_to_be16(dlid); in sa_path_set_dlid()
577 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_dlid()
578 rec->opa.dlid = cpu_to_be32(dlid); in sa_path_set_dlid()
581 static inline void sa_path_set_raw_traffic(struct sa_path_rec *rec, in sa_path_set_raw_traffic() argument
584 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_raw_traffic()
585 rec->ib.raw_traffic = raw_traffic; in sa_path_set_raw_traffic()
586 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_raw_traffic()
587 rec->opa.raw_traffic = raw_traffic; in sa_path_set_raw_traffic()
590 static inline __be32 sa_path_get_slid(struct sa_path_rec *rec) in sa_path_get_slid() argument
592 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_slid()
593 return htonl(ntohs(rec->ib.slid)); in sa_path_get_slid()
594 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_slid()
595 return rec->opa.slid; in sa_path_get_slid()
599 static inline __be32 sa_path_get_dlid(struct sa_path_rec *rec) in sa_path_get_dlid() argument
601 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_dlid()
602 return htonl(ntohs(rec->ib.dlid)); in sa_path_get_dlid()
603 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_dlid()
604 return rec->opa.dlid; in sa_path_get_dlid()
608 static inline u8 sa_path_get_raw_traffic(struct sa_path_rec *rec) in sa_path_get_raw_traffic() argument
610 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_raw_traffic()
611 return rec->ib.raw_traffic; in sa_path_get_raw_traffic()
612 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_raw_traffic()
613 return rec->opa.raw_traffic; in sa_path_get_raw_traffic()
617 static inline void sa_path_set_dmac(struct sa_path_rec *rec, u8 *dmac) in sa_path_set_dmac() argument
619 if (sa_path_is_roce(rec)) in sa_path_set_dmac()
620 memcpy(rec->roce.dmac, dmac, ETH_ALEN); in sa_path_set_dmac()
623 static inline void sa_path_set_dmac_zero(struct sa_path_rec *rec) in sa_path_set_dmac_zero() argument
625 if (sa_path_is_roce(rec)) in sa_path_set_dmac_zero()
626 eth_zero_addr(rec->roce.dmac); in sa_path_set_dmac_zero()
629 static inline u8 *sa_path_get_dmac(struct sa_path_rec *rec) in sa_path_get_dmac() argument
631 if (sa_path_is_roce(rec)) in sa_path_get_dmac()
632 return rec->roce.dmac; in sa_path_get_dmac()