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