Date: Mon, 9 Jan 2017 22:18:08 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311831 - head/sys/dev/cxgbe Message-ID: <201701092218.v09MI8Kb017097@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Mon Jan 9 22:18:08 2017 New Revision: 311831 URL: https://svnweb.freebsd.org/changeset/base/311831 Log: cxgbe(4): The wraparound logic in start_wrq_wr() should not get involved in work requests that end at the end of the descriptor ring, even though the pidx wraps around to 0. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 21:46:24 2017 (r311830) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 22:18:08 2017 (r311831) @@ -2298,7 +2298,7 @@ slowpath: w = &eq->desc[eq->pidx]; IDXINCR(eq->pidx, ndesc, eq->sidx); - if (__predict_false(eq->pidx < ndesc - 1)) { + if (__predict_false(cookie->pidx + ndesc > eq->sidx)) { w = &wrq->ss[0]; wrq->ss_pidx = cookie->pidx; wrq->ss_len = len16 * 16;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701092218.v09MI8Kb017097>