diff mbox

[v1,rdma-core] vmw_pvrdma: Drop the extraneous align_next_power2 for sges

Message ID 1518807066-14845-1-git-send-email-aditr@vmware.com (mailing list archive)
State Accepted
Headers show

Commit Message

Adit Ranadive Feb. 16, 2018, 6:51 p.m. UTC
Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support")
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Reviewed-by: Bryan Tan <bryantan@vmware.com>
Reviewed-by: Nitish Bhat <bnitish@vmware.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
Cc: stable@linux-rdma.org
---
v0->v1: Updated commit message

 providers/vmw_pvrdma/qp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Leon Romanovsky Feb. 18, 2018, 12:21 p.m. UTC | #1
On Fri, Feb 16, 2018 at 10:51:06AM -0800, Adit Ranadive wrote:
> Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support")
> Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
> Reviewed-by: Bryan Tan <bryantan@vmware.com>
> Reviewed-by: Nitish Bhat <bnitish@vmware.com>
> Signed-off-by: Adit Ranadive <aditr@vmware.com>
> Cc: stable@linux-rdma.org
> ---
> v0->v1: Updated commit message
>

Thanks, applied.
Nicolas Morey-Chaisemartin Feb. 19, 2018, 10:08 a.m. UTC | #2
Pushed to stable-v16 branch.

I'm working remotely atm so I don't have my lazy release script available.
I will release be back  by the end of this week and will release v16.3 then. Unless you really need it before.

Nicolas
 
Le 16/02/2018 à 19:51, Adit Ranadive a écrit :
> Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support")
> Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
> Reviewed-by: Bryan Tan <bryantan@vmware.com>
> Reviewed-by: Nitish Bhat <bnitish@vmware.com>
> Signed-off-by: Adit Ranadive <aditr@vmware.com>
> Cc: stable@linux-rdma.org
> ---
> v0->v1: Updated commit message
>
>  providers/vmw_pvrdma/qp.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c
> index efcc99b..4b9f897 100644
> --- a/providers/vmw_pvrdma/qp.c
> +++ b/providers/vmw_pvrdma/qp.c
> @@ -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 {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c
index efcc99b..4b9f897 100644
--- a/providers/vmw_pvrdma/qp.c
+++ b/providers/vmw_pvrdma/qp.c
@@ -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 {