FreeBSD/sys/dev/bxe/bxe_stats.c
/*
 * Post the next statistics ramrod. Protect it with the lock in
 * order to ensure the strict order between statistics ramrods
 * (each ramrod has a sequence number passed in a
 * sc->fw_stats_req->hdr.drv_stats_counter and ramrods must be
 * sent in order).
 */
Post the next statistics ramrod. Protect it with the lock in
order to ensure the strict order between statistics ramrods
(each ramrod has a sequence number passed in a
sc->fw_stats_req->hdr.drv_stats_counter and ramrods must be
sent in order).
Post the next statistics ramrod . Protect it with the lock in order to ensure the strict order between statistics ramrods ( each ramrod has a sequence number passed in a sc - > fw_stats_req - > hdr . drv_stats_counter and ramrods must be sent in order ) .
static void
bxe_storm_stats_post(struct bxe_softc *sc)
{
    int rc;
    if (!sc->stats_pending) {
        BXE_STATS_LOCK(sc);
        if (sc->stats_pending) {
            BXE_STATS_UNLOCK(sc);
            return;
        }
        sc->fw_stats_req->hdr.drv_stats_counter =
            htole16(sc->stats_counter++);
        BLOGD(sc, DBG_STATS,
              "sending statistics ramrod %d\n",
              le16toh(sc->fw_stats_req->hdr.drv_stats_counter));
        bxe_dp_stats(sc);
        rc = bxe_sp_post(sc, RAMROD_CMD_ID_COMMON_STAT_QUERY, 0,
                         U64_HI(sc->fw_stats_req_mapping),
                         U64_LO(sc->fw_stats_req_mapping),
                         NONE_CONNECTION_TYPE);
        if (rc == 0) {
            sc->stats_pending = 1;
        }
        BXE_STATS_UNLOCK(sc);
    }
}
static void bxe_storm_stats_post ( struct bxe_softc * sc ) { int rc ; if ( ! sc -> stats_pending ) { BXE_STATS_LOCK ( sc ) ; if ( sc -> stats_pending ) { BXE_STATS_UNLOCK ( sc ) ; return ; } sc -> fw_stats_req -> hdr . drv_stats_counter = htole16 ( sc -> stats_counter ++ ) ; BLOGD ( sc , DBG_STATS , " \n " , le16toh ( sc -> fw_stats_req -> hdr . drv_stats_counter ) ) ; bxe_dp_stats ( sc ) ; rc = bxe_sp_post ( sc , RAMROD_CMD_ID_COMMON_STAT_QUERY , 0 , U64_HI ( sc -> fw_stats_req_mapping ) , U64_LO ( sc -> fw_stats_req_mapping ) , NONE_CONNECTION_TYPE ) ; if ( rc == 0 ) { sc -> stats_pending = 1 ; } BXE_STATS_UNLOCK ( sc ) ; } }
Post the next statistics ramrod.
Post the next statistics ramrod .
/* adjust the ramrod to include VF queues statistics */ // XXX bxe_iov_adjust_stats_req(sc); /* send FW stats ramrod */