Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
stdp = &txq->dpl;
pushed = txq->added;
- prefetch_read_many(sc->enp);
- prefetch_read_many(txq->common);
+ if (__predict_true(txq->init_state == SFXGE_TXQ_STARTED)) {
+ prefetch_read_many(sc->enp);
+ prefetch_read_many(txq->common);
+ }
mbuf = stdp->std_get;
count = stdp->std_get_count;