[ofa-general] Re: [PATCH] connected mode leaks pages on receive & reuses old skb

Ralph Campbell ralph.campbell at qlogic.com
Mon Aug 27 09:30:03 PDT 2007


On Sun, 2007-08-26 at 07:56 +0300, Michael S. Tsirkin wrote:
> 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.

Ah, yes.

> What am I missing?

Nothing that I can see.
I agree with you.




More information about the general mailing list