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)
This commit is contained in:
arybchik 2015-01-29 18:50:25 +00:00
parent 57d4c15c47
commit b57ec13863
3 changed files with 4 additions and 8 deletions

View File

@ -281,7 +281,7 @@ extern int sfxge_ev_init(struct sfxge_softc *sc);
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.

View File

@ -569,13 +569,10 @@ static const efx_ev_callbacks_t sfxge_ev_callbacks = {
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 &&

View File

@ -110,9 +110,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
@ -146,7 +145,7 @@ sfxge_intr_message(void *arg)
return;
}
(void)sfxge_ev_qpoll(sc, index);
(void)sfxge_ev_qpoll(evq);
}
static int