svn commit: r267765 - stable/9/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Mon Jun 23 05:42:52 UTC 2014
Author: np
Date: Mon Jun 23 05:42:52 2014
New Revision: 267765
URL: http://svnweb.freebsd.org/changeset/base/267765
Log:
MFC r267689:
Consider the total number of descriptors available (and not just those
that are ready to be reclaimed) when deciding whether to resume tx after
a stall.
Modified:
stable/9/sys/dev/cxgbe/t4_sge.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:39:10 2014 (r267764)
+++ stable/9/sys/dev/cxgbe/t4_sge.c Mon Jun 23 05:42:52 2014 (r267765)
@@ -1679,7 +1679,7 @@ t4_wrq_tx_locked(struct adapter *sc, str
can_reclaim = reclaimable(eq);
if (__predict_false(eq->flags & EQ_STALLED)) {
- if (can_reclaim < tx_resume_threshold(eq))
+ if (eq->avail + can_reclaim < tx_resume_threshold(eq))
return;
eq->flags &= ~EQ_STALLED;
eq->unstalled++;
@@ -1800,7 +1800,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_
can_reclaim = reclaimable(eq);
if (__predict_false(eq->flags & EQ_STALLED)) {
- if (can_reclaim < tx_resume_threshold(eq)) {
+ if (eq->avail + can_reclaim < tx_resume_threshold(eq)) {
txq->m = m;
return (0);
}
@@ -1974,7 +1974,8 @@ t4_update_fl_bufsize(struct ifnet *ifp)
int
can_resume_tx(struct sge_eq *eq)
{
- return (reclaimable(eq) >= tx_resume_threshold(eq));
+
+ return (eq->avail + reclaimable(eq) >= tx_resume_threshold(eq));
}
static inline void
More information about the svn-src-stable-9
mailing list