IB/rxe: clean skb queue directly
authorZhu Yanjun <yanjun.zhu@oracle.com>
Fri, 19 Oct 2018 08:53:00 +0000 (04:53 -0400)
committerDoug Ledford <dledford@redhat.com>
Tue, 6 Nov 2018 21:03:14 +0000 (16:03 -0500)
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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_resp.c

index c962160..54bb580 100644 (file)
@@ -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 */