Author: arybchik Date: Wed Mar 25 10:11:17 2015 New Revision: 280508 URL: https://svnweb.freebsd.org/changeset/base/280508
Log: MFC: 277884 sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access It was the only place on data path where sc->evq array is accessed. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:11:17 2015 (r280508) @@ -280,7 +280,7 @@ extern int sfxge_ev_init(struct sfxge_so extern void sfxge_ev_fini(struct sfxge_softc *sc); extern int sfxge_ev_start(struct sfxge_softc *sc); extern void sfxge_ev_stop(struct sfxge_softc *sc); -extern int sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index); +extern int sfxge_ev_qpoll(struct sfxge_evq *evq); /* * From sfxge_intr.c. Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:11:17 2015 (r280508) @@ -564,13 +564,10 @@ static const efx_ev_callbacks_t sfxge_ev int -sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index) +sfxge_ev_qpoll(struct sfxge_evq *evq) { - struct sfxge_evq *evq; int rc; - evq = sc->evq[index]; - mtx_lock(&evq->lock); if (evq->init_state != SFXGE_EVQ_STARTING && Modified: stable/10/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:11:17 2015 (r280508) @@ -106,9 +106,8 @@ static void sfxge_intr_line(void *arg) { struct sfxge_evq *evq = arg; - struct sfxge_softc *sc = evq->sc; - (void)sfxge_ev_qpoll(sc, 0); + (void)sfxge_ev_qpoll(evq); } static void @@ -142,7 +141,7 @@ sfxge_intr_message(void *arg) return; } - (void)sfxge_ev_qpoll(sc, index); + (void)sfxge_ev_qpoll(evq); } static int _______________________________________________ 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"