X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenetc%2Fenetc_rxtx.c;h=958e3a21d89f5bf9b82a6c0ed5b336e3861b0f80;hb=9a6d2fae261c64dabbafc981acb8a2940f750204;hp=395f5ecf41dfbbb98b869ad48d188df2425d8631;hpb=8cb6b561eac42261ecbeec9a8de8322cd6deb699;p=dpdk.git diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c index 395f5ecf41..958e3a21d8 100644 --- a/drivers/net/enetc/enetc_rxtx.c +++ b/drivers/net/enetc/enetc_rxtx.c @@ -76,7 +76,6 @@ enetc_xmit_pkts(void *tx_queue, start = 0; while (nb_pkts--) { - enetc_clean_tx_ring(tx_ring); tx_ring->q_swbd[i].buffer_addr = tx_pkts[start]; txbd = ENETC_TXBD(*tx_ring, i); tx_swbd = &tx_ring->q_swbd[i]; @@ -92,6 +91,14 @@ enetc_xmit_pkts(void *tx_queue, i = 0; } + /* we're only cleaning up the Tx ring here, on the assumption that + * software is slower than hardware and hardware completed sending + * older frames out by now. + * We're also cleaning up the ring before kicking off Tx for the new + * batch to minimize chances of contention on the Tx ring + */ + enetc_clean_tx_ring(tx_ring); + tx_ring->next_to_use = i; enetc_wr_reg(tx_ring->tcir, i); return start;