Shirley> Here is the patch.

Thanks, good catch.  Unfortunately your patch got whitespace-mangled
somewhere along the way.  Also I think we also need to undo the DMA
mapping in addition to freeing the skb, like this:

Index: infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- infiniband/ulp/ipoib/ipoib_ib.c     (revision 1758)
+++ infiniband/ulp/ipoib/ipoib_ib.c     (working copy)
@@ -137,6 +137,9 @@ static int ipoib_ib_post_receive(struct 
        if (ret) {
                ipoib_warn(priv, "ipoib_ib_receive failed for buf %d (%d)\n",
                           id, ret);
+               dma_unmap_single(priv->ca->dma_device, addr,
+                                IPOIB_BUF_SIZE, DMA_FROM_DEVICE);
+               dev_kfree_skb_any(skb);
                priv->rx_ring[id].skb = NULL;
        }
 

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to