Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2015 19:44:03 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279080 - head/sys/dev/sfxge
Message-ID:  <201502201944.t1KJi3SW048428@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri Feb 20 19:44:02 2015
New Revision: 279080
URL: https://svnweb.freebsd.org/changeset/base/279080

Log:
  sfxge: reap Tx descriptors on unblock
  
  Otherwise when processing finally comes to efx_tx_qdesc_post() it could
  be insufficient space between reaped and added to post pending
  descriptors.
  
  Sponsored by:   Solarflare Communications, Inc.
  Approved by:    gnn (mentor)

Modified:
  head/sys/dev/sfxge/sfxge_tx.c

Modified: head/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_tx.c	Fri Feb 20 19:42:26 2015	(r279079)
+++ head/sys/dev/sfxge/sfxge_tx.c	Fri Feb 20 19:44:02 2015	(r279080)
@@ -1143,8 +1143,11 @@ sfxge_tx_qunblock(struct sfxge_txq *txq)
 		unsigned int level;
 
 		level = txq->added - txq->completed;
-		if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries))
+		if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) {
+			/* reaped must be in sync with blocked */
+			sfxge_tx_qreap(txq);
 			txq->blocked = 0;
+		}
 	}
 
 	sfxge_tx_qdpl_service(txq);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502201944.t1KJi3SW048428>