vmw_pvrdma: Drop the extraneous align_next_power2 for sges
PATCH 1/1 vmw_pvrdma: Drop the extraneous align_next_power2 for sges
Fixes 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support")
Reviewed-by Aditya Sarwade <[email protected]>
Reviewed-by Bryan Tan <[email protected]>
Reviewed-by Nitish Bhat <[email protected]>
Signed-off-by Adit Ranadive <[email protected]>
---v0->v1: Updated commit message
providers/vmw_pvrdma/qp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
providers/vmw_pvrdma/qp.c +3 -5
@@ -113,7 +113,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd,int ret; attr->attr.max_wr =align_next_power2 (max_t (uint32_t,1U , attr->attr.max_wr)); - attr->attr.max_sge =align_next_power2 (max_t (uint32_t,1U , attr->attr.max_sge)); + attr->attr.max_sge =max_t (uint32_t,1U , attr->attr.max_sge); srq =malloc (sizeof (*srq));if (!srq)
@@ -216,14 +216,12 @@ struct ibv_qp *pvrdma_create_qp(struct ibv_pd *pd,int ret;int is_srq = !!(attr->srq); - attr->cap.max_send_sge = -align_next_power2 (max_t (uint32_t,1U , attr->cap.max_send_sge)); + attr->cap.max_send_sge =max_t (uint32_t,1U , attr->cap.max_send_sge); attr->cap.max_send_wr =align_next_power2 (max_t (uint32_t,1U , attr->cap.max_send_wr));if (!is_srq) { - attr->cap.max_recv_sge = -align_next_power2 (max_t (uint32_t,1U , attr->cap.max_recv_sge)); + attr->cap.max_recv_sge =max_t (uint32_t,1U , attr->cap.max_recv_sge); attr->cap.max_recv_wr =align_next_power2 (max_t (uint32_t,1U , attr->cap.max_recv_wr)); }else {
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html