FreeBSD/sys/dev/bxe/bxe.c
/* must be called under the spq lock */
must be called under the spq lock
must be called under the spq lock
static inline
struct eth_spe *bxe_sp_get_next(struct bxe_softc *sc)
{
    struct eth_spe *next_spe = sc->spq_prod_bd;
    if (sc->spq_prod_bd == sc->spq_last_bd) {
        sc->spq_prod_bd = sc->spq;
        sc->spq_prod_idx = 0;
    } else {
        sc->spq_prod_bd++;
        sc->spq_prod_idx++;
    }
    return (next_spe);
}
static inline struct eth_spe * bxe_sp_get_next ( struct bxe_softc * sc ) { struct eth_spe * next_spe = sc -> spq_prod_bd ; if ( sc -> spq_prod_bd == sc -> spq_last_bd ) { sc -> spq_prod_bd = sc -> spq ; sc -> spq_prod_idx = 0 ; } else { sc -> spq_prod_bd ++ ; sc -> spq_prod_idx ++ ; } return ( next_spe ) ; }
must be called under the spq lock
must be called under the spq lock
/* wrap back to the first eth_spq */