svn commit: r267689 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Fri Jun 20 20:28:47 UTC 2014
Author: np
Date: Fri Jun 20 20:28:46 2014
New Revision: 267689
URL: http://svnweb.freebsd.org/changeset/base/267689
Log:
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.
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 Fri Jun 20 20:17:39 2014 (r267688)
+++ head/sys/dev/cxgbe/t4_sge.c Fri Jun 20 20:28:46 2014 (r267689)
@@ -1771,7 +1771,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++;
@@ -1892,7 +1892,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);
}
@@ -2066,7 +2066,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-all
mailing list