svn commit: r311831 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Mon Jan 9 22:18:09 UTC 2017
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;
More information about the svn-src-all
mailing list