BNX2X: Transmit synchronization

The transmit function is called serially, per txdata, meaning there is only
ever one caller of it.  Instead of a netif lock, we use the poker, which
guarantees mutual exclusion (per poke_tracker).

The transmitter stops when the device is full.  Concurrently, the tx_int
could have freed up space in the tx ring.  When tx_int calls poke, poke
will make sure the transmit function runs at least once after poke is
called.  This ensures we don't stall on transmits.

If you're concerned about the network stack calling transmit over and
over while the TX ring is full, we can optimize slightly.  See the notes
above __bnx2x_tx_queue() for details.  In short, poke() is powerful, but
it won't solve all of your problems.
4 files changed