<html><body>
<p>Hello Eli,<br>
<br>
Did you see my another email regarding the memory leak issue in post_receive()?<br>
<br>
<tt><font size="4">+static int ipoib_ib_post_receive(struct net_device *dev, int id)<br>
+{<br>
+ struct ipoib_dev_priv *priv = netdev_priv(dev);<br>
+ struct ib_recv_wr *bad_wr;<br>
+ int ret = 0;<br>
+ int i = priv->rx_outst;<br>
+<br>
+ priv->sglist_draft[i].addr = priv->rx_ring[id].mapping;<br>
+ priv->rx_wr_draft[i].wr_id = id | IPOIB_OP_RECV;<br>
+ if (++priv->rx_outst == UD_POST_RCV_COUNT) {<br>
+ ret = ib_post_recv(priv->qp, priv->rx_wr_draft,<br>
&bad_wr);<br>
+<br>
+ if (unlikely(ret)) {<br>
+ ipoib_warn(priv, "receive failed for buf %d (%<br>
d)\n", id, ret);<br>
+ while (bad_wr) {<br>
+ id = bad_wr->wr_id & ~IPOIB_OP_RECV;<br>
+ ib_dma_unmap_single(priv->ca,<br>
priv->rx_ring[id].mapping,<br>
+ IPOIB_BUF_SIZE,<br>
DMA_FROM_DEVICE);<br>
+ dev_kfree_skb_any(priv->rx_ring[id].skb);<br>
+ priv->rx_ring[id].skb = NULL;<br>
+ }<br>
</font></tt><br>
<tt><font size="4">16 skbs need to be freed here when errors, not just this one.</font></tt><br>
<br>
<tt><font size="4">+ }<br>
+ priv->rx_outst = 0;<br>
+ }</font></tt><font size="4"><br>
</font><tt><font size="4"><br>
return ret;<br>
}</font></tt><font size="4"> </font><br>
<br>
Thanks<br>
Shirley<br>
</body></html>