aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2018-10-19 04:53:00 -0400
committerDoug Ledford <dledford@redhat.com>2018-11-06 16:03:14 -0500
commit4e588c8d034dacaefc247a1c7af50b345c60a3dd (patch)
tree0b8a9973698597e7c07de3b1706cc2bb61b57af6 /drivers
parentRDMA/hns: prefer dma_zalloc_coherent to dma_alloc_coherent/memse (diff)
downloadlinux-dev-4e588c8d034dacaefc247a1c7af50b345c60a3dd.tar.xz
linux-dev-4e588c8d034dacaefc247a1c7af50b345c60a3dd.zip
IB/rxe: clean skb queue directly
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_resp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index c962160292f4..54bb5801c409 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 */