Index: em_txrx.c =================================================================== --- em_txrx.c (revision 311989) +++ em_txrx.c (working copy) @@ -404,6 +404,7 @@ int last, done; struct em_txbuffer *buf; struct e1000_tx_desc *tx_desc, *eop_desc; + int limit; cidx = cidx_init; buf = &txr->tx_buffers[cidx]; @@ -410,6 +411,7 @@ tx_desc = &txr->tx_base[cidx]; last = buf->eop; eop_desc = &txr->tx_base[last]; + limit = adapter->tx_process_limit; DPRINTF(iflib_get_dev(adapter->ctx), "credits_update: cidx_init=%d clear=%d last=%d\n", cidx_init, clear, last); @@ -424,7 +426,7 @@ done = last; - while (eop_desc->upper.fields.status & E1000_TXD_STAT_DD) { + while (limit && (eop_desc->upper.fields.status & E1000_TXD_STAT_DD)) { /* We clean the range of the packet */ while (cidx != done) { if (clear) { @@ -453,6 +455,7 @@ if (++last == scctx->isc_ntxd[0]) last = 0; done = last; + limit--; } DPRINTF(iflib_get_dev(adapter->ctx), "Processed %d credits update\n", processed);