[PATCH rdma-next 25/43] RDMA/cm: Convert REQ SRQ field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Convert REQ SRQ field to new scheme.

Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
---
 drivers/infiniband/core/cm.c      |  4 ++--
 drivers/infiniband/core/cm_msgs.h | 11 -----------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 0450d75f8d53..d28501559d7d 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -1297,7 +1297,7 @@ static void cm_format_req(struct cm_req_msg *req_msg,
 		       param->responder_resources);
 		CM_SET(REQ_RETRY_COUNT, req_msg, param->retry_count);
 		CM_SET(REQ_RNR_RETRY_COUNT, req_msg, param->rnr_retry_count);
-		cm_req_set_srq(req_msg, param->srq);
+		CM_SET(REQ_SRQ, req_msg, param->srq);
 	}
 
 	req_msg->primary_local_gid = pri_path->sgid;
@@ -1704,7 +1704,7 @@ static void cm_format_req_event(struct cm_work *work,
 		CM_GET(REQ_LOCAL_CM_RESPONSE_TIMEOUT, req_msg);
 	param->retry_count = CM_GET(REQ_RETRY_COUNT, req_msg);
 	param->rnr_retry_count = CM_GET(REQ_RNR_RETRY_COUNT, req_msg);
-	param->srq = cm_req_get_srq(req_msg);
+	param->srq = CM_GET(REQ_SRQ, req_msg);
 	param->ppath_sgid_attr = cm_id_priv->av.ah_attr.grh.sgid_attr;
 	work->cm_event.private_data = &req_msg->private_data;
 	work->cm_event.private_data_len = CM_REQ_PRIVATE_DATA_SIZE;
diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h
index 677b61a85e1f..112ece857fd8 100644
--- a/drivers/infiniband/core/cm_msgs.h
+++ b/drivers/infiniband/core/cm_msgs.h
@@ -400,17 +400,6 @@ struct cm_req_msg {
 
 } __packed;
 
-static inline u8 cm_req_get_srq(struct cm_req_msg *req_msg)
-{
-	return (req_msg->offset51 & 0x8) >> 3;
-}
-
-static inline void cm_req_set_srq(struct cm_req_msg *req_msg, u8 srq)
-{
-	req_msg->offset51 = (u8) ((req_msg->offset51 & 0xF7) |
-				  ((srq & 0x1) << 3));
-}
-
 static inline __be32 cm_req_get_primary_flow_label(struct cm_req_msg *req_msg)
 {
 	return cpu_to_be32(be32_to_cpu(req_msg->primary_offset88) >> 12);
-- 
2.20.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux