diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-03-25 11:08:41 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-03-25 11:08:41 +0000 |
commit | 8e30d2d6d2dbc234a00afb86d1046e9ee7edabed (patch) | |
tree | e560c2a63920146fb3d3ff7607c573903ebb8a4f | |
parent | 0d82d7d167ee26af6c5ec02b2673330018ac88aa (diff) | |
download | FreeBSD-src-8e30d2d6d2dbc234a00afb86d1046e9ee7edabed.zip FreeBSD-src-8e30d2d6d2dbc234a00afb86d1046e9ee7edabed.tar.gz |
MFC: 279144
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)
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index ed78bee..f557be0 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -1103,8 +1103,8 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, * 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; } |