sfxge: fix bug in TSO when a DMA segment has both header and data

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2163
This commit is contained in:
Andrew Rybchenko 2015-03-29 15:18:04 +00:00
parent b308aaed27
commit cfaf34ff99

View File

@ -1025,7 +1025,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf,
KASSERT(n_dma_seg, ("no payload found in TSO packet"));
++dma_seg;
}
tso.in_len = dma_seg->ds_len + (tso.header_len - skipped);
tso.in_len = dma_seg->ds_len - (tso.header_len - skipped);
tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped);
id = txq->added & txq->ptr_mask;