Lines Matching refs:rec

219 		sa_conv_pathrec_to_gid_type(struct sa_path_rec *rec)  in sa_conv_pathrec_to_gid_type()  argument
221 switch (rec->rec_type) { in sa_conv_pathrec_to_gid_type()
454 struct sa_path_rec *rec,
466 struct ib_sa_service_rec *rec,
476 struct ib_sa_mcmember_rec rec; member
513 struct ib_sa_mcmember_rec *rec,
542 union ib_gid *mgid, struct ib_sa_mcmember_rec *rec);
549 struct ib_sa_mcmember_rec *rec,
555 struct sa_path_rec *rec,
563 void ib_sa_pack_path(struct sa_path_rec *rec, void *attribute);
569 void ib_sa_unpack_path(void *attribute, struct sa_path_rec *rec);
574 struct ib_sa_guidinfo_rec *rec,
587 static inline bool sa_path_is_roce(struct sa_path_rec *rec) in sa_path_is_roce() argument
589 return ((rec->rec_type == SA_PATH_REC_TYPE_ROCE_V1) || in sa_path_is_roce()
590 (rec->rec_type == SA_PATH_REC_TYPE_ROCE_V2)); in sa_path_is_roce()
593 static inline bool sa_path_is_opa(struct sa_path_rec *rec) in sa_path_is_opa() argument
595 return (rec->rec_type == SA_PATH_REC_TYPE_OPA); in sa_path_is_opa()
598 static inline void sa_path_set_slid(struct sa_path_rec *rec, u32 slid) in sa_path_set_slid() argument
600 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_slid()
601 rec->ib.slid = cpu_to_be16(slid); in sa_path_set_slid()
602 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_slid()
603 rec->opa.slid = cpu_to_be32(slid); in sa_path_set_slid()
606 static inline void sa_path_set_dlid(struct sa_path_rec *rec, u32 dlid) in sa_path_set_dlid() argument
608 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_dlid()
609 rec->ib.dlid = cpu_to_be16(dlid); in sa_path_set_dlid()
610 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_dlid()
611 rec->opa.dlid = cpu_to_be32(dlid); in sa_path_set_dlid()
614 static inline void sa_path_set_raw_traffic(struct sa_path_rec *rec, in sa_path_set_raw_traffic() argument
617 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_set_raw_traffic()
618 rec->ib.raw_traffic = raw_traffic; in sa_path_set_raw_traffic()
619 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_set_raw_traffic()
620 rec->opa.raw_traffic = raw_traffic; in sa_path_set_raw_traffic()
623 static inline __be32 sa_path_get_slid(struct sa_path_rec *rec) in sa_path_get_slid() argument
625 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_slid()
626 return htonl(ntohs(rec->ib.slid)); in sa_path_get_slid()
627 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_slid()
628 return rec->opa.slid; in sa_path_get_slid()
632 static inline __be32 sa_path_get_dlid(struct sa_path_rec *rec) in sa_path_get_dlid() argument
634 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_dlid()
635 return htonl(ntohs(rec->ib.dlid)); in sa_path_get_dlid()
636 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_dlid()
637 return rec->opa.dlid; in sa_path_get_dlid()
641 static inline u8 sa_path_get_raw_traffic(struct sa_path_rec *rec) in sa_path_get_raw_traffic() argument
643 if (rec->rec_type == SA_PATH_REC_TYPE_IB) in sa_path_get_raw_traffic()
644 return rec->ib.raw_traffic; in sa_path_get_raw_traffic()
645 else if (rec->rec_type == SA_PATH_REC_TYPE_OPA) in sa_path_get_raw_traffic()
646 return rec->opa.raw_traffic; in sa_path_get_raw_traffic()
650 static inline void sa_path_set_dmac(struct sa_path_rec *rec, u8 *dmac) in sa_path_set_dmac() argument
652 if (sa_path_is_roce(rec)) in sa_path_set_dmac()
653 memcpy(rec->roce.dmac, dmac, ETH_ALEN); in sa_path_set_dmac()
656 static inline void sa_path_set_dmac_zero(struct sa_path_rec *rec) in sa_path_set_dmac_zero() argument
658 if (sa_path_is_roce(rec)) in sa_path_set_dmac_zero()
659 eth_zero_addr(rec->roce.dmac); in sa_path_set_dmac_zero()
662 static inline u8 *sa_path_get_dmac(struct sa_path_rec *rec) in sa_path_get_dmac() argument
664 if (sa_path_is_roce(rec)) in sa_path_get_dmac()
665 return rec->roce.dmac; in sa_path_get_dmac()