svn commit: r347278 - head/sys/ofed/drivers/infiniband/ulp/ipoib

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 8 10:42:06 UTC 2019


Author: hselasky
Date: Wed May  8 10:42:05 2019
New Revision: 347278
URL: https://svnweb.freebsd.org/changeset/base/347278

Log:
  Fix endless loop in ipoib_poll().
  
  ib_req_notify_cq may return negative value which will indicate a
  failure. In the case of uncorrectable error, we will end up in an
  endless loop. Fix that, by going to another loop with poll_more
  only if there is anything left to poll.
  
  Submitted by:	slavash@
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c

Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c	Wed May  8 10:41:44 2019	(r347277)
+++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c	Wed May  8 10:42:05 2019	(r347278)
@@ -409,7 +409,7 @@ poll_more:
 	spin_unlock(&priv->drain_lock);
 
 	if (ib_req_notify_cq(priv->recv_cq,
-	    IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS))
+	    IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS) > 0)
 		goto poll_more;
 }
 


More information about the svn-src-all mailing list