Author: arybchik
Date: Sun Feb 22 07:16:11 2015
New Revision: 279144
URL: https://svnweb.freebsd.org/changeset/base/279144

Log:
  sfxge: packet can't require more than n_dma_seg descriptors plus one
  
  Use remaining number of DMA segment instead of maximum number in mapping
  when checking space for one more TSO segment packet.
  
  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       Sun Feb 22 07:14:12 2015        
(r279143)
+++ head/sys/dev/sfxge/sfxge_tx.c       Sun Feb 22 07:16:11 2015        
(r279144)
@@ -1104,8 +1104,8 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq
                         * the remainder of the input mbuf but do not
                         * roll back the work we have done.
                         */
-                       if (txq->n_pend_desc >
-                           SFXGE_TSO_MAX_DESC - (1 + 
SFXGE_TX_MAPPING_MAX_SEG)) {
+                       if (txq->n_pend_desc + 1 /* header */ + n_dma_seg >
+                           SFXGE_TSO_MAX_DESC) {
                                txq->tso_pdrop_too_many++;
                                break;
                        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to