Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 17:34:55 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347829 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib
Message-ID:  <201905161734.x4GHYtBL011009@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu May 16 17:34:54 2019
New Revision: 347829
URL: https://svnweb.freebsd.org/changeset/base/347829

Log:
  MFC r347278:
  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@
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c	Thu May 16 17:34:36 2019	(r347828)
+++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c	Thu May 16 17:34:54 2019	(r347829)
@@ -407,7 +407,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;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161734.x4GHYtBL011009>