<div>
<br><font size=2 face="sans-serif">Hello Roland,</font>
<br>
<br><font size=2 face="sans-serif">If IPoIB has an unsuccessful receive
packet (wc->status != IB_WC_SUCCESS), </font>
<br><font size=2 face="sans-serif">is it a permenent error or a temp error?</font>
<br>
<br><font size=2 face="sans-serif">If it is a temp eror, receive packet
errors stat should be increased, and the old buffer </font>
<br><font size=2 face="sans-serif">should be reused instead of being freed.
In the extreme case, if none of the receive's </font>
<br><font size=2 face="sans-serif">wc is successful, there is no buffer
to receive any incoming packets.</font>
<br>
<br><font size=2 face="sans-serif">Please correct me if I am wrong. Attachement
is the patch file.</font>
<br>
<br><font size=2 face="sans-serif">Signed-off-by: Shirley Ma <xma@us.ibm.com></font>
<br>
<br><font size=2 face="sans-serif">diff -urN infiniband/ulp/ipoib/ipoib_ib.c
infiniband-rx_error/ulp/ipoib/ipoib_ib.c<br>
--- infiniband/ulp/ipoib/ipoib_ib.c        2006-03-26
11:57:15.853035656 -0800<br>
+++ infiniband-rx_error/ulp/ipoib/ipoib_ib.c        2006-03-26
12:47:53.946175296 -0800<br>
@@ -196,10 +196,11 @@<br>
                  
               
      ipoib_warn(priv, "failed recv event "<br>
                  
               
               
 "(status=%d, wrid=%d vend_err %x)\n",<br>
                  
               
               
 wc->status, wr_id, wc->vendor_err);<br>
-                
               dma_unmap_single(priv->ca->dma_device,
addr,<br>
-                
               
               
IPOIB_BUF_SIZE, DMA_FROM_DEVICE);<br>
-                
               dev_kfree_skb_any(skb);<br>
-                
               priv->rx_ring[wr_id].skb
= NULL;<br>
+                
               ++priv->stats.rx_errors;<br>
+                
               /*
ignore this packet, reuse the old buffer */<br>
+                
               if
(unlikely(ipoib_ib_post_receive(dev, wr_id)))<br>
+                
               
       ipoib_warn(priv, "ipoib_ib_post_receive
failed "<br>
+                
               
               
  "for buf %d\n", wr_id);<br>
                  
              return;<br>
                  
      }</font>
<br><font size=2 face="sans-serif"><br>
 </font>
<br><font size=2 face="sans-serif"><br>
Thanks<br>
Shirley Ma<br>
IBM Linux Technology Center<br>
15300 SW Koll Parkway<br>
Beaverton, OR 97006-6063<br>
Phone(Fax): (503) 578-7638<br>
<br>
</font></div>