Author: arybchik Date: Wed Mar 25 13:45:20 2015 New Revision: 280602 URL: https://svnweb.freebsd.org/changeset/base/280602
Log: MFC: 280163 sfxge: prefetch txq->common if TxQ is started only 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) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:44:01 2015 (r280601) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:45:20 2015 (r280602) @@ -423,8 +423,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx 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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"