IB/rxe: Unblock loopback by moving skb_out increment
authorAndrew Boyer <andrew.boyer@dell.com>
Wed, 23 Nov 2016 17:39:20 +0000 (12:39 -0500)
committerDoug Ledford <dledford@redhat.com>
Mon, 12 Dec 2016 21:31:45 +0000 (16:31 -0500)
skb_out is decremented in rxe_skb_tx_dtor(), which is not called in the
loopback() path. Move the increment to the send() path rather than
rxe_xmit_packet().

Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Acked-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_net.c

index 73849a5a91b3a9de83db6b1ad2d7753e4d98e02e..efe4c6a354424a5323261eb07135cf7b998e1679 100644 (file)
@@ -266,8 +266,6 @@ static inline int rxe_xmit_packet(struct rxe_dev *rxe, struct rxe_qp *qp,
                return err;
        }
 
-       atomic_inc(&qp->skb_out);
-
        if ((qp_type(qp) != IB_QPT_RC) &&
            (pkt->mask & RXE_END_MASK)) {
                pkt->wqe->state = wqe_state_done;
index 4cb63780fa74056b6ff182608a43388b7fde78c2..a576603304f7d5640f68a6f38218b7312351ae14 100644 (file)
@@ -459,6 +459,8 @@ static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
                return -EAGAIN;
        }
 
+       if (pkt->qp)
+               atomic_inc(&pkt->qp->skb_out);
        kfree_skb(skb);
 
        return 0;