diff mbox series

[1/1] IB/rxe: clean skb queue directly

Message ID 1539939180-6513-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive)
State Accepted
Commit 4e588c8d034dacaefc247a1c7af50b345c60a3dd
Headers show
Series [1/1] IB/rxe: clean skb queue directly | expand

Commit Message

Zhu Yanjun Oct. 19, 2018, 8:53 a.m. UTC
When resp is in error state, the queued SKBs will not be handled.
The function get_req cleans up the skb queue directly.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 drivers/infiniband/sw/rxe/rxe_resp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Doug Ledford Nov. 6, 2018, 9:02 p.m. UTC | #1
On Fri, 2018-10-19 at 04:53 -0400, Zhu Yanjun wrote:
> When resp is in error state, the queued SKBs will not be handled.
> The function get_req cleans up the skb queue directly.
> 
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Thanks, applied to for-next.
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index aa58333..a0c45ed 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -124,12 +124,9 @@  static inline enum resp_states get_req(struct rxe_qp *qp,
 	struct sk_buff *skb;
 
 	if (qp->resp.state == QP_STATE_ERROR) {
-		skb = skb_dequeue(&qp->req_pkts);
-		if (skb) {
-			/* drain request packet queue */
+		while ((skb = skb_dequeue(&qp->req_pkts))) {
 			rxe_drop_ref(qp);
 			kfree_skb(skb);
-			return RESPST_GET_REQ;
 		}
 
 		/* go drain recv wr queue */