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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to