lap_msg 3079 drivers/infiniband/core/cm.c static void cm_format_lap(struct cm_lap_msg *lap_msg, lap_msg 3090 drivers/infiniband/core/cm.c cm_format_mad_hdr(&lap_msg->hdr, CM_LAP_ATTR_ID, lap_msg 3092 drivers/infiniband/core/cm.c lap_msg->local_comm_id = cm_id_priv->id.local_id; lap_msg 3093 drivers/infiniband/core/cm.c lap_msg->remote_comm_id = cm_id_priv->id.remote_id; lap_msg 3094 drivers/infiniband/core/cm.c cm_lap_set_remote_qpn(lap_msg, cm_id_priv->remote_qpn); lap_msg 3096 drivers/infiniband/core/cm.c cm_lap_set_remote_resp_timeout(lap_msg, 0x1F); lap_msg 3097 drivers/infiniband/core/cm.c lap_msg->alt_local_lid = lap_msg 3099 drivers/infiniband/core/cm.c lap_msg->alt_remote_lid = lap_msg 3101 drivers/infiniband/core/cm.c lap_msg->alt_local_gid = alternate_path->sgid; lap_msg 3102 drivers/infiniband/core/cm.c lap_msg->alt_remote_gid = alternate_path->dgid; lap_msg 3104 drivers/infiniband/core/cm.c lap_msg->alt_local_gid.global.interface_id lap_msg 3106 drivers/infiniband/core/cm.c lap_msg->alt_remote_gid.global.interface_id lap_msg 3109 drivers/infiniband/core/cm.c cm_lap_set_flow_label(lap_msg, alternate_path->flow_label); lap_msg 3110 drivers/infiniband/core/cm.c cm_lap_set_traffic_class(lap_msg, alternate_path->traffic_class); lap_msg 3111 drivers/infiniband/core/cm.c lap_msg->alt_hop_limit = alternate_path->hop_limit; lap_msg 3112 drivers/infiniband/core/cm.c cm_lap_set_packet_rate(lap_msg, alternate_path->rate); lap_msg 3113 drivers/infiniband/core/cm.c cm_lap_set_sl(lap_msg, alternate_path->sl); lap_msg 3114 drivers/infiniband/core/cm.c cm_lap_set_subnet_local(lap_msg, 1); /* local only... */ lap_msg 3115 drivers/infiniband/core/cm.c cm_lap_set_local_ack_timeout(lap_msg, lap_msg 3120 drivers/infiniband/core/cm.c memcpy(lap_msg->private_data, private_data, private_data_len); lap_msg 3177 drivers/infiniband/core/cm.c static void cm_format_path_lid_from_lap(struct cm_lap_msg *lap_msg, lap_msg 3183 drivers/infiniband/core/cm.c sa_path_set_dlid(path, ntohs(lap_msg->alt_local_lid)); lap_msg 3184 drivers/infiniband/core/cm.c sa_path_set_slid(path, ntohs(lap_msg->alt_remote_lid)); lap_msg 3186 drivers/infiniband/core/cm.c lid = opa_get_lid_from_gid(&lap_msg->alt_local_gid); lap_msg 3189 drivers/infiniband/core/cm.c lid = opa_get_lid_from_gid(&lap_msg->alt_remote_gid); lap_msg 3196 drivers/infiniband/core/cm.c struct cm_lap_msg *lap_msg) lap_msg 3198 drivers/infiniband/core/cm.c path->dgid = lap_msg->alt_local_gid; lap_msg 3199 drivers/infiniband/core/cm.c path->sgid = lap_msg->alt_remote_gid; lap_msg 3200 drivers/infiniband/core/cm.c path->flow_label = cm_lap_get_flow_label(lap_msg); lap_msg 3201 drivers/infiniband/core/cm.c path->hop_limit = lap_msg->alt_hop_limit; lap_msg 3202 drivers/infiniband/core/cm.c path->traffic_class = cm_lap_get_traffic_class(lap_msg); lap_msg 3205 drivers/infiniband/core/cm.c path->sl = cm_lap_get_sl(lap_msg); lap_msg 3209 drivers/infiniband/core/cm.c path->rate = cm_lap_get_packet_rate(lap_msg); lap_msg 3211 drivers/infiniband/core/cm.c path->packet_life_time = cm_lap_get_local_ack_timeout(lap_msg); lap_msg 3213 drivers/infiniband/core/cm.c cm_format_path_lid_from_lap(lap_msg, path); lap_msg 3219 drivers/infiniband/core/cm.c struct cm_lap_msg *lap_msg; lap_msg 3232 drivers/infiniband/core/cm.c lap_msg = (struct cm_lap_msg *)work->mad_recv_wc->recv_buf.mad; lap_msg 3233 drivers/infiniband/core/cm.c cm_id_priv = cm_acquire_id(lap_msg->remote_comm_id, lap_msg 3234 drivers/infiniband/core/cm.c lap_msg->local_comm_id); lap_msg 3243 drivers/infiniband/core/cm.c &lap_msg->alt_local_gid); lap_msg 3245 drivers/infiniband/core/cm.c cm_format_path_from_lap(cm_id_priv, param->alternate_path, lap_msg); lap_msg 3246 drivers/infiniband/core/cm.c work->cm_event.private_data = &lap_msg->private_data; lap_msg 3294 drivers/infiniband/core/cm.c cm_id_priv->tid = lap_msg->hdr.tid; lap_msg 680 drivers/infiniband/core/cm_msgs.h static inline __be32 cm_lap_get_remote_qpn(struct cm_lap_msg *lap_msg) lap_msg 682 drivers/infiniband/core/cm_msgs.h return cpu_to_be32(be32_to_cpu(lap_msg->offset12) >> 8); lap_msg 685 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_remote_qpn(struct cm_lap_msg *lap_msg, __be32 qpn) lap_msg 687 drivers/infiniband/core/cm_msgs.h lap_msg->offset12 = cpu_to_be32((be32_to_cpu(qpn) << 8) | lap_msg 688 drivers/infiniband/core/cm_msgs.h (be32_to_cpu(lap_msg->offset12) & lap_msg 692 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_remote_resp_timeout(struct cm_lap_msg *lap_msg) lap_msg 694 drivers/infiniband/core/cm_msgs.h return (u8) ((be32_to_cpu(lap_msg->offset12) & 0xF8) >> 3); lap_msg 697 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_remote_resp_timeout(struct cm_lap_msg *lap_msg, lap_msg 700 drivers/infiniband/core/cm_msgs.h lap_msg->offset12 = cpu_to_be32((resp_timeout << 3) | lap_msg 701 drivers/infiniband/core/cm_msgs.h (be32_to_cpu(lap_msg->offset12) & lap_msg 705 drivers/infiniband/core/cm_msgs.h static inline __be32 cm_lap_get_flow_label(struct cm_lap_msg *lap_msg) lap_msg 707 drivers/infiniband/core/cm_msgs.h return cpu_to_be32(be32_to_cpu(lap_msg->offset56) >> 12); lap_msg 710 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_flow_label(struct cm_lap_msg *lap_msg, lap_msg 713 drivers/infiniband/core/cm_msgs.h lap_msg->offset56 = cpu_to_be32( lap_msg 714 drivers/infiniband/core/cm_msgs.h (be32_to_cpu(lap_msg->offset56) & 0x00000FFF) | lap_msg 718 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_traffic_class(struct cm_lap_msg *lap_msg) lap_msg 720 drivers/infiniband/core/cm_msgs.h return (u8) be32_to_cpu(lap_msg->offset56); lap_msg 723 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_traffic_class(struct cm_lap_msg *lap_msg, lap_msg 726 drivers/infiniband/core/cm_msgs.h lap_msg->offset56 = cpu_to_be32(traffic_class | lap_msg 727 drivers/infiniband/core/cm_msgs.h (be32_to_cpu(lap_msg->offset56) & lap_msg 731 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_packet_rate(struct cm_lap_msg *lap_msg) lap_msg 733 drivers/infiniband/core/cm_msgs.h return lap_msg->offset61 & 0x3F; lap_msg 736 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_packet_rate(struct cm_lap_msg *lap_msg, lap_msg 739 drivers/infiniband/core/cm_msgs.h lap_msg->offset61 = (packet_rate & 0x3F) | (lap_msg->offset61 & 0xC0); lap_msg 742 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_sl(struct cm_lap_msg *lap_msg) lap_msg 744 drivers/infiniband/core/cm_msgs.h return lap_msg->offset62 >> 4; lap_msg 747 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_sl(struct cm_lap_msg *lap_msg, u8 sl) lap_msg 749 drivers/infiniband/core/cm_msgs.h lap_msg->offset62 = (sl << 4) | (lap_msg->offset62 & 0x0F); lap_msg 752 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_subnet_local(struct cm_lap_msg *lap_msg) lap_msg 754 drivers/infiniband/core/cm_msgs.h return (lap_msg->offset62 >> 3) & 0x1; lap_msg 757 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_subnet_local(struct cm_lap_msg *lap_msg, lap_msg 760 drivers/infiniband/core/cm_msgs.h lap_msg->offset62 = ((subnet_local & 0x1) << 3) | lap_msg 761 drivers/infiniband/core/cm_msgs.h (lap_msg->offset61 & 0xF7); lap_msg 763 drivers/infiniband/core/cm_msgs.h static inline u8 cm_lap_get_local_ack_timeout(struct cm_lap_msg *lap_msg) lap_msg 765 drivers/infiniband/core/cm_msgs.h return lap_msg->offset63 >> 3; lap_msg 768 drivers/infiniband/core/cm_msgs.h static inline void cm_lap_set_local_ack_timeout(struct cm_lap_msg *lap_msg, lap_msg 771 drivers/infiniband/core/cm_msgs.h lap_msg->offset63 = (local_ack_timeout << 3) | lap_msg 772 drivers/infiniband/core/cm_msgs.h (lap_msg->offset63 & 0x07);