[ofa-general] Re: [PATCH] connected mode leaks pages on receive & reuses old skb
Michael S. Tsirkin
mst at dev.mellanox.co.il
Sat Aug 25 21:56:10 PDT 2007
I haven't gone over all of the patch yet, but at least this part is
of the claims you make seems wrong:
> NOTE that srq_ring[id].skb is *not* updated to point to newskb and
> thus will be used again after being passed to the Linux network stack.
It is, too. new skb is allocated with ipoib_cm_alloc_rx_skb, and that has
priv->cm.srq_ring[id].skb = skb;
return skb;
> @@ -463,6 +470,7 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>
> ipoib_cm_dma_unmap_rx(priv, frags, priv->cm.srq_ring[wr_id].mapping);
> memcpy(priv->cm.srq_ring[wr_id].mapping, mapping, (frags + 1) * sizeof *mapping);
> + priv->cm.srq_ring[wr_id].skb = newskb;
>
> ipoib_dbg_data(priv, "received %d bytes, SLID 0x%04x\n",
> wc->byte_len, wc->slid);
This assignment is already done as part of ipoib_cm_alloc_rx_skb.
What am I missing?
--
MST
More information about the general
mailing list