Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 02:54:04 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267663 - head/sys/dev/vmware/vmxnet3
Message-ID:  <201406200254.s5K2s4ej015754@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Fri Jun 20 02:54:04 2014
New Revision: 267663
URL: http://svnweb.freebsd.org/changeset/base/267663

Log:
  Increment the pending packets more aggressively for TSO
  
  Assume the number of description used is reasonable value to
  increment this otherwise opaque field by.
  
  While here, reduce a minor difference between the legacy and
  multiqueue transmit paths.
  
  MFC after:	1 week

Modified:
  head/sys/dev/vmware/vmxnet3/if_vmx.c

Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- head/sys/dev/vmware/vmxnet3/if_vmx.c	Fri Jun 20 02:49:03 2014	(r267662)
+++ head/sys/dev/vmware/vmxnet3/if_vmx.c	Fri Jun 20 02:54:04 2014	(r267663)
@@ -2856,7 +2856,8 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue
 	vmxnet3_barrier(sc, VMXNET3_BARRIER_WR);
 	sop->gen ^= 1;
 
-	if (++txq->vxtxq_ts->npending >= txq->vxtxq_ts->intr_threshold) {
+	txq->vxtxq_ts->npending += nsegs;
+	if (txq->vxtxq_ts->npending >= txq->vxtxq_ts->intr_threshold) {
 		txq->vxtxq_ts->npending = 0;
 		vmxnet3_write_bar0(sc, VMXNET3_BAR0_TXH(txq->vxtxq_id),
 		    txr->vxtxr_head);
@@ -2973,8 +2974,7 @@ vmxnet3_txq_mq_start_locked(struct vmxne
 			break;
 		}
 
-		error = vmxnet3_txq_encap(txq, &m);
-		if (error) {
+		if (vmxnet3_txq_encap(txq, &m) != 0) {
 			if (m != NULL)
 				drbr_putback(ifp, br, m);
 			else



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