diff mbox

[1/2] IB/rxe: Fix resid update

Message ID 20170207134305.GJ11103@mwanda (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter Feb. 7, 2017, 1:43 p.m. UTC
From: Eyal Itkin <eyal.itkin@gmail.com>

Update the response's resid field when larger than MTU, instead of only
updating the local resid variable.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
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

Comments

Leon Romanovsky Feb. 7, 2017, 5:02 p.m. UTC | #1
On Tue, Feb 07, 2017 at 04:43:05PM +0300, Dan Carpenter wrote:
> From: Eyal Itkin <eyal.itkin@gmail.com>
>
> Update the response's resid field when larger than MTU, instead of only
> updating the local resid variable.
>
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Doug Ledford Feb. 8, 2017, 5:39 p.m. UTC | #2
On Tue, 2017-02-07 at 16:43 +0300, Dan Carpenter wrote:
> From: Eyal Itkin <eyal.itkin@gmail.com>
> 
> Update the response's resid field when larger than MTU, instead of
> only
> updating the local resid variable.
> 
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c
> b/drivers/infiniband/sw/rxe/rxe_resp.c
> index 7bf20ced2078..d404a8aba7af 100644
> --- a/drivers/infiniband/sw/rxe/rxe_resp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_resp.c
> @@ -479,7 +479,7 @@ static enum resp_states check_rkey(struct rxe_qp
> *qp,
>  				goto err;
>  			}
>  
> -			resid = mtu;
> +			qp->resp.resid = mtu;
>  		} else {
>  			if (pktlen != resid) {
>  				state = RESPST_ERR_LENGTH;

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 7bf20ced2078..d404a8aba7af 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -479,7 +479,7 @@  static enum resp_states check_rkey(struct rxe_qp *qp,
 				goto err;
 			}
 
-			resid = mtu;
+			qp->resp.resid = mtu;
 		} else {
 			if (pktlen != resid) {
 				state = RESPST_ERR_LENGTH;