Date: Mon, 23 Jun 2014 05:42:52 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267765 - stable/9/sys/dev/cxgbe Message-ID: <201406230542.s5N5gqGU017107@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406230542.s5N5gqGU017107>